/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
D | MmsSmsDatabaseHelper.java | 279 private static void removeUnferencedCanonicalAddresses(SQLiteDatabase db) { in removeUnferencedCanonicalAddresses() argument 280 Cursor c = db.query(MmsSmsProvider.TABLE_THREADS, new String[] { "recipient_ids" }, in removeUnferencedCanonicalAddresses() 286 int rows = db.delete("canonical_addresses", null, null); in removeUnferencedCanonicalAddresses() 312 int rows = db.delete("canonical_addresses", sb.toString(), null); in removeUnferencedCanonicalAddresses() 320 public static void updateThread(SQLiteDatabase db, long thread_id) { in updateThread() argument 322 updateAllThreads(db, null, null); in updateThread() 326 db.beginTransaction(); in updateThread() 331 int rows = db.delete(MmsSmsProvider.TABLE_THREADS, in updateThread() 338 removeUnferencedCanonicalAddresses(db); in updateThread() 342 db.execSQL( in updateThread() [all …]
|
D | TelephonyProvider.java | 216 public void onCreate(SQLiteDatabase db) { in onCreate() argument 217 if (DBG) log("dbh.onCreate:+ db=" + db); in onCreate() 218 createSimInfoTable(db); in onCreate() 219 createCarriersTable(db, CARRIERS_TABLE); in onCreate() 220 initDatabase(db); in onCreate() 221 if (DBG) log("dbh.onCreate:- db=" + db); in onCreate() 225 public void onOpen(SQLiteDatabase db) { in onOpen() argument 226 if (VDBG) log("dbh.onOpen:+ db=" + db); in onOpen() 229 db.query(SIMINFO_TABLE, null, null, null, null, null, null); in onOpen() 234 createSimInfoTable(db); in onOpen() [all …]
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarDatabaseHelper.java | 326 public void onOpen(SQLiteDatabase db) { in onOpen() argument 327 mSyncState.onDatabaseOpened(db); in onOpen() 329 mCalendarsInserter = new DatabaseUtils.InsertHelper(db, Tables.CALENDARS); in onOpen() 330 mColorsInserter = new DatabaseUtils.InsertHelper(db, Tables.COLORS); in onOpen() 331 mEventsInserter = new DatabaseUtils.InsertHelper(db, Tables.EVENTS); in onOpen() 332 mEventsRawTimesInserter = new DatabaseUtils.InsertHelper(db, Tables.EVENTS_RAW_TIMES); in onOpen() 333 mInstancesInserter = new DatabaseUtils.InsertHelper(db, Tables.INSTANCES); in onOpen() 334 mAttendeesInserter = new DatabaseUtils.InsertHelper(db, Tables.ATTENDEES); in onOpen() 335 mRemindersInserter = new DatabaseUtils.InsertHelper(db, Tables.REMINDERS); in onOpen() 336 mCalendarAlertsInserter = new DatabaseUtils.InsertHelper(db, Tables.CALENDAR_ALERTS); in onOpen() [all …]
|
D | MetaData.java | 81 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in getFields() local 82 db.beginTransaction(); in getFields() 87 readLocked(db); in getFields() 92 db.setTransactionSuccessful(); in getFields() 94 db.endTransaction(); in getFields() 115 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in getFieldsLocked() local 116 readLocked(db); in getFieldsLocked() 130 private void readLocked(SQLiteDatabase db) { in readLocked() argument 136 Cursor cursor = db.query("CalendarMetaData", sCalendarMetaDataProjection, in readLocked() 171 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in write() local [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | ContactsDatabaseHelper.java | 1070 private void refreshDatabaseCaches(SQLiteDatabase db) { in refreshDatabaseCaches() argument 1088 initializeCache(db); in refreshDatabaseCaches() 1096 private void initializeCache(SQLiteDatabase db) { in initializeCache() argument 1103 mMimeTypeIdEmail = lookupMimeTypeId(Email.CONTENT_ITEM_TYPE, db); in initializeCache() 1104 mMimeTypeIdIm = lookupMimeTypeId(Im.CONTENT_ITEM_TYPE, db); in initializeCache() 1105 mMimeTypeIdNickname = lookupMimeTypeId(Nickname.CONTENT_ITEM_TYPE, db); in initializeCache() 1106 mMimeTypeIdOrganization = lookupMimeTypeId(Organization.CONTENT_ITEM_TYPE, db); in initializeCache() 1107 mMimeTypeIdPhone = lookupMimeTypeId(Phone.CONTENT_ITEM_TYPE, db); in initializeCache() 1108 mMimeTypeIdSip = lookupMimeTypeId(SipAddress.CONTENT_ITEM_TYPE, db); in initializeCache() 1109 mMimeTypeIdStructuredName = lookupMimeTypeId(StructuredName.CONTENT_ITEM_TYPE, db); in initializeCache() [all …]
|
D | ContactsTransaction.java | 102 public void startTransactionForDb(SQLiteDatabase db, String tag, in startTransactionForDb() argument 105 Log.i(AbstractContactsProvider.TAG, "startTransactionForDb: db=" + db.getPath() + in startTransactionForDb() 113 mDatabasesForTransaction.add(0, db); in startTransactionForDb() 114 mDatabaseTagMap.put(tag, db); in startTransactionForDb() 116 db.beginTransactionWithListener(listener); in startTransactionForDb() 118 db.beginTransaction(); in startTransactionForDb() 149 SQLiteDatabase db = mDatabaseTagMap.get(tag); in removeDbForTag() local 151 mDatabasesForTransaction.remove(db); in removeDbForTag() 152 return db; in removeDbForTag() 162 for (SQLiteDatabase db : mDatabasesForTransaction) { in markSuccessful() [all …]
|
D | DataRowHandlerForGroupMembership.java | 75 public long insert(SQLiteDatabase db, TransactionContext txContext, long rawContactId, in insert() argument 77 resolveGroupSourceIdInValues(txContext, rawContactId, db, values, true); in insert() 78 long dataId = super.insert(db, txContext, rawContactId, values); in insert() 79 if (hasFavoritesGroupMembership(db, rawContactId)) { in insert() 80 updateRawContactsStar(db, rawContactId, true /* starred */); in insert() 87 public boolean update(SQLiteDatabase db, TransactionContext txContext, ContentValues values, in update() argument 90 boolean wasStarred = hasFavoritesGroupMembership(db, rawContactId); in update() 91 resolveGroupSourceIdInValues(txContext, rawContactId, db, values, false); in update() 92 … if (!super.update(db, txContext, values, c, callerIsSyncAdapter, callerIsMetadataSyncAdapter)) { in update() 95 boolean isStarred = hasFavoritesGroupMembership(db, rawContactId); in update() [all …]
|
D | ContactMetadataProvider.java | 155 final SQLiteDatabase db = mDbHelper.getReadableDatabase(); in query() local 156 return qb.query(db, projection, selectionBuilder.build(), selectionArgs, null, in query() 183 final SQLiteDatabase db = mDbHelper.getWritableDatabase(); in insert() local 184 db.beginTransaction(); in insert() 191 final long metadataSyncId = updateOrInsertDataToMetadataSync(db, uri, values); in insert() 192 db.setTransactionSuccessful(); in insert() 196 final Long syncStateId = db.replace( in insert() 198 db.setTransactionSuccessful(); in insert() 205 db.endTransaction(); in insert() 214 final SQLiteDatabase db = mDbHelper.getWritableDatabase(); in delete() local [all …]
|
/packages/apps/Email/provider_src/com/android/email/provider/ |
D | DBHelper.java | 213 static void createMessageCountTriggers(final SQLiteDatabase db) { in createMessageCountTriggers() argument 215 db.execSQL("create trigger message_count_message_insert after insert on " + in createMessageCountTriggers() 223 db.execSQL("create trigger message_count_message_delete after delete on " + in createMessageCountTriggers() 231 db.execSQL("create trigger message_count_message_move after update of " + in createMessageCountTriggers() 242 static void createCredentialsTable(SQLiteDatabase db) { in createCredentialsTable() argument 249 db.execSQL("create table " + Credential.TABLE_NAME + s); in createCredentialsTable() 250 db.execSQL(TRIGGER_HOST_AUTH_DELETE); in createCredentialsTable() 253 static void dropDeleteDuplicateMessagesTrigger(final SQLiteDatabase db) { in dropDeleteDuplicateMessagesTrigger() argument 254 db.execSQL("drop trigger message_delete_duplicates_on_insert"); in dropDeleteDuplicateMessagesTrigger() 275 final SQLiteDatabase db) { in createDeleteDuplicateMessagesTrigger() argument [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaProvider.java | 281 SQLiteDatabase db = database.getWritableDatabase(); 290 db.beginTransaction(); 292 db.update("files", values, where, whereArgs); 295 int numpurged = db.delete("files", where, whereArgs); 296 logToDb(db, "removed " + numpurged + 298 db.setTransactionSuccessful(); 300 db.endTransaction(); 390 public void onCreate(final SQLiteDatabase db) { in onCreate() argument 391 updateDatabase(mContext, db, mInternal, 0, getDatabaseVersion(mContext)); in onCreate() 399 public void onUpgrade(final SQLiteDatabase db, final int oldV, final int newV) { in onUpgrade() argument [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | LauncherProvider.java | 133 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in query() local 134 Cursor result = qb.query(db, projection, args.where, args.args, null, null, sortOrder); in query() 141 SQLiteDatabase db, String table, String nullColumnHack, ContentValues values) { in dbInsertAndCheck() argument 149 return db.insert(table, nullColumnHack, values); in dbInsertAndCheck() 172 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local 174 final long rowId = dbInsertAndCheck(mOpenHelper, db, args.table, null, initialValues); in insert() 202 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in bulkInsert() local 203 db.beginTransaction(); in bulkInsert() 208 if (dbInsertAndCheck(mOpenHelper, db, args.table, null, values[i]) < 0) { in bulkInsert() 212 db.setTransactionSuccessful(); in bulkInsert() [all …]
|
/packages/apps/Dialer/src/com/android/dialer/database/ |
D | DialerDatabaseHelper.java | 391 public void onCreate(SQLiteDatabase db) { in onCreate() argument 392 setupTables(db); in onCreate() 395 private void setupTables(SQLiteDatabase db) { in setupTables() argument 396 dropTables(db); in setupTables() 397 db.execSQL("CREATE TABLE " + Tables.SMARTDIAL_TABLE + " (" in setupTables() 415 db.execSQL("CREATE TABLE " + Tables.PREFIX_TABLE + " (" in setupTables() 421 db.execSQL("CREATE TABLE " + Tables.PROPERTIES + " (" in setupTables() 429 db.execSQL("CREATE TABLE " + Tables.FILTERED_NUMBER_TABLE + " (" in setupTables() 441 createVoicemailArchiveTable(db); in setupTables() 442 setProperty(db, DATABASE_VERSION_PROPERTY, String.valueOf(DATABASE_VERSION)); in setupTables() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/ |
D | ContactAggregator.java | 79 synchronized void aggregateContact(TransactionContext txContext, SQLiteDatabase db, in aggregateContact() argument 104 contactId = pickBestMatchBasedOnExceptions(db, rawContactId, matcher); in aggregateContact() 110 || mDbHelper.isContactInDefaultDirectory(db, currentContactId)) { in aggregateContact() 111 contactId = pickBestMatchBasedOnData(db, rawContactId, candidates, matcher); in aggregateContact() 125 final Cursor rawContactsToAccountsCursor = db.rawQuery( in aggregateContact() 155 actionCode = canJoinIntoContact(db, rawContactId, in aggregateContact() 190 markAggregated(db, String.valueOf(rawContactId)); in aggregateContact() 196 createContactForRawContacts(db, txContext, Sets.newHashSet(rawContactId), null); in aggregateContact() 212 reAggregateRawContacts(txContext, db, contactId, currentContactId, rawContactId, in aggregateContact() 221 ContactsTableUtil.deleteContact(db, currentContactId); in aggregateContact() [all …]
|
D | ContactAggregator2.java | 91 synchronized void aggregateContact(TransactionContext txContext, SQLiteDatabase db, in aggregateContact() argument 95 if (!needAggregate(db, rawContactId)) { in aggregateContact() 119 || mDbHelper.isContactInDefaultDirectory(db, currentContactId)) { in aggregateContact() 121 matchingCandidates = findRawContactMatchingCandidates(db, rawContactId, candidates, in aggregateContact() 169 markAggregated(db, String.valueOf(rawContactId)); in aggregateContact() 175 createContactForRawContacts(db, txContext, Sets.newHashSet(rawContactId), null); in aggregateContact() 179 markAggregated(db, String.valueOf(rawContactId)); in aggregateContact() 186 reAggregateRawContacts(txContext, db, currentContactId, rawContactId, accountId, in aggregateContact() 191 private boolean needAggregate(SQLiteDatabase db, long rawContactId) { in needAggregate() argument 197 final Cursor cursor = db.rawQuery(sql, mSelectionArgs1); in needAggregate() [all …]
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarDatabaseHelperTest.java | 49 protected void bootstrapDbVersion50(SQLiteDatabase db) { in bootstrapDbVersion50() argument 53 syncStateHelper.createDatabase(db); in bootstrapDbVersion50() 55 db.execSQL("CREATE TABLE Calendars (" + in bootstrapDbVersion50() 77 db.execSQL("CREATE TRIGGER calendar_cleanup DELETE ON Calendars " + in bootstrapDbVersion50() 84 db.execSQL("CREATE TABLE Events (" + in bootstrapDbVersion50() 121 db.execSQL("CREATE INDEX eventsCalendarIdIndex ON Events (calendar_id);"); in bootstrapDbVersion50() 123 db.execSQL("CREATE TABLE EventsRawTimes (" + in bootstrapDbVersion50() 136 db.execSQL("CREATE TABLE DeletedEvents (" + in bootstrapDbVersion50() 143 db.execSQL("CREATE TABLE Instances (" + in bootstrapDbVersion50() 155 db.execSQL("CREATE INDEX instancesStartDayIndex ON Instances (startDay);"); in bootstrapDbVersion50() [all …]
|
/packages/apps/Settings/src/com/android/settings/search/ |
D | IndexDatabaseHelper.java | 153 public void onCreate(SQLiteDatabase db) { in onCreate() argument 154 bootstrapDB(db); in onCreate() 157 private void bootstrapDB(SQLiteDatabase db) { in bootstrapDB() argument 158 db.execSQL(CREATE_INDEX_TABLE); in bootstrapDB() 159 db.execSQL(CREATE_META_TABLE); in bootstrapDB() 160 db.execSQL(CREATE_SAVED_QUERIES_TABLE); in bootstrapDB() 161 db.execSQL(INSERT_BUILD_VERSION); in bootstrapDB() 166 public void onOpen(SQLiteDatabase db) { in onOpen() argument 167 super.onOpen(db); in onOpen() 169 Log.i(TAG, "Using schema version: " + db.getVersion()); in onOpen() [all …]
|
/packages/apps/Gallery2/src/com/android/photos/data/ |
D | PhotoDatabase.java | 87 public void onCreate(SQLiteDatabase db) { in onCreate() argument 88 createTable(db, Accounts.TABLE, getAccountTableDefinition()); in onCreate() 89 createTable(db, Albums.TABLE, getAlbumTableDefinition()); in onCreate() 90 createTable(db, Photos.TABLE, getPhotoTableDefinition()); in onCreate() 91 createTable(db, Metadata.TABLE, getMetadataTableDefinition()); in onCreate() 103 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument 104 recreate(db); in onUpgrade() 108 public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onDowngrade() argument 109 recreate(db); in onDowngrade() 112 private void recreate(SQLiteDatabase db) { in recreate() argument [all …]
|
D | SQLiteContentProvider.java | 121 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local 122 db.beginTransaction(); in insert() 125 db.setTransactionSuccessful(); in insert() 127 db.endTransaction(); in insert() 141 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in bulkInsert() local 142 db.beginTransaction(); in bulkInsert() 147 db.yieldIfContendedSafely(); in bulkInsert() 149 db.setTransactionSuccessful(); in bulkInsert() 151 db.endTransaction(); in bulkInsert() 164 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in update() local [all …]
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | LauncherProvider.java | 126 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in query() local 127 Cursor result = qb.query(db, projection, args.where, args.args, null, null, sortOrder); in query() 134 SQLiteDatabase db, String table, String nullColumnHack, ContentValues values) { in dbInsertAndCheck() argument 138 return db.insert(table, nullColumnHack, values); in dbInsertAndCheck() 141 private static void deleteId(SQLiteDatabase db, long id) { in deleteId() argument 144 db.delete(args.table, args.where, args.args); in deleteId() 151 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local 152 final long rowId = dbInsertAndCheck(mOpenHelper, db, args.table, null, initialValues); in insert() 165 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in bulkInsert() local 166 db.beginTransaction(); in bulkInsert() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | MetadataDbHelper.java | 205 private void createClientTable(final SQLiteDatabase db) { in createClientTable() argument 208 db.execSQL(METADATA_CREATE_CLIENT_TABLE); in createClientTable() 215 db.insert(CLIENT_TABLE_NAME, null, defaultMetadataValues); in createClientTable() 227 public void onCreate(final SQLiteDatabase db) { in onCreate() argument 228 db.execSQL(METADATA_TABLE_CREATE); in onCreate() 229 createClientTable(db); in onCreate() 232 private static void addRawChecksumColumnUnlessPresent(final SQLiteDatabase db) { in addRawChecksumColumnUnlessPresent() argument 234 db.execSQL("SELECT " + RAW_CHECKSUM_COLUMN + " FROM " in addRawChecksumColumnUnlessPresent() 238 db.execSQL("ALTER TABLE " + METADATA_TABLE_NAME + " ADD COLUMN " in addRawChecksumColumnUnlessPresent() 243 private static void addRetryCountColumnUnlessPresent(final SQLiteDatabase db) { in addRetryCountColumnUnlessPresent() argument [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/provider/ |
D | ClockDatabaseHelper.java | 72 private static void createAlarmsTable(SQLiteDatabase db) { in createAlarmsTable() argument 73 db.execSQL("CREATE TABLE " + ALARMS_TABLE_NAME + " (" + in createAlarmsTable() 86 private static void createInstanceTable(SQLiteDatabase db) { in createInstanceTable() argument 87 db.execSQL("CREATE TABLE " + INSTANCES_TABLE_NAME + " (" + in createInstanceTable() 110 public void onCreate(SQLiteDatabase db) { in onCreate() argument 111 createAlarmsTable(db); in onCreate() 112 createInstanceTable(db); in onCreate() 126 db.execSQL(insertMe + DEFAULT_ALARM_1); in onCreate() 127 db.execSQL(insertMe + DEFAULT_ALARM_2); in onCreate() 131 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { in onUpgrade() argument [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/data/ |
D | FilterStackDBHelper.java | 59 public void onCreate(SQLiteDatabase db) { in onCreate() argument 60 createTable(db, FilterStack.TABLE, CREATE_FILTER_STACK); in onCreate() 64 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument 65 dropTable(db, FilterStack.TABLE); in onUpgrade() 66 onCreate(db); in onUpgrade() 69 protected static void createTable(SQLiteDatabase db, String table, String[][] columns) { in createTable() argument 83 db.beginTransaction(); in createTable() 85 db.execSQL(create.toString()); in createTable() 86 db.setTransactionSuccessful(); in createTable() 88 db.endTransaction(); in createTable() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/ |
D | SyncMessageBatch.java | 80 final DatabaseWrapper db = DataModel.get().getDatabase(); in updateLocalDatabase() local 81 db.beginTransaction(); in updateLocalDatabase() 85 storeSms(db, sms); in updateLocalDatabase() 89 storeMms(db, mms); in updateLocalDatabase() 96 batchDelete(db, DatabaseHelper.MESSAGES_TABLE, MessageColumns._ID, in updateLocalDatabase() 108 updateConversations(db); in updateLocalDatabase() 110 db.setTransactionSuccessful(); in updateLocalDatabase() 112 db.endTransaction(); in updateLocalDatabase() 129 private void storeSms(final DatabaseWrapper db, final SmsMessage sms) { in storeSms() argument 150 final String conversationId = mCache.getOrCreateConversation(db, sms.mThreadId, sms.mSubId, in storeSms() [all …]
|
D | InsertNewMessageAction.java | 131 final DatabaseWrapper db = DataModel.get().getDatabase(); in executeAction() local 134 final ParticipantData self = getSelf(db, conversationId, message); in executeAction() 148 BugleDatabaseOperations.getRecipientsForConversation(db, conversationId); in executeAction() 176 BugleDatabaseOperations.updateDraftMessageData(db, conversationId, in executeAction() 186 BugleDatabaseOperations.updateDraftMessageData(db, conversationId, in executeAction() 196 final DatabaseWrapper db, final String conversationId, final MessageData message) { in getSelf() argument 204 self = BugleDatabaseOperations.getOrCreateSelf(db, requestedSubId); in getSelf() 212 ConversationListItemData.getExistingConversation(db, conversationId); in getSelf() 226 db, selfId); in getSelf() 230 self = BugleDatabaseOperations.getOrCreateSelf(db, defaultSubId); in getSelf() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/sms/ |
D | ApnDatabase.java | 172 public void onCreate(final SQLiteDatabase db) { in onCreate() argument 177 rebuildTables(db); in onCreate() 185 public static List<ContentValues> loadUserDataFromOldTable(final SQLiteDatabase db) { in loadUserDataFromOldTable() argument 188 cursor = db.query(APN_TABLE, in loadUserDataFromOldTable() 222 final SQLiteDatabase db, final List<ContentValues> data) { in saveUserDataFromOldTable() argument 247 cursor = db.query(APN_TABLE, in saveUserDataFromOldTable() 253 db.update(APN_TABLE, row, ID_SELECTION, new String[]{cursor.getString(0)}); in saveUserDataFromOldTable() 261 db.insert(APN_TABLE, null/*nullColumnHack*/, row); in saveUserDataFromOldTable() 289 public void onOpen(final SQLiteDatabase db) { in onOpen() argument 290 super.onOpen(db); in onOpen() [all …]
|