public void insertThemeSettingInfo(ThemeSettingInfo info) { final DataProvider dataProvider = mDataProvider; ContentValues values = new ContentValues(); info.contentValues(values); dataProvider.insertThemeSetting(values); values = null; }
// 主题设置 public ThemeSettingInfo getThemeSettingInfo() { final DataProvider dataProvider = mDataProvider; Cursor cursor = dataProvider.queryThemeSetting(); if (null != cursor) { try { ThemeSettingInfo info = new ThemeSettingInfo(); boolean bOk = info.parseFromCursor(cursor); if (bOk) { return info; } } catch (SQLiteException e) { e.printStackTrace(); } finally { cursor.close(); } } return null; }