Home
last modified time | relevance | path

Searched refs:getContentResolver (Results 1 – 25 of 380) sorted by relevance

12345678910>>...16

/cts/tests/tests/provider/src/android/provider/cts/settings/
DSettingsTest.java98 ContentResolver cr = getContext().getContentResolver(); in testSystemTable()
149 ContentResolver cr = getContext().getContentResolver(); in testSecureTable()
173 ContentResolver cr = getContext().getContentResolver(); in tryBadTableAccess()
253 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
258 Settings.System.putInt(getInstrumentation().getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
260 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
265 Settings.System.putInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
272 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess()
279 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess()
284 Settings.System.putInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DDevicePolicyLoggingTest.java44 Settings.Global.getString(mContext.getContentResolver(), AUTO_TIME); in testSetGlobalSettingLogged()
46 Settings.Global.getString(mContext.getContentResolver(), AUTO_TIME_ZONE); in testSetGlobalSettingLogged()
48 Settings.Global.getString(mContext.getContentResolver(), DATA_ROAMING); in testSetGlobalSettingLogged()
50 Settings.Global.getString(mContext.getContentResolver(), USB_MASS_STORAGE_ENABLED); in testSetGlobalSettingLogged()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/
DSensorFeaturesDeactivator.java105 ContentResolver contentResolver = mStateContainer.getContentResolver(); in getSettingMode()
132 mStateContainer.getContentResolver(), in getSettingMode()
146 mStateContainer.getContentResolver(), in getSettingMode()
161 mStateContainer.getContentResolver(), in getSettingMode()
176 mStateContainer.getContentResolver(), in getSettingMode()
190 mStateContainer.getContentResolver(), in getSettingMode()
/cts/hostsidetests/scopedstorage/redacturi/src/android/scopedstorage/cts/redacturi/
DRedactUriDeviceTest.java28 import static android.scopedstorage.cts.lib.TestUtils.getContentResolver;
137 final Uri uri = MediaStore.scanFile(getContentResolver(), img); in testRedactedUri_single()
138 final Uri redactedUri = MediaStore.getRedactedUri(getContentResolver(), uri); in testRedactedUri_single()
155 uris.add(MediaStore.scanFile(getContentResolver(), file)); in testRedactedUri_list()
158 final Collection<Uri> redactedUris = MediaStore.getRedactedUri(getContentResolver(), in testRedactedUri_list()
173 final Uri uri = MediaStore.scanFile(getContentResolver(), img); in testQueryOnRedactionUri()
174 final Uri redactedUri = MediaStore.getRedactedUri(getContentResolver(), uri); in testQueryOnRedactionUri()
175 final Cursor uriCursor = getContentResolver().query(uri, null, null, null); in testQueryOnRedactionUri()
183 final Cursor redactedUriCursor = getContentResolver().query(redactedUri, null, null, in testQueryOnRedactionUri()
407 assertEquals(0, getContentResolver().update(redactedUri, new ContentValues(), in testDisallowedOperationsOnRedactedUri()
[all …]
/cts/tests/PhotoPicker/src/android/photopicker/cts/
DCloudPhotoPickerTest.java232 assertThat(MediaStore.isSupportedCloudMediaProviderAuthority(mContext.getContentResolver(), in testSupportedProviders()
234 assertThat(MediaStore.isSupportedCloudMediaProviderAuthority(mContext.getContentResolver(), in testSupportedProviders()
237 assertThat(MediaStore.isSupportedCloudMediaProviderAuthority(mContext.getContentResolver(), in testSupportedProviders()
239 assertThat(MediaStore.isSupportedCloudMediaProviderAuthority(mContext.getContentResolver(), in testSupportedProviders()
246 assertThat(MediaStore.isCurrentCloudMediaProviderAuthority(mContext.getContentResolver(), in testProviderSwitchSuccess()
260 assertThat(MediaStore.isCurrentCloudMediaProviderAuthority(mContext.getContentResolver(), in testProviderSwitchSuccess()
272 assertThat(MediaStore.isCurrentCloudMediaProviderAuthority(mContext.getContentResolver(), in testProviderSwitchFailure()
276 assertThat(MediaStore.isCurrentCloudMediaProviderAuthority(mContext.getContentResolver(), in testProviderSwitchFailure()
289 final ContentResolver resolver = mContext.getContentResolver(); in testUriAccessWithValidProjection()
324 final ContentResolver resolver = mContext.getContentResolver(); in testUriAccessWithInvalidProjection()
[all …]
DRemoteVideoPreviewTest.java124 assertThat(MediaStore.isCurrentCloudMediaProviderAuthority(mContext.getContentResolver(), in setUp()
329 MediaStore.waitForIdle(mContext.getContentResolver()); in verifyPlaybackStartedWhenPlayerReady()
336 MediaStore.waitForIdle(mContext.getContentResolver()); in verifyProgressIndicatorShowsWhenBuffering()
345 MediaStore.waitForIdle(mContext.getContentResolver()); in verifySnackbarShowsWhenPermanentError()
353 MediaStore.waitForIdle(mContext.getContentResolver()); in verifyAlertDialogShowsWhenRetriableError()
371 MediaStore.waitForIdle(mContext.getContentResolver()); in verifyAlertDialogRetry()
433 MediaStore.waitForIdle(mContext.getContentResolver()); in launchPreviewMultiple()
448 MediaStore.waitForIdle(mContext.getContentResolver()); in swipeLeftAndWait()
458 MediaStore.waitForIdle(mContext.getContentResolver()); in swipeRightAndWait()
/cts/hostsidetests/numberblocking/app/src/com/android/cts/numberblocking/hostside/
DNumberBlockingAppTest.java29 assertTrue(mContext.getContentResolver().delete( in testCleanupBlockedNumberAsPrimaryUserSucceeds()
54 assertEquals(1, mContext.getContentResolver().delete( in testUnblockNumberAsPrimaryUserSucceeds()
63 mContext.getContentResolver().insert( in verifyInsertBlockedNumberSucceeds()
/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/
DAsserts.java78 getContext().getContentResolver().query(uri, null, null, null, null); in assertReadingContentUriNotAllowed()
87 getContext().getContentResolver().query(uri, null, null, null, null); in assertReadingContentUriAllowed()
119 getContext().getContentResolver().openFileDescriptor(uri, mode).close(); in assertOpenFileDescriptorModeNotAllowed()
139 final ContentResolver resolver = getContext().getContentResolver(); in assertWritingContentUriNotAllowed()
162 getContext().getContentResolver().openOutputStream(uri).close(); in assertWritingContentUriNotAllowed()
178 final ContentResolver resolver = getContext().getContentResolver(); in assertWritingContentUriAllowed()
226 Cursor c = getContext().getContentResolver().query(uri, in assertReadingClipAllowed()
235 Cursor c = getContext().getContentResolver().query(uri, in assertReadingClipAllowed()
254 getContext().getContentResolver().insert(uri, new ContentValues()); in assertWritingClipAllowed()
259 getContext().getContentResolver().insert(uri, new ContentValues()); in assertWritingClipAllowed()
[all …]
/cts/hostsidetests/appsecurity/test-apps/MediaStorageApp/src/com/android/cts/mediastorageapp/
DMediaStoreUtils.java53 return context.getContentResolver().insert(params.insertUri, params.insertValues); in createPending()
170 return mContext.getContentResolver().openFileDescriptor(mUri, "rw"); in open()
181 return mContext.getContentResolver().openOutputStream(mUri); in openOutputStream()
195 mContext.getContentResolver().update(mUri, values, null, null); in publish()
204 mContext.getContentResolver().delete(mUri, null, null); in abandon()
/cts/hostsidetests/devicepolicy/app/IntentReceiver/src/com/android/cts/intent/receiver/
DIntentReceiverActivity.java107 getContentResolver().takePersistableUriPermission(uri, in onCreate()
125 getContentResolver().notifyChange(uri, null); in onCreate()
133 getContentResolver().registerContentObserver(uri, false, uriObserver); in onCreate()
137 getContentResolver().unregisterContentObserver(uriObserver); in onCreate()
184 InputStream is = getContentResolver().openInputStream(uri); in getFirstLineFromUri()
191 getContentResolver().openOutputStream(uri)); in writeToUri()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/tv/
DMockTvInputSetupActivity.java69 try (Cursor cursor = getContentResolver().query(uri, projection, null, null, null)) { in onCreate()
93 Uri channelUri = getContentResolver().insert(uri, values); in onCreate()
96 getContentResolver().delete(channelUri, null, null); in onCreate()
97 channelUri = getContentResolver().insert(uri, values); in onCreate()
115 getContentResolver().bulkInsert(Programs.CONTENT_URI, list.toArray( in onCreate()
/cts/tests/mediaprovider/src/android/provider/cts/media/
DMediaStoreUtils.java63 return context.getContentResolver().insert(params.insertUri, params.insertValues); in createPending()
187 return mContext.getContentResolver().openFileDescriptor(mUri, "rw"); in open()
198 return mContext.getContentResolver().openOutputStream(mUri); in openOutputStream()
212 mContext.getContentResolver().update(mUri, values, null, null); in publish()
221 mContext.getContentResolver().delete(mUri, null, null); in abandon()
/cts/tests/JobScheduler/src/android/jobscheduler/
DDummyJobContentProvider.java93 getContext().getContentResolver().notifyChange(uri, null); in insert()
112 c.setNotificationUri(getContext().getContentResolver(), uri); in query()
138 getContext().getContentResolver().notifyChange(uri, null); in update()
155 getContext().getContentResolver().notifyChange(uri, null); in delete()
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/
DDummyJobContentProvider.java93 getContext().getContentResolver().notifyChange(uri, null); in insert()
112 c.setNotificationUri(getContext().getContentResolver(), uri); in query()
138 getContext().getContentResolver().notifyChange(uri, null); in update()
155 getContext().getContentResolver().notifyChange(uri, null); in delete()
/cts/tests/vr/src/android/vr/cts/
DVrSetFIFOThreadTest.java55 … mOldVrListener = Settings.Secure.getString(mContext.getContentResolver(), ENABLED_VR_LISTENERS); in setUp()
60 Settings.Secure.putString(mContext.getContentResolver(), in tearDown()
78 Settings.Secure.putString(mContext.getContentResolver(), in testSetVrThreadAPISuccess()
102 Settings.Secure.putString(mContext.getContentResolver(), in testSetVrThreadAPIFailure()
/cts/hostsidetests/scopedstorage/legacy/src/android/scopedstorage/cts/legacy/
DLegacyStorageTest.java41 import static android.scopedstorage.cts.lib.TestUtils.getContentResolver;
181 MediaStore.scanFile(getContentResolver(), getShellFile()); in teardown()
273 MediaStore.scanFile(getContentResolver(), existingFile); in testCantAccessExternalStorage()
326 MediaStore.scanFile(getContentResolver(), existingFile); in testReadOnlyExternalStorage_hasR()
368 MediaStore.scanFile(getContentResolver(), getShellFile()); in testListFiles_hasR()
386 Uri uri = getContentResolver().insert(getImageContentUri(), values); in testInsertHiddenFile()
387 try (OutputStream fos = getContentResolver().openOutputStream(uri, "rw")) { in testInsertHiddenFile()
390 MediaStore.scanFile(getContentResolver(), hiddenImageFile); in testInsertHiddenFile()
392 try (Cursor c = getContentResolver().query(uri, projection, null, null, null)) { in testInsertHiddenFile()
451 final Uri otherVideoUri = MediaStore.scanFile(getContentResolver(), otherVideoFile); in testCanTrashOtherAndroidMediaFiles_hasRW()
[all …]
/cts/hostsidetests/appcloning/test-apps/AppCloningStorageStatsTest/src/com/android/cts/storagestatsapp/
DStorageStatsTest.java82 MediaStore.waitForIdle(mContext.getContentResolver()); in testVerifyStatsExternal()
97 MediaStore.scanFile(mContext.getContentResolver(), dir); in testVerifyStatsExternal()
98 MediaStore.scanFile(mContext.getContentResolver(), downloadsDir); in testVerifyStatsExternal()
99 MediaStore.waitForIdle(mContext.getContentResolver()); in testVerifyStatsExternal()
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/
DSecureSettingsUtils.java60 final ContentResolver resolver = context.getContentResolver(); in updateEnabledInputMethods()
112 .getContentResolver(); in getContentResolverForUser()
130 Settings.Secure.putInt(context.getContentResolver(), name, value); in putInt()
152 return Settings.Secure.getString(context.getContentResolver(), name); in getString()
/cts/tests/tests/database/apps/src/com/android/cts/providerapp/
DDummyProvider.java60 cursor.setNotificationUris(getContext().getContentResolver(), in query()
74 getContext().getContentResolver().notifyChange(TEST_URI1, null); in call()
77 getContext().getContentResolver().notifyChange(TEST_URI2, null); in call()
/cts/tests/tests/telephonyprovider/src/android/telephonyprovider/cts/
DThreadsTest.java58 ContentResolver contentResolver = getInstrumentation().getContext().getContentResolver(); in cleanup()
69 mContentResolver = mContext.getContentResolver(); in setupTestEnvironment()
117 return mContext.getContentResolver().insert(Telephony.Sms.CONTENT_URI, contentValues); in addMessageToTelephonyWithDate()
137 return mContext.getContentResolver().insert(Telephony.Sms.Inbox.CONTENT_URI, contentValues); in saveToTelephony()
/cts/tests/tests/content/src/android/content/cts/
DDummyProvider.java104 getContext().getContentResolver().notifyChange(uri, null); in insert()
123 c.setNotificationUri(getContext().getContentResolver(), uri); in query()
169 getContext().getContentResolver().notifyChange(uri, null); in update()
186 getContext().getContentResolver().notifyChange(uri, null); in delete()
/cts/hostsidetests/scopedstorage/bypassdatabase/src/android/scopedstorage/cts/bypassdatabase/
DBypassDatabaseOperationsTest.java25 import static android.scopedstorage.cts.lib.TestUtils.getContentResolver;
266 assertNotNull(MediaStore.scanFile(getContentResolver(), file)); in testAppBypassesDatabaseOps()
274 assertNull(MediaStore.scanFile(getContentResolver(), file)); in testAppBypassesDatabaseOps()
275 assertNotNull(MediaStore.scanFile(getContentResolver(), renamedFile)); in testAppBypassesDatabaseOps()
288 MediaStore.scanFile(getContentResolver(), file); in testAppBypassesDatabaseOps()
289 MediaStore.scanFile(getContentResolver(), renamedFile); in testAppBypassesDatabaseOps()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DSetSystemSettingTest.java37 mContext.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, in testSetBrightnessWithValue()
42 final int mode = Settings.System.getInt(mContext.getContentResolver(), in testSetBrightness()
/cts/tests/tests/settings/src/android/settings/cts/
DWifiSliceTest.java82 mAssistant = Secure.getString(mContext.getContentResolver(), ASSISTANT); in setUp()
87 final String assistant = Secure.getString(mContext.getContentResolver(), ASSISTANT); in tearDown()
89 Secure.putString(mContext.getContentResolver(), ASSISTANT, mAssistant); in tearDown()
134 Secure.putString(mContext.getContentResolver(), ASSISTANT, in wifiSlice_grantedPermissionToDefaultAssistant()
165 Secure.putString(mContext.getContentResolver(), ASSISTANT, in wifiSlice_grantedPermissionToDefaultVoiceAssistant()
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/settings/
DSettingsSession.java158 setter.set(getContentResolver(), uri.getLastPathSegment(), value); in put()
164 return getter.get(getContentResolver(), uri.getLastPathSegment()); in get()
181 private static ContentResolver getContentResolver() { in getContentResolver() method
182 return getInstrumentation().getTargetContext().getContentResolver(); in getContentResolver()

12345678910>>...16