Home
last modified time | relevance | path

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

12345678910>>...13

/cts/tests/tests/permission/src/android/permission/cts/
DContactsProviderTest.java38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, in testQueryContacts()
56 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, in testInsertContacts()
74 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, in testQueryProfile()
94 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, in testInsertProfile()
112 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, in testUpdateProfile()
130 getContext().getContentResolver().query( in testQueryPhoneEnterprise()
149 getContext().getContentResolver().query( in testRawContactsEntityCorp()
DTvPermissionTest.java49 getContext().getContentResolver().insert(uri, values); in verifyInsert()
61 getContext().getContentResolver().update(uri, values, null, null); in verifyUpdate()
72 getContext().getContentResolver().delete(uri, null, null); in verifyDelete()
/cts/tests/tests/provider/src/android/provider/cts/settings/
DSettingsTest.java90 ContentResolver cr = getContext().getContentResolver(); in testSystemTable()
141 ContentResolver cr = getContext().getContentResolver(); in testSecureTable()
165 ContentResolver cr = getContext().getContentResolver(); in tryBadTableAccess()
245 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
250 Settings.System.putInt(getInstrumentation().getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
252 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
257 Settings.System.putInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromSameProcess()
264 final int initialValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess()
271 final int actualValue = Settings.System.getInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess()
276 Settings.System.putInt(getContext().getContentResolver(), in testNoStaleValueModifiedFromOtherProcess()
[all …]
/cts/tests/tests/permission2/src/android/permission2/cts/
DContactsProviderTest.java38 getContext().getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, in testQueryContacts()
49 getContext().getContentResolver().insert(ContactsContract.Contacts.CONTENT_URI, in testInsertContacts()
64 getContext().getContentResolver().query(ContactsContract.Profile.CONTENT_URI, in testQueryProfile()
76 getContext().getContentResolver().insert(ContactsContract.Profile.CONTENT_URI, in testInsertProfile()
91 getContext().getContentResolver().update(ContactsContract.Profile.CONTENT_URI, in testUpdateProfile()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAirplaneModeRestrictionTest.java68 Settings.Global.putInt(mContext.getContentResolver(), AIRPLANE_MODE_ON, 1); in testAirplaneModeTurnedOffWhenRestrictionSet()
73 mContext.getContentResolver(), Settings.Global.AIRPLANE_MODE_ON)); in testAirplaneModeTurnedOffWhenRestrictionSet()
83 Settings.Global.putInt(mContext.getContentResolver(), AIRPLANE_MODE_ON, 1); in testAirplaneModeCannotBeTurnedOnWithRestrictionOn()
85 mContext.getContentResolver(), AIRPLANE_MODE_ON)); in testAirplaneModeCannotBeTurnedOnWithRestrictionOn()
89 Settings.Global.putInt(mContext.getContentResolver(), AIRPLANE_MODE_ON, 1); in testAirplaneModeCanBeTurnedOnWithRestrictionOff()
91 mContext.getContentResolver(), AIRPLANE_MODE_ON)); in testAirplaneModeCanBeTurnedOnWithRestrictionOff()
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/device/src/android/scopedstorage/cts/device/
DRedactUriDeviceTest.java27 import static android.scopedstorage.cts.lib.TestUtils.getContentResolver;
133 final Uri uri = MediaStore.scanFile(getContentResolver(), img); in testRedactedUri_single()
134 final Uri redactedUri = MediaStore.getRedactedUri(getContentResolver(), uri); in testRedactedUri_single()
151 uris.add(MediaStore.scanFile(getContentResolver(), file)); in testRedactedUri_list()
154 final Collection<Uri> redactedUris = MediaStore.getRedactedUri(getContentResolver(), in testRedactedUri_list()
169 final Uri uri = MediaStore.scanFile(getContentResolver(), img); in testQueryOnRedactionUri()
170 final Uri redactedUri = MediaStore.getRedactedUri(getContentResolver(), uri); in testQueryOnRedactionUri()
171 final Cursor uriCursor = getContentResolver().query(uri, null, null, null); in testQueryOnRedactionUri()
179 final Cursor redactedUriCursor = getContentResolver().query(redactedUri, null, null, in testQueryOnRedactionUri()
407 assertEquals(0, getContentResolver().update(redactedUri, new ContentValues(), in testDisallowedOperationsOnRedactedUri()
[all …]
DBypassDatabaseOperationsTest.java25 import static android.scopedstorage.cts.lib.TestUtils.getContentResolver;
298 assertNotNull(MediaStore.scanFile(getContentResolver(), file)); in testAppBypassesDatabaseOps()
306 assertNull(MediaStore.scanFile(getContentResolver(), file)); in testAppBypassesDatabaseOps()
307 assertNotNull(MediaStore.scanFile(getContentResolver(), renamedFile)); in testAppBypassesDatabaseOps()
320 MediaStore.scanFile(getContentResolver(), file); in testAppBypassesDatabaseOps()
321 MediaStore.scanFile(getContentResolver(), renamedFile); in testAppBypassesDatabaseOps()
/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/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/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/tests/tests/provider/src/android/provider/cts/media/
DMediaStoreUtils.java62 return context.getContentResolver().insert(params.insertUri, params.insertValues); in createPending()
179 return mContext.getContentResolver().openFileDescriptor(mUri, "rw"); in open()
190 return mContext.getContentResolver().openOutputStream(mUri); in openOutputStream()
204 mContext.getContentResolver().update(mUri, values, null, null); in publish()
213 mContext.getContentResolver().delete(mUri, null, null); in abandon()
/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/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/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/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/hostsidetests/scopedstorage/legacy/src/android/scopedstorage/cts/legacy/
DLegacyStorageTest.java38 import static android.scopedstorage.cts.lib.TestUtils.getContentResolver;
171 MediaStore.scanFile(getContentResolver(), getShellFile()); in teardown()
263 MediaStore.scanFile(getContentResolver(), existingFile); in testCantAccessExternalStorage()
316 MediaStore.scanFile(getContentResolver(), existingFile); in testReadOnlyExternalStorage_hasR()
358 MediaStore.scanFile(getContentResolver(), getShellFile()); in testListFiles_hasR()
376 Uri uri = getContentResolver().insert(getImageContentUri(), values); in testInsertHiddenFile()
377 try (OutputStream fos = getContentResolver().openOutputStream(uri, "rw")) { in testInsertHiddenFile()
380 MediaStore.scanFile(getContentResolver(), hiddenImageFile); in testInsertHiddenFile()
382 try (Cursor c = getContentResolver().query(uri, projection, null, null, null)) { in testInsertHiddenFile()
453 MediaStore.scanFile(getContentResolver(), shellFile1); in testCantRename_hasR()
[all …]
/cts/tests/tests/telephonyprovider/src/android/telephonyprovider/cts/
DThreadsTest.java56 ContentResolver contentResolver = getInstrumentation().getContext().getContentResolver(); in cleanup()
66 mContentResolver = mContext.getContentResolver(); in setupTestEnvironment()
114 return mContext.getContentResolver().insert(Telephony.Sms.CONTENT_URI, contentValues); in addMessageToTelephonyWithDate()
134 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/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/framework/base/windowmanager/util/src/android/server/wm/settings/
DSettingsSession.java147 setter.set(getContentResolver(), uri.getLastPathSegment(), value); in put()
153 return getter.get(getContentResolver(), uri.getLastPathSegment()); in get()
170 private static ContentResolver getContentResolver() { in getContentResolver() method in SettingsSession
171 return getInstrumentation().getTargetContext().getContentResolver(); in getContentResolver()
/cts/tests/tests/widget/src/android/widget/cts/
DTextClockTest.java70 mDefaultTime1224 = Settings.System.getString(mActivity.getContentResolver(), in setup()
76 Settings.System.putString(mActivity.getContentResolver(), Settings.System.TIME_12_24, in teardown()
90 final ContentResolver resolver = mActivity.getContentResolver(); in testUpdate12_24()
163 final ContentResolver resolver = mActivity.getContentResolver();
191 final ContentResolver resolver = mActivity.getContentResolver(); in registerForChanges()
/cts/tests/tests/voiceRecognition/src/android/voicerecognition/cts/
DDefaultRecognitionServiceTest.java42 mContext.getContentResolver(), VOICE_RECOGNITION_SERVICE);
52 () -> Settings.Secure.putString(mContext.getContentResolver(), in setCurrentRecognizer()

12345678910>>...13