Home
last modified time | relevance | path

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

/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/
DExternalDbFacadeTest.java104 private static Context sIsolatedContext; field in ExternalDbFacadeTest
109 sIsolatedContext = new IsolatedContext(context, TAG, /*asFuseThread*/ false); in setUp()
114 try (DatabaseHelper helper = new TestDatabaseHelper(sIsolatedContext)) { in testDeletedMedia_addAndRemove()
115 ExternalDbFacade facade = new ExternalDbFacade(sIsolatedContext, helper, in testDeletedMedia_addAndRemove()
200 try (DatabaseHelper helper = new TestDatabaseHelper(sIsolatedContext)) { in testDeletedMedia_onInsert()
201 ExternalDbFacade facade = new ExternalDbFacade(sIsolatedContext, helper, in testDeletedMedia_onInsert()
237 try (DatabaseHelper helper = new TestDatabaseHelper(sIsolatedContext)) { in testDeletedMedia_onUpdate_mediaType()
238 ExternalDbFacade facade = new ExternalDbFacade(sIsolatedContext, helper, in testDeletedMedia_onUpdate_mediaType()
315 try (DatabaseHelper helper = new TestDatabaseHelper(sIsolatedContext)) { in testDeletedMedia_onUpdate_trashed()
316 ExternalDbFacade facade = new ExternalDbFacade(sIsolatedContext, helper, in testDeletedMedia_onUpdate_trashed()
[all …]
DPickerDatabaseHelperTest.java66 private static Context sIsolatedContext; field in PickerDatabaseHelperTest
71 sIsolatedContext = new IsolatedContext(context, TAG, /*asFuseThread*/ false); in setUp()
88 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testMediaColumns()
130 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testAlbumMediaColumns()
159 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testCheck_cloudOrLocal()
175 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testUniqueConstraint_local()
204 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testUniqueConstraintAlbumMedia()
235 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testUniqueConstraint_cloud()
258 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testUniqueConstraint_localAndCloudPlusLocal()
285 try (PickerDatabaseHelper helper = new PickerDatabaseHelperT(sIsolatedContext)) { in testCheck_IsVisible()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DMediaGrantsAppOpStateTest.java67 private static Context sIsolatedContext; field in MediaGrantsAppOpStateTest
90 sIsolatedContext = new IsolatedContext(context, "modern", /*asFuseThread*/ false); in setUp()
91 sExternalDatabase = ((IsolatedContext) sIsolatedContext).getExternalDatabase(); in setUp()
93 Long fileId1 = insertFileInResolver(sIsolatedContext.getContentResolver(), "test_file1"); in setUp()
94 Long fileId2 = insertFileInResolver(sIsolatedContext.getContentResolver(), "test_file2"); in setUp()
105 sIsolatedContext.getContentResolver().delete(uri, Bundle.EMPTY); in tearDown()
119 grantMediaReadForPackage(sIsolatedContext, sTestAppUid, sUriList); in testAppOpStateChangeToAllowAll()
142 grantMediaReadForPackage(sIsolatedContext, sTestAppUid, sUriList); in testAppOpStateChangeToDenyAll()
162 grantMediaReadForPackage(sIsolatedContext, sTestAppUid, sUriList); in testGrantSelectFlowDoesntClearGrants()
175 grantMediaReadForPackage(sIsolatedContext, sTestAppUid, sUriList); in testAllowVideosOnlyClearsGrants()
DDatabaseHelperTest.java68 private static Context sIsolatedContext; field in DatabaseHelperTest
77 sIsolatedContext = new IsolatedContext(context, TAG, /*asFuseThread*/ false); in setUp()
83 try (DatabaseHelper helper = new DatabaseHelperU(sIsolatedContext, TEST_CLEAN_DB)) { in testFilterVolumeNames()
165 try (DatabaseHelper helper = new DatabaseHelperR(sIsolatedContext, TEST_CLEAN_DB)) { in testArtistsAndAlbumsIncludeOnlyMusic()
227 try (DatabaseHelper helper = new DatabaseHelperR(sIsolatedContext, TEST_CLEAN_DB)) { in testTransactions()
259 .newInstance(sIsolatedContext, TEST_DOWNGRADE_DB)) { in assertDowngrade() argument
261 assertThat(sIsolatedContext.getDatabasePath(TEST_DOWNGRADE_DB).exists()).isTrue(); in assertDowngrade()
279 .newInstance(sIsolatedContext, TEST_DOWNGRADE_DB)) { in assertDowngrade() argument
307 sIsolatedContext = new IsolatedContext(InstrumentationRegistry.getInstrumentation() in assertDowngradeWithStableUrisEnabledRecoversData()
312 new VolumeCache(sIsolatedContext, new UserCache(sIsolatedContext)), backedUpData); in assertDowngradeWithStableUrisEnabledRecoversData()
[all …]
DMediaProviderTest.java112 private static Context sIsolatedContext; field in MediaProviderTest
305 assertNotNull(MediaStore.getVersion(sIsolatedContext, in testMetadata()
345 MediaStore.grantMediaReadForPackage(sIsolatedContext, in testGrantMediaReadForPackage()
383 MediaStore.grantMediaReadForPackage(sIsolatedContext, in testGetReadGrantsForPackage()
419 MediaStore.grantMediaReadForPackage(sIsolatedContext, in testRevokeReadGrantsForPackage()
428 MediaStore.revokeMediaReadForPackages(sIsolatedContext, android.os.Process.myUid(), in testRevokeReadGrantsForPackage()
832 final ProviderInfo info = sIsolatedContext.getPackageManager() in testEnsureFileColumns_InvalidMimeType_targetSdkQ()
835 provider.attachInfo(sIsolatedContext, info); in testEnsureFileColumns_InvalidMimeType_targetSdkQ()
1300 final ProviderInfo info = sIsolatedContext.getPackageManager() in testEnsureFileColumns_resolvesMimeType()
1303 provider.attachInfo(sIsolatedContext, info); in testEnsureFileColumns_resolvesMimeType()
[all …]
DMediaProviderForFuseTest.java65 private static Context sIsolatedContext; field in MediaProviderForFuseTest
81 sIsolatedContext = new IsolatedContext(context, "modern", /*asFuseThread*/ true); in setUp()
82 sIsolatedResolver = sIsolatedContext.getContentResolver(); in setUp()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/espresso/
DPhotoPickerBaseTest.java155 private static IsolatedContext sIsolatedContext; field in PhotoPickerBaseTest
188 return sIsolatedContext; in getIsolatedContext()
207 sIsolatedContext = new IsolatedContext(getTargetContext(), "modern", in setupClass()
213 WorkManagerTestInitHelper.initializeTestWorkManager(sIsolatedContext); in setupClass()