Home
last modified time | relevance | path

Searched refs:newDb (Results 1 – 7 of 7) sorted by relevance

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/shared/
DSharedDbHelperTest.java174 SQLiteDatabase newDb = sharedDbHelper.safeGetWritableDatabase(); in testMigrationDataIntegrityToV1FromOldDatabase() local
179 DbTestUtil.assertDatabasesEqual(referenceLatestDb, newDb); in testMigrationDataIntegrityToV1FromOldDatabase()
180 assertEquals(SharedDbHelper.DATABASE_VERSION_V3, newDb.getVersion()); in testMigrationDataIntegrityToV1FromOldDatabase()
181 verifyDataInDb(newDb, fakeData); in testMigrationDataIntegrityToV1FromOldDatabase()
182 emptyTables(newDb, EnrollmentTables.ENROLLMENT_TABLES); in testMigrationDataIntegrityToV1FromOldDatabase()
205 SQLiteDatabase newDb = sharedDbHelper.safeGetWritableDatabase(); in testMigrationExcludesDuplicatesSites() local
210 DbTestUtil.assertDatabasesEqual(referenceLatestDb, newDb); in testMigrationExcludesDuplicatesSites()
211 assertEquals(SharedDbHelper.DATABASE_VERSION_V3, newDb.getVersion()); in testMigrationExcludesDuplicatesSites()
212 verifyDataInDb(newDb, postFakeData); in testMigrationExcludesDuplicatesSites()
213 emptyTables(newDb, EnrollmentTables.ENROLLMENT_TABLES); in testMigrationExcludesDuplicatesSites()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/shared/
DSharedDbHelper.java232 private void copyOrMigrateTable(SQLiteDatabase oldDb, SQLiteDatabase newDb, String table) { in copyOrMigrateTable() argument
238 migrateEnrollmentTable(oldDb, newDb, table); in copyOrMigrateTable()
241 copyTable(oldDb, newDb, table); in copyOrMigrateTable()
245 private void copyTable(SQLiteDatabase oldDb, SQLiteDatabase newDb, String table) { in copyTable() argument
250 newDb.insert(table, null, contentValues); in copyTable()
255 private void migrateEnrollmentTable(SQLiteDatabase oldDb, SQLiteDatabase newDb, String table) { in migrateEnrollmentTable() argument
266 newDb.insert(table, null, contentValues); in migrateEnrollmentTable()
278 newDb.insert(table, null, enrollment); in migrateEnrollmentTable()
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastDatabaseHelper.java183 File newDb = mContext.getDatabasePath(DATABASE_NAME_V13); in tryToMigrateV13() local
191 if (!newDb.exists() || oldDb.lastModified() > newDb.lastModified()) { in tryToMigrateV13()
195 if (newDb.exists()) newDb.delete(); in tryToMigrateV13()
196 copy(oldDb.toPath(), newDb.toPath()); in tryToMigrateV13()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/migration/
DMigrationTestHelper.java73 SQLiteDatabase newDb, Map<String, List<ContentValues>> fakeData) { in verifyDataInDb() argument
74 verifyDataInDb(newDb, fakeData, ImmutableMap.of(), ImmutableMap.of()); in verifyDataInDb()
85 SQLiteDatabase newDb, in verifyDataInDb() argument
93 newDb.query(table, null, null, null, null, null, null, null)) { in verifyDataInDb()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/shared/migration/
DMigrationTestHelper.java68 SQLiteDatabase newDb, Map<String, List<ContentValues>> fakeData) { in verifyDataInDb() argument
69 verifyDataInDb(newDb, fakeData, ImmutableMap.of(), ImmutableMap.of()); in verifyDataInDb()
79 SQLiteDatabase newDb, in verifyDataInDb() argument
87 newDb.query(table, null, null, null, null, null, null, null)) { in verifyDataInDb()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/
DMeasurementDbHelperTest.java135 SQLiteDatabase newDb = measurementDbHelper.safeGetWritableDatabase(); in testMigrationDataIntegrityToV6FromOldDatabase() local
142 DbTestUtil.assertDatabasesEqual(referenceLatestDb, newDb); in testMigrationDataIntegrityToV6FromOldDatabase()
143 assertEquals(MeasurementDbHelper.OLD_DATABASE_FINAL_VERSION, newDb.getVersion()); in testMigrationDataIntegrityToV6FromOldDatabase()
144 verifyDataInDb(newDb, fakeData); in testMigrationDataIntegrityToV6FromOldDatabase()
145 emptyTables(newDb, MeasurementTables.V6_TABLES); in testMigrationDataIntegrityToV6FromOldDatabase()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/measurement/
DMeasurementDbHelper.java248 private void copyTable(SQLiteDatabase oldDb, SQLiteDatabase newDb, String table) { in copyTable() argument
253 newDb.insert(table, null, contentValues); in copyTable()