/packages/providers/ContactsProvider/tools/ |
H A D | contacts-db-schema.sh | 20 db=/data/data/com.android.providers.contacts/databases/contacts2.db 26 adb shell "(ls $db >/dev/null)&& sqlite3 $db \"select name, sql from sqlite_master where type in('table','index', 'view') order by name\"" | 29 adb shell "(ls $db >/dev/null)&& sqlite3 $db \"select * from sqlite_stat1 order by tbl, idx, stat\""
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/ |
H A D | SQLiteTransaction.java | 29 * @param db A writable database. 32 protected abstract boolean performTransaction(SQLiteDatabase db); argument 38 public void run(SQLiteDatabase db) { argument 39 db.beginTransaction(); 41 if (performTransaction(db)) { 42 db.setTransactionSuccessful(); 45 db.endTransaction();
|
H A D | SQLiteAsyncQuery.java | 31 * @param db A readable database. 34 protected abstract A performQuery(SQLiteDatabase db); argument 39 public void run(SQLiteDatabase db, Consumer<A> consumer) { argument 40 A result = performQuery(db);
|
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
H A D | MmsSmsDatabaseHelper.java | 242 static final String DATABASE_NAME = "mmssms.db"; 287 private static void removeUnferencedCanonicalAddresses(SQLiteDatabase db) { argument 288 Cursor c = db.query(MmsSmsProvider.TABLE_THREADS, new String[] { "recipient_ids" }, 294 int rows = db.delete("canonical_addresses", null, null); 320 int rows = db.delete("canonical_addresses", sb.toString(), null); 328 public static void updateThread(SQLiteDatabase db, long thread_id) { argument 330 updateThreads(db, null, null); 333 updateThreads(db, "(thread_id = ?)", new String[]{ String.valueOf(thread_id) }); 340 public static void updateThreads(SQLiteDatabase db, String where, String[] whereArgs) { argument 347 db 443 deleteOneSms(SQLiteDatabase db, int message_id) argument 465 onCreate(SQLiteDatabase db) argument 477 populateWordsTable(SQLiteDatabase db) argument 546 createWordsTables(SQLiteDatabase db) argument 567 createIndices(SQLiteDatabase db) argument 572 createThreadIdIndex(SQLiteDatabase db) argument 581 createThreadIdDateIndex(SQLiteDatabase db) argument 590 createMmsTables(SQLiteDatabase db) argument 675 createMmsTriggers(SQLiteDatabase db) argument 892 createSmsTables(SQLiteDatabase db) argument 936 createCommonTables(SQLiteDatabase db) argument 993 createCommonTriggers(SQLiteDatabase db) argument 1080 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument 1498 dropAll(SQLiteDatabase db) argument 1517 upgradeDatabaseToVersion41(SQLiteDatabase db) argument 1531 upgradeDatabaseToVersion42(SQLiteDatabase db) argument 1537 upgradeDatabaseToVersion43(SQLiteDatabase db) argument 1548 upgradeDatabaseToVersion44(SQLiteDatabase db) argument 1555 upgradeDatabaseToVersion45(SQLiteDatabase db) argument 1563 upgradeDatabaseToVersion46(SQLiteDatabase db) argument 1621 upgradeDatabaseToVersion47(SQLiteDatabase db) argument 1628 upgradeDatabaseToVersion48(SQLiteDatabase db) argument 1633 upgradeDatabaseToVersion51(SQLiteDatabase db) argument 1653 upgradeDatabaseToVersion53(SQLiteDatabase db) argument 1666 upgradeDatabaseToVersion54(SQLiteDatabase db) argument 1674 upgradeDatabaseToVersion55(SQLiteDatabase db) argument 1680 upgradeDatabaseToVersion56(SQLiteDatabase db) argument 1686 upgradeDatabaseToVersion57(SQLiteDatabase db) argument 1691 upgradeDatabaseToVersion58(SQLiteDatabase db) argument 1706 upgradeDatabaseToVersion59(SQLiteDatabase db) argument 1713 upgradeDatabaseToVersion60(SQLiteDatabase db) argument 1718 upgradeDatabaseToVersion61(SQLiteDatabase db) argument 1734 upgradeDatabaseToVersion62(SQLiteDatabase db) argument 1764 upgradeDatabaseToVersion64(SQLiteDatabase db) argument 1768 upgradeDatabaseToVersion65(SQLiteDatabase db) argument 1782 upgradeDatabaseToVersion66(SQLiteDatabase db) argument 1912 hasAutoIncrement(SQLiteDatabase db, String tableName) argument 1936 upgradeThreadsTableToAutoIncrement(SQLiteDatabase db) argument 1967 upgradeAddressTableToAutoIncrement(SQLiteDatabase db) argument 1989 upgradePartTableToAutoIncrement(SQLiteDatabase db) argument 2027 upgradePduTableToAutoIncrement(SQLiteDatabase db) argument 2099 updateThreadsAttachmentColumn(SQLiteDatabase db) argument [all...] |
H A D | CarrierDatabaseHelper.java | 33 private static final String DATABASE_NAME = "CarrierInformation.db"; 81 public void onCreate(SQLiteDatabase db) { argument 82 db.execSQL(getStringForCarrierKeyTableCreation(CARRIER_KEY_TABLE)); 85 public void createCarrierTable(SQLiteDatabase db) { argument 86 db.execSQL(getStringForCarrierKeyTableCreation(CARRIER_KEY_TABLE)); 89 public void dropCarrierTable(SQLiteDatabase db) { argument 90 db.execSQL("DROP TABLE IF EXISTS " + CARRIER_KEY_TABLE + ";"); 94 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 95 Log.d(TAG, "dbh.onUpgrade:+ db=" + db [all...] |
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
H A D | CalendarDatabaseHelper.java | 62 private static final String DATABASE_NAME = "calendar.db"; 326 public void onOpen(SQLiteDatabase db) { argument 327 mSyncState.onDatabaseOpened(db); 329 mCalendarsInserter = new DatabaseUtils.InsertHelper(db, Tables.CALENDARS); 330 mColorsInserter = new DatabaseUtils.InsertHelper(db, Tables.COLORS); 331 mEventsInserter = new DatabaseUtils.InsertHelper(db, Tables.EVENTS); 332 mEventsRawTimesInserter = new DatabaseUtils.InsertHelper(db, Tables.EVENTS_RAW_TIMES); 333 mInstancesInserter = new DatabaseUtils.InsertHelper(db, Tables.INSTANCES); 334 mAttendeesInserter = new DatabaseUtils.InsertHelper(db, Tables.ATTENDEES); 335 mRemindersInserter = new DatabaseUtils.InsertHelper(db, Table 354 upgradeSyncState(SQLiteDatabase db) argument 384 onCreate(SQLiteDatabase db) argument 388 bootstrapDB(SQLiteDatabase db) argument 516 createEventsTable(SQLiteDatabase db) argument 590 createEventsTable307(SQLiteDatabase db) argument 653 createEventsTable300(SQLiteDatabase db) argument 709 createCalendarsTable303(SQLiteDatabase db) argument 747 createColorsTable(SQLiteDatabase db) argument 760 createColorsTriggers(SQLiteDatabase db) argument 765 createCalendarsTable(SQLiteDatabase db) argument 811 createCalendarsTable305(SQLiteDatabase db) argument 852 createCalendarsTable300(SQLiteDatabase db) argument 890 createCalendarsTable205(SQLiteDatabase db) argument 923 createCalendarsTable202(SQLiteDatabase db) argument 955 createCalendarsTable200(SQLiteDatabase db) argument 987 createCalendarsCleanup200(SQLiteDatabase db) argument 994 createCalendarMetaDataTable(SQLiteDatabase db) argument 1003 createCalendarMetaDataTable59(SQLiteDatabase db) argument 1012 createCalendarCacheTable(SQLiteDatabase db, String oldTimezoneDbVersion) argument 1028 initCalendarCacheTable(SQLiteDatabase db, String oldTimezoneDbVersion) argument 1043 updateCalendarCacheTable(SQLiteDatabase db) argument 1077 initCalendarCacheTable203(SQLiteDatabase db, String oldTimezoneDbVersion) argument 1092 updateCalendarCacheTableTo203(SQLiteDatabase db) argument 1127 removeOrphans(SQLiteDatabase db) argument 1177 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 1452 onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 1463 recreateMetaDataAndInstances67(SQLiteDatabase db) argument 1491 upgradeToVersion600(SQLiteDatabase db) argument 1504 upgradeToVersion501(SQLiteDatabase db) argument 1514 upgradeToVersion502(SQLiteDatabase db) argument 1526 upgradeToVersion403(SQLiteDatabase db) argument 1535 upgradeToVersion402(SQLiteDatabase db) argument 1548 upgradeToVersion401(SQLiteDatabase db) argument 1556 upgradeToVersion400(SQLiteDatabase db) argument 1587 upgradeToVersion308(SQLiteDatabase db) argument 1613 upgradeToVersion307(SQLiteDatabase db) argument 1687 upgradeToVersion306(SQLiteDatabase db) argument 1713 upgradeToVersion305(SQLiteDatabase db) argument 1918 upgradeToVersion304(SQLiteDatabase db) argument 1930 upgradeToVersion303(SQLiteDatabase db) argument 2005 upgradeToVersion302(SQLiteDatabase db) argument 2017 upgradeToVersion301(SQLiteDatabase db) argument 2038 upgradeToVersion300(SQLiteDatabase db) argument 2236 upgradeToVersion205(SQLiteDatabase db) argument 2318 upgradeToVersion203(SQLiteDatabase db) argument 2345 upgradeToVersion202(SQLiteDatabase db) argument 2413 upgradeToVersion201(SQLiteDatabase db) argument 2417 upgradeToVersion200(SQLiteDatabase db) argument 2513 upgradeToVersion69(SQLiteDatabase db) argument 2689 upgradeToVersion66(SQLiteDatabase db) argument 2696 upgradeToVersion64(SQLiteDatabase db) argument 2702 upgradeToVersion62(SQLiteDatabase db) argument 2783 upgradeToVersion61(SQLiteDatabase db) argument 2801 upgradeToVersion60(SQLiteDatabase db) argument 2854 upgradeToVersion59(SQLiteDatabase db) argument 2881 upgradeToVersion57(SQLiteDatabase db) argument 2904 upgradeToVersion56(SQLiteDatabase db) argument 2950 upgradeResync(SQLiteDatabase db) argument 2973 upgradeToVersion55(SQLiteDatabase db) argument 2996 upgradeToVersion54(SQLiteDatabase db) argument 3002 upgradeToVersion53(SQLiteDatabase db) argument 3012 upgradeToVersion52(SQLiteDatabase db) argument 3078 upgradeToVersion51(SQLiteDatabase db) argument 3100 dropTables(SQLiteDatabase db) argument 3159 createEventsView(SQLiteDatabase db) argument 3411 copyEventRelatedTables(SQLiteDatabase db, long newId, long id) argument [all...] |
H A D | MetaData.java | 81 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 82 db.beginTransaction(); 87 readLocked(db); 92 db.setTransactionSuccessful(); 94 db.endTransaction(); 115 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); 116 readLocked(db); 130 private void readLocked(SQLiteDatabase db) { argument 136 Cursor cursor = db.query("CalendarMetaData", sCalendarMetaDataProjection, 171 SQLiteDatabase db [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/data/ |
H A D | FilterStackDBHelper.java | 26 public static final String DATABASE_NAME = "filterstacks.db"; 59 public void onCreate(SQLiteDatabase db) { argument 60 createTable(db, FilterStack.TABLE, CREATE_FILTER_STACK); 64 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 65 dropTable(db, FilterStack.TABLE); 66 onCreate(db); 69 protected static void createTable(SQLiteDatabase db, String table, String[][] columns) { argument 83 db.beginTransaction(); 85 db.execSQL(create.toString()); 86 db 92 dropTable(SQLiteDatabase db, String table) argument [all...] |
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
H A D | ContactsTransaction.java | 98 * @param db The database to start a transaction on, if necessary. 102 public void startTransactionForDb(SQLiteDatabase db, String tag, argument 105 Log.i(AbstractContactsProvider.TAG, "startTransactionForDb: db=" + db.getPath() + 111 // Insert a new db into the head of the list, so that we'll endTransaction() in 113 mDatabasesForTransaction.add(0, db); 114 mDatabaseTagMap.put(tag, db); 116 db.beginTransactionWithListenerNonExclusive(listener); 118 db.beginTransactionNonExclusive(); 149 SQLiteDatabase db 171 getTagForDb(SQLiteDatabase db) argument [all...] |
H A D | DataRowHandlerForIdentity.java | 35 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, argument 37 final long dataId = super.insert(db, txContext, rawContactId, values); 48 public boolean update(SQLiteDatabase db, TransactionContext txContext, ContentValues values, argument 51 super.update(db, txContext, values, c, callerIsSyncAdapter, callerIsMetadataSyncAdapter); 63 public int delete(SQLiteDatabase db, TransactionContext txContext, Cursor c) { argument 64 final int count = super.delete(db, txContext, c);
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/provider/ |
H A D | RestoreDbTaskTest.java | 19 SQLiteDatabase db = new MyDatabaseHelper(23).getWritableDatabase(); 20 assertEquals(23, new RestoreDbTask().getDefaultProfileId(db)); 24 SQLiteDatabase db = new MyDatabaseHelper(42).getWritableDatabase(); 30 db.insert(Favorites.TABLE_NAME, null, values); 33 assertEquals(5, getCount(db, "select * from favorites where profileId = 42")); 35 new RestoreDbTask().migrateProfileId(db, 33); 38 assertEquals(0, getCount(db, "select * from favorites where profileId = 42")); 39 assertEquals(5, getCount(db, "select * from favorites where profileId = 33")); 45 db.insert(Favorites.TABLE_NAME, null, values); 46 assertEquals(6, getCount(db, "selec 49 getCount(SQLiteDatabase db, String sql) argument [all...] |
/packages/apps/Email/provider_src/com/android/email/provider/ |
H A D | DBHelper.java | 213 static void createMessageCountTriggers(final SQLiteDatabase db) { argument 215 db.execSQL("create trigger message_count_message_insert after insert on " + 223 db.execSQL("create trigger message_count_message_delete after delete on " + 231 db.execSQL("create trigger message_count_message_move after update of " + 242 static void createCredentialsTable(SQLiteDatabase db) { argument 249 db.execSQL("create table " + Credential.TABLE_NAME + s); 250 db.execSQL(TRIGGER_HOST_AUTH_DELETE); 253 static void dropDeleteDuplicateMessagesTrigger(final SQLiteDatabase db) { argument 254 db.execSQL("drop trigger message_delete_duplicates_on_insert"); 275 final SQLiteDatabase db) { 274 createDeleteDuplicateMessagesTrigger(final Context context, final SQLiteDatabase db) argument 298 createMessageTable(Context context, SQLiteDatabase db) argument 413 resetMessageTable(Context context, SQLiteDatabase db, int oldVersion, int newVersion) argument 439 createMessageChangeLogTableIndices(final SQLiteDatabase db, final String tableName) argument 450 createMessageChangeLogTableTriggers(final SQLiteDatabase db, final String tableName) argument 469 createMessageMoveTable(final SQLiteDatabase db) argument 485 createMessageStateChangeTable(final SQLiteDatabase db) argument 498 createAccountTable(SQLiteDatabase db) argument 526 resetAccountTable(SQLiteDatabase db, int oldVersion, int newVersion) argument 534 createPolicyTable(SQLiteDatabase db) argument 562 createHostAuthTable(SQLiteDatabase db) argument 579 resetHostAuthTable(SQLiteDatabase db, int oldVersion, int newVersion) argument 588 createMailboxTable(SQLiteDatabase db) argument 625 resetMailboxTable(SQLiteDatabase db, int oldVersion, int newVersion) argument 633 createAttachmentTable(SQLiteDatabase db) argument 656 resetAttachmentTable(SQLiteDatabase db, int oldVersion, int newVersion) argument 664 createQuickResponseTable(SQLiteDatabase db) argument 673 createBodyTable(SQLiteDatabase db) argument 688 upgradeBodyToVersion5(final SQLiteDatabase db) argument 699 upgradeBodyFromVersion5ToVersion6(final SQLiteDatabase db) argument 709 upgradeBodyFromVersion6ToVersion8(final SQLiteDatabase db) argument 722 upgradeBodyFromVersion100ToVersion101(final Context context, final SQLiteDatabase db) argument 800 onCreate(SQLiteDatabase db) argument 806 onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) argument 822 onOpen(SQLiteDatabase db) argument 828 recalculateMessageCount(SQLiteDatabase db) argument 844 onCreate(SQLiteDatabase db) argument 860 onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 870 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 1475 onOpen(SQLiteDatabase db) argument 1491 convertPolicyFlagsToPolicyTable(SQLiteDatabase db) argument 1514 upgradeFromVersion17ToVersion18(SQLiteDatabase db) argument 1598 upgradeFromVersion21ToVersion22(SQLiteDatabase db, Context accountManagerContext) argument 1602 migrateLegacyAccounts(SQLiteDatabase db, Context accountManagerContext) argument 1666 upgradeFromVersion22ToVersion23(SQLiteDatabase db) argument 1677 upgradeFromVersion23ToVersion24(SQLiteDatabase db) argument 1688 upgradeFromVersion24ToVersion25(SQLiteDatabase db) argument 1707 upgradeFromVersion25ToVersion26(SQLiteDatabase db) argument 1762 upgradeFromVersion29ToVersion30(SQLiteDatabase db) argument 1788 upgradeFromVersion125ToVersion126(SQLiteDatabase db) argument 1817 upgradeFromVersion126ToVersion127(final Context context, final SQLiteDatabase db) argument 1843 upgradeToEmail2(SQLiteDatabase db) argument [all...] |
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
H A D | DatabaseUpgradeHelper.java | 28 public void doOnUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) { argument 36 doUpgradeWithExceptions(db, oldVersion, newVersion); 39 LogUtil.e(TAG, "Failed to perform db upgrade from version " + 41 DatabaseHelper.rebuildTables(db); 45 public void doUpgradeWithExceptions(final SQLiteDatabase db, final int oldVersion, argument 49 currentVersion = upgradeToVersion2(db); 53 DatabaseHelper.dropAllViews(db); 54 DatabaseHelper.rebuildAllViews(new DatabaseWrapper(context, db)); 59 private int upgradeToVersion2(final SQLiteDatabase db) { argument 60 db 92 onDowngrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) argument [all...] |
/packages/apps/Car/Radio/src/com/android/car/radio/ |
H A D | RadioDatabase.java | 155 SQLiteDatabase db = getReadableDatabase(); 159 db.beginTransaction(); 161 cursor = db.rawQuery(GET_ALL_PRESETS, null /* selectionArgs */); 180 db.setTransactionSuccessful(); 186 db.endTransaction(); 187 db.close(); 213 SQLiteDatabase db = getWritableDatabase(); 216 db.beginTransaction(); 218 status = db.insertWithOnConflict(RadioPresetsTable.NAME, null /* nullColumnHack */, 221 db 376 onCreate(SQLiteDatabase db) argument 382 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument 399 onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) argument [all...] |
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
H A D | CalendarDatabaseHelperTest.java | 49 protected void bootstrapDbVersion50(SQLiteDatabase db) { argument 53 syncStateHelper.createDatabase(db); 55 db.execSQL("CREATE TABLE Calendars (" + 77 db.execSQL("CREATE TRIGGER calendar_cleanup DELETE ON Calendars " + 84 db.execSQL("CREATE TABLE Events (" + 121 db.execSQL("CREATE INDEX eventsCalendarIdIndex ON Events (calendar_id);"); 123 db.execSQL("CREATE TABLE EventsRawTimes (" + 136 db.execSQL("CREATE TABLE DeletedEvents (" + 143 db.execSQL("CREATE TABLE Instances (" + 155 db 272 createVersion67EventsTable(SQLiteDatabase db) argument [all...] |
/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
H A D | SearchRecentSuggestionsProvider.java | 41 private static final String DATABASE_NAME = "suggestions.db"; 102 public void onCreate(SQLiteDatabase db) { argument 109 db.execSQL(create); 113 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 121 db.execSQL("DROP TABLE IF EXISTS suggestions"); 122 onCreate(db); 146 final SQLiteDatabase db = getDatabase(true /* readOnly */); 147 if (db != null) { 159 // db could have been closed due to cleanup, simply don't do anything. 160 return db [all...] |
/packages/providers/ContactsProvider/src/com/android/providers/contacts/database/ |
H A D | ContactsTableUtil.java | 41 * @param db The sqlite database instance. 43 public static void createIndexes(SQLiteDatabase db) { argument 46 db.execSQL("CREATE INDEX contacts_has_phone_index ON " + table + " (" + 50 db.execSQL("CREATE INDEX contacts_name_raw_contact_id_index ON " + table + " (" + 54 db.execSQL(MoreDatabaseUtils.buildCreateIndexSql(table, 58 public static void updateContactLastUpdateByContactId(SQLiteDatabase db, long contactId) { argument 62 db.update(Tables.CONTACTS, values, Contacts._ID + " = ?", 69 * @param db The sqlite database instance. 72 public static void updateContactLastUpdateByRawContactId(SQLiteDatabase db, argument 78 db 112 deleteContact(SQLiteDatabase db, long contactId) argument 121 deleteContactIfSingleton(SQLiteDatabase db, long rawContactId) argument [all...] |
H A D | DeletedContactsTableUtil.java | 34 * @param db The sqlite database instance. 36 public static void create(SQLiteDatabase db) { argument 38 db.execSQL("CREATE TABLE " + ContactsDatabaseHelper.Tables.DELETED_CONTACTS + " (" + 44 db.execSQL(MoreDatabaseUtils.buildCreateIndexSql( 52 * @param db The SQLiteDatabase instance. 56 public static long insertDeletedContact(SQLiteDatabase db, long contactId) { argument 62 return db.insertWithOnConflict(ContactsDatabaseHelper.Tables.DELETED_CONTACTS, null, values, 69 * @param db The database instance to use. 71 public static int deleteOldLogs(SQLiteDatabase db) { argument 78 return db [all...] |
/packages/apps/Launcher3/src/com/android/launcher3/provider/ |
H A D | LauncherDbUtils.java | 47 public static boolean prepareScreenZeroToHostQsb(Context context, SQLiteDatabase db) { argument 48 try (SQLiteTransaction t = new SQLiteTransaction(db)) { 50 ArrayList<Long> screenIds = getScreenIdsFromCursor(db.query(WorkspaceScreens.TABLE_NAME, 64 renameScreen(db, 0, newScreenId); 68 renameScreen(db, screenIds.get(0), 0); 72 if (DatabaseUtils.queryNumEntries(db, Favorites.TABLE_NAME, 79 new LossyScreenMigrationTask(context, LauncherAppState.getIDP(context), db) 89 private static void renameScreen(SQLiteDatabase db, long oldScreen, long newScreen) { argument 94 db.update(WorkspaceScreens.TABLE_NAME, values, "_id = ?", whereParams); 98 db 127 SQLiteTransaction(SQLiteDatabase db) argument [all...] |
H A D | RestoreDbTask.java | 50 SQLiteDatabase db = helper.getWritableDatabase(); 51 try (SQLiteTransaction t = new SQLiteTransaction(db)) { 52 new RestoreDbTask().sanitizeDB(helper, db); 56 FileLog.e(TAG, "Failed to verify db", e); 70 private void sanitizeDB(DatabaseHelper helper, SQLiteDatabase db) throws Exception { argument 71 long oldProfileId = getDefaultProfileId(db); 73 int itemsDeleted = db.delete( 84 db.update(Favorites.TABLE_NAME, values, null, null); 91 db.update(Favorites.TABLE_NAME, values, "itemType = ?", 97 migrateProfileId(db, myProfileI 104 migrateProfileId(SQLiteDatabase db, long newProfileId) argument 120 getDefaultProfileId(SQLiteDatabase db) argument [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
H A D | PrivateLog.java | 72 public void onCreate(SQLiteDatabase db) { argument 74 db.execSQL(LOG_TABLE_CREATE); 75 insert(db, "Created table"); 79 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 82 db.execSQL("DROP TABLE IF EXISTS " + LOG_TABLE_NAME); 83 onCreate(db); 84 insert(db, "Upgrade finished"); 87 static void insert(SQLiteDatabase db, String event) { argument 92 db.insert(LOG_TABLE_NAME, null, c);
|
/packages/providers/BlockedNumberProvider/src/com/android/providers/blockednumber/ |
H A D | BlockedNumberDatabaseHelper.java | 29 private static final String DATABASE_NAME = "blockednumbers.db"; 52 public void onCreate(SQLiteDatabase db) { argument 53 createTables(db); 57 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 59 db.execSQL("DROP TABLE IF EXISTS blocked"); 60 createTables(db); 64 private void createTables(SQLiteDatabase db) { argument 65 db.execSQL("CREATE TABLE " + Tables.BLOCKED_NUMBERS + " (" + 71 db.execSQL("CREATE INDEX blocked_number_idx_original ON " + Tables.BLOCKED_NUMBERS + 73 db [all...] |
/packages/apps/Gallery2/src/com/android/photos/data/ |
H A D | PhotoDatabase.java | 87 public void onCreate(SQLiteDatabase db) { argument 88 createTable(db, Accounts.TABLE, getAccountTableDefinition()); 89 createTable(db, Albums.TABLE, getAlbumTableDefinition()); 90 createTable(db, Photos.TABLE, getPhotoTableDefinition()); 91 createTable(db, Metadata.TABLE, getMetadataTableDefinition()); 103 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 104 recreate(db); 108 public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument 109 recreate(db); 112 private void recreate(SQLiteDatabase db) { argument 136 createTable(SQLiteDatabase db, String table, List<String[]> columns) argument 186 dropTable(SQLiteDatabase db, String table) argument [all...] |
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/ |
H A D | OpenWnnSQLiteOpenHelper.java | 38 public void onCreate(SQLiteDatabase db) { argument 42 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument
|
/packages/apps/DeskClock/src/com/android/deskclock/provider/ |
H A D | ClockDatabaseHelper.java | 67 static final String DATABASE_NAME = "alarms.db"; 73 private static void createAlarmsTable(SQLiteDatabase db) { argument 74 db.execSQL("CREATE TABLE " + ALARMS_TABLE_NAME + " (" + 87 private static void createInstanceTable(SQLiteDatabase db) { argument 88 db.execSQL("CREATE TABLE " + INSTANCES_TABLE_NAME + " (" + 111 public void onCreate(SQLiteDatabase db) { argument 112 createAlarmsTable(db); 113 createInstanceTable(db); 127 db.execSQL(insertMe + DEFAULT_ALARM_1); 128 db 132 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument [all...] |