/cts/tests/tests/provider/src/android/provider/cts/contacts/ |
D | RawContactUtil.java | 36 public static int update(ContentResolver resolver, long rawContactId, in update() argument 39 return resolver.update(uri, values, null, null); in update() 42 public static long createRawContactWithName(ContentResolver resolver, Account account, in createRawContactWithName() argument 44 Long rawContactId = insertRawContact(resolver, account); in createRawContactWithName() 45 DataUtil.insertName(resolver, rawContactId, name); in createRawContactWithName() 49 public static long createRawContactWithAutoGeneratedName(ContentResolver resolver, in createRawContactWithAutoGeneratedName() argument 51 Long rawContactId = insertRawContact(resolver, account); in createRawContactWithAutoGeneratedName() 52 DataUtil.insertAutoGeneratedName(resolver, rawContactId); in createRawContactWithAutoGeneratedName() 56 public static long insertRawContact(ContentResolver resolver, Account account) { in insertRawContact() argument 60 Uri uri = resolver.insert(URI, values); in insertRawContact() [all …]
|
D | DataUtil.java | 35 public static String[] queryById(ContentResolver resolver, long dataId, String[] projection, in queryById() argument 38 Cursor cursor = resolver.query(uri, projection, selection, selectionArgs, null); in queryById() 42 public static String[] queryById(ContentResolver resolver, long dataId, String[] projection) { in queryById() argument 43 return queryById(resolver, dataId, projection, null, null); in queryById() 46 public static void insertName(ContentResolver resolver, long rawContactId, String name) { in insertName() argument 51 insertData(resolver, rawContactId, values); in insertName() 54 public static long insertPhoneNumber(ContentResolver resolver, long rawContactId, in insertPhoneNumber() argument 59 return DataUtil.insertData(resolver, rawContactId, values); in insertPhoneNumber() 62 public static long insertEmail(ContentResolver resolver, long rawContactId, String email) { in insertEmail() argument 66 return DataUtil.insertData(resolver, rawContactId, values); in insertEmail() [all …]
|
D | DatabaseAsserts.java | 38 public static void assertDeleteIsUnsupported(ContentResolver resolver, Uri uri) { in assertDeleteIsUnsupported() argument 40 resolver.delete(uri, null, null); in assertDeleteIsUnsupported() 48 public static void assertInsertIsUnsupported(ContentResolver resolver, Uri uri) { in assertInsertIsUnsupported() argument 51 resolver.insert(uri, values); in assertInsertIsUnsupported() 64 public static ContactIdPair assertAndCreateContact(ContentResolver resolver) { in assertAndCreateContact() argument 65 return assertAndCreateContact(resolver, StaticAccountAuthenticator.ACCOUNT_1); in assertAndCreateContact() 73 public static ContactIdPair assertAndCreateContactWithName(ContentResolver resolver, in assertAndCreateContactWithName() argument 75 long rawContactId = RawContactUtil.createRawContactWithName(resolver, account, name); in assertAndCreateContactWithName() 77 long contactId = RawContactUtil.queryContactIdByRawContactId(resolver, rawContactId); in assertAndCreateContactWithName() 88 public static ContactIdPair assertAndCreateContact(ContentResolver resolver, Account account) { in assertAndCreateContact() argument [all …]
|
D | ContactUtil.java | 36 public static int update(ContentResolver resolver, long contactId, in update() argument 39 return resolver.update(uri, values, null, null); in update() 42 public static void delete(ContentResolver resolver, long contactId) { in delete() argument 44 resolver.delete(uri, null, null); in delete() 47 public static boolean recordExistsForContactId(ContentResolver resolver, long contactId) { in recordExistsForContactId() argument 52 Cursor cursor = resolver.query(uri, projection, null, null, null); in recordExistsForContactId() 59 public static long queryContactLastUpdatedTimestamp(ContentResolver resolver, long contactId) { in queryContactLastUpdatedTimestamp() argument 65 Cursor cursor = resolver.query(uri, projection, null, null, null); in queryContactLastUpdatedTimestamp() 126 public static void setAggregationException(ContentResolver resolver, int type, in setAggregationException() argument 134 Assert.assertEquals(1, resolver.update(AggregationExceptions.CONTENT_URI, values, null, in setAggregationException()
|
D | DeletedContactUtil.java | 35 public static long queryDeletedTimestampForContactId(ContentResolver resolver, long contactId) { in queryDeletedTimestampForContactId() argument 40 Cursor cursor = resolver.query(uri, projection, null, null, null); in queryDeletedTimestampForContactId() 52 public static long getCount(ContentResolver resolver) { in getCount() argument 56 Cursor cursor = resolver.query(URI, projection, null, null, null); in getCount() 69 public static List<String[]> query(ContentResolver resolver, String[] projection) { in query() argument 70 Cursor cursor = resolver.query(URI, projection, null, null, null); in query() 79 public static List<String[]> querySinceTimestamp(ContentResolver resolver, String[] projection, in querySinceTimestamp() argument 83 Cursor cursor = resolver.query(URI, projection, selection, args, null); in querySinceTimestamp()
|
/cts/tests/tests/os/src/android/os/cts/ |
D | PowerManagerTest.java | 68 ContentResolver resolver = getContext().getContentResolver(); in setUp() local 69 mInitialPowerSaverMode = Global.getInt(resolver, Global.AUTOMATIC_POWER_SAVE_MODE, 0); in setUp() 71 Global.getInt(resolver, Global.DYNAMIC_POWER_SAVINGS_ENABLED, 0); in setUp() 73 Global.getInt(resolver, Global.DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD, 0); in setUp() 80 ContentResolver resolver = getContext().getContentResolver(); in tearDown() local 83 Global.putInt(resolver, Global.AUTOMATIC_POWER_SAVE_MODE, mInitialPowerSaverMode); in tearDown() 84 Global.putInt(resolver, in tearDown() 86 Global.putInt(resolver, in tearDown() 94 ContentResolver resolver = getContext().getContentResolver(); in testPowerManager_getPowerSaveMode() local 97 Global.putInt(resolver, Global.AUTOMATIC_POWER_SAVE_MODE, 0); in testPowerManager_getPowerSaveMode() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | TextClockTest.java | 90 final ContentResolver resolver = mActivity.getContentResolver(); in testUpdate12_24() local 111 Settings.System.putString(resolver, Settings.System.TIME_12_24, null); in testUpdate12_24() 119 Settings.System.putInt(resolver, Settings.System.TIME_12_24, 12); in testUpdate12_24() 140 Settings.System.putInt(resolver, Settings.System.TIME_12_24, 24); in testUpdate12_24() 163 final ContentResolver resolver = mActivity.getContentResolver(); local 172 int oldAutoCaps = Settings.System.getInt(resolver, Settings.System.TEXT_AUTO_CAPS, in mActivityRule.runOnUiThread() 176 Settings.System.putInt(resolver, Settings.System.TEXT_AUTO_CAPS, newAutoCaps); in mActivityRule.runOnUiThread() 178 Settings.System.putInt(resolver, Settings.System.TEXT_AUTO_CAPS, oldAutoCaps); in mActivityRule.runOnUiThread() 191 final ContentResolver resolver = mActivity.getContentResolver(); in registerForChanges() local 193 resolver.registerContentObserver(uri, true, in registerForChanges() [all …]
|
/cts/tests/tests/location/src/android/location/cts/ |
D | ScanningSettingsTest.java | 116 private void clickAndWaitForSettingChange(UiObject2 pref, ContentResolver resolver, in clickAndWaitForSettingChange() argument 129 resolver.registerContentObserver(Settings.Global.getUriFor(settingKey), false, observer); in clickAndWaitForSettingChange() 137 resolver.unregisterContentObserver(observer); in clickAndWaitForSettingChange() 146 final ContentResolver resolver = mContext.getContentResolver(); in toggleSettingAndVerify() local 147 final boolean checked = Settings.Global.getInt(resolver, settingKey, 0) == 1; in toggleSettingAndVerify() 150 clickAndWaitForSettingChange(pref, resolver, settingKey); in toggleSettingAndVerify() 151 assertEquals(!checked, Settings.Global.getInt(resolver, settingKey, 0) == 1); in toggleSettingAndVerify() 154 clickAndWaitForSettingChange(pref, resolver, settingKey); in toggleSettingAndVerify() 155 assertEquals(checked, Settings.Global.getInt(resolver, settingKey, 0) == 1); in toggleSettingAndVerify()
|
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/ |
D | DocumentsClientTest.java | 200 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in testOpenVirtual() local 201 final String streamTypes[] = resolver.getStreamTypes(uri, "*/*"); in testOpenVirtual() 304 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in testTree() local 305 Cursor cursor = resolver.query(children, new String[] { in testTree() 316 Uri pic = DocumentsContract.createDocument(resolver, doc, "image/png", "pic.png"); in testTree() 317 Uri dir = DocumentsContract.createDocument(resolver, doc, Document.MIME_TYPE_DIR, "my dir"); in testTree() 318 Uri dirPic = DocumentsContract.createDocument(resolver, dir, "image/png", "pic2.png"); in testTree() 326 assertTrue("delete", DocumentsContract.deleteDocument(resolver, file4)); in testTree() 334 dirPic = DocumentsContract.renameDocument(resolver, dirPic, "wow"); in testTree() 448 final ContentResolver resolver = getInstrumentation().getContext().getContentResolver(); in testTransferDocument() local [all …]
|
/cts/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/src/com/android/cts/usespermissiondiffcertapp/ |
D | AccessPermissionWithDiffSigTest.java | 157 final ContentResolver resolver = getContext().getContentResolver(); in assertWritingContentUriNotAllowed() local 159 resolver.insert(uri, new ContentValues()); in assertWritingContentUriNotAllowed() 166 resolver.update(uri, new ContentValues(), null, null); in assertWritingContentUriNotAllowed() 173 resolver.delete(uri, null, null); in assertWritingContentUriNotAllowed() 196 final ContentResolver resolver = getContext().getContentResolver(); in assertWritingContentUriAllowed() local 198 resolver.insert(uri, new ContentValues()); in assertWritingContentUriAllowed() 199 resolver.update(uri, new ContentValues(), null, null); in assertWritingContentUriAllowed() 200 resolver.delete(uri, null, null); in assertWritingContentUriAllowed() 202 resolver.openOutputStream(uri).close(); in assertWritingContentUriAllowed() 203 resolver.openFileDescriptor(uri, "w").close(); in assertWritingContentUriAllowed() [all …]
|
/cts/tests/tests/text/src/android/text/method/cts/ |
D | KeyListenerTestCase.java | 72 final ContentResolver resolver = context.getContentResolver(); in enableAutoCapSettings() local 73 mAutoCapSetting = Settings.System.getInt(resolver, TEXT_AUTO_CAPS, 1); in enableAutoCapSettings() 75 Settings.System.putInt(resolver, TEXT_AUTO_CAPS, 1); in enableAutoCapSettings() 89 final ContentResolver resolver = context.getContentResolver(); in resetAutoCapSettings() local 91 Settings.System.putInt(resolver, TEXT_AUTO_CAPS, mAutoCapSetting); in resetAutoCapSettings()
|
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ |
D | AdminActionBookkeepingTest.java | 72 final ContentResolver resolver = getContext().getContentResolver(); in testIsDefaultInputMethodSet() local 73 final String ime = Settings.Secure.getString(resolver, setting); in testIsDefaultInputMethodSet() 75 Settings.Secure.putString(resolver, setting, "com.test.1"); in testIsDefaultInputMethodSet() 83 Settings.Secure.putString(resolver, setting, ime); in testIsDefaultInputMethodSet()
|
/cts/tests/tests/provider/src/android/provider/cts/ |
D | MediaStore_Images_ThumbnailsTest.java | 185 final ContentResolver resolver = mContentResolver; in testQueryExternalMiniThumbnails() 212 assertNotNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MINI_KIND, null)); in testQueryExternalMiniThumbnails() 213 assertNotNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MICRO_KIND, null)); in testQueryExternalMiniThumbnails() 223 assertNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MINI_KIND, null)); in testQueryExternalMiniThumbnails() 224 assertNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MICRO_KIND, null)); in testQueryExternalMiniThumbnails() 300 final ContentResolver resolver = mContentResolver; in testThumbnailGenerationAndCleanup() 309 assertNotNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MINI_KIND, null)); in testThumbnailGenerationAndCleanup() 310 assertNotNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MICRO_KIND, null)); in testThumbnailGenerationAndCleanup() 316 assertNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MINI_KIND, null)); in testThumbnailGenerationAndCleanup() 317 assertNull(Thumbnails.getThumbnail(resolver, imageId, Thumbnails.MICRO_KIND, null)); in testThumbnailGenerationAndCleanup() [all …]
|
D | CallLogTest.java | 33 ContentResolver resolver = context.getContentResolver(); in testGetLastOutgoingCall() local 34 resolver.delete(CallLog.Calls.CONTENT_URI, null, null); in testGetLastOutgoingCall() 59 resolver.insert(CallLog.Calls.CONTENT_URI, values); in testGetLastOutgoingCall()
|
D | CalendarTest.java | 199 public static int deleteCalendarById(ContentResolver resolver, long id) { in deleteCalendarById() argument 200 return resolver.delete(Calendars.CONTENT_URI, Calendars._ID + "=?", in deleteCalendarById() 204 public static int deleteCalendarByAccount(ContentResolver resolver, String account) { in deleteCalendarByAccount() argument 205 return resolver.delete(Calendars.CONTENT_URI, Calendars.ACCOUNT_NAME + "=?", in deleteCalendarByAccount() 209 public static Cursor getCalendarsByAccount(ContentResolver resolver, String account) { in getCalendarsByAccount() argument 221 return resolver.query(Calendars.CONTENT_URI, CALENDARS_SYNC_PROJECTION, selection, in getCalendarsByAccount() 257 public static Cursor getSyncStateById(ContentResolver resolver, long id) { in getSyncStateById() argument 259 return resolver.query(uri, SYNCSTATE_PROJECTION, null, null, null); in getSyncStateById() 265 public static Cursor getSyncStateByAccount(ContentResolver resolver, String account) { in getSyncStateByAccount() argument 270 return resolver.query(SyncState.CONTENT_URI, SYNCSTATE_PROJECTION, selection, in getSyncStateByAccount() [all …]
|
/cts/tests/tests/net/src/android/net/cts/ |
D | TheaterModeTest.java | 33 private ContentResolver resolver; field in TheaterModeTest 37 resolver = mContext.getContentResolver(); in setup() 76 Settings.Global.putInt(resolver, Settings.Global.THEATER_MODE_ON, enabling ? 1 : 0); in setTheaterModeOn()
|
D | AirplaneModeTest.java | 36 private ContentResolver resolver; field in AirplaneModeTest 40 resolver = mContext.getContentResolver(); in setup() 78 Settings.Global.putInt(resolver, Settings.Global.AIRPLANE_MODE_ON, enabling ? 1 : 0); in setAirplaneModeOn()
|
/cts/tests/tests/tv/src/android/media/tv/cts/ |
D | StubTunerTvInputService.java | 48 public static void insertChannels(ContentResolver resolver, TvInputInfo info) { in insertChannels() argument 67 resolver.bulkInsert(TvContract.Channels.CONTENT_URI, in insertChannels() 71 public static void deleteChannels(ContentResolver resolver, TvInputInfo info) { in deleteChannels() argument 75 resolver.delete(TvContract.buildChannelsUriForInput(info.getId()), null, null); in deleteChannels()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | AdminActionBookkeepingTest.java | 201 final ContentResolver resolver = getContext().getContentResolver(); in testIsDefaultInputMethodSet() local 202 final String ime = Settings.Secure.getString(resolver, setting); in testIsDefaultInputMethodSet() 204 Settings.Secure.putString(resolver, setting, "com.test.1"); in testIsDefaultInputMethodSet() 212 Settings.Secure.putString(resolver, setting, ime); in testIsDefaultInputMethodSet()
|
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/ |
D | CommonExternalStorageTest.java | 379 public static void assertMediaNoAccess(ContentResolver resolver, boolean legacyApp) in assertMediaNoAccess() argument 387 Uri uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in assertMediaNoAccess() 399 public static void assertMediaReadWriteAccess(ContentResolver resolver) throws Exception { in assertMediaReadWriteAccess() argument 405 final Uri uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); in assertMediaReadWriteAccess() 407 resolver.openFileDescriptor(uri, "rw").close(); in assertMediaReadWriteAccess() 408 resolver.openFileDescriptor(uri, "w").close(); in assertMediaReadWriteAccess() 409 resolver.openFileDescriptor(uri, "r").close(); in assertMediaReadWriteAccess() 411 resolver.delete(uri, null, null); in assertMediaReadWriteAccess()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | ToastTest.java | 79 ContentResolver resolver = mContext.getContentResolver(); in setUp() local 80 mPreviousHiddenApiPolicy = Settings.Global.getString(resolver, in setUp() 82 Settings.Global.putString(resolver, SETTING_HIDDEN_API_POLICY, "1"); in setUp()
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | DynamicConfigDeviceSide.java | 56 ContentResolver resolver = appContext.getContentResolver(); in DynamicConfigDeviceSide() local 57 ParcelFileDescriptor descriptor = resolver.openFileDescriptor(sdcardUri,"r"); in DynamicConfigDeviceSide()
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
D | DynamicConfigDeviceSide.java | 56 ContentResolver resolver = appContext.getContentResolver(); in DynamicConfigDeviceSide() local 57 ParcelFileDescriptor descriptor = resolver.openFileDescriptor(sdcardUri,"r"); in DynamicConfigDeviceSide()
|
/cts/tests/tests/resolverservice/src/android/service/resolver/cts/ |
D | ResolverTargetTest.java | 17 package android.service.resolver.cts; 23 import android.service.resolver.ResolverTarget;
|
/cts/tests/providerui/src/android/providerui/cts/ |
D | MediaStoreUiTest.java | 115 final ContentResolver resolver = mActivity.getContentResolver(); in tearDown() local 116 for (UriPermission permission : resolver.getPersistedUriPermissions()) { in tearDown() 138 final ContentResolver resolver = mActivity.getContentResolver(); in testGetDocumentUri() local 143 try (ParcelFileDescriptor fd = resolver.openFileDescriptor(docUri, "r")) { in testGetDocumentUri() 149 try (ParcelFileDescriptor fd = resolver.openFileDescriptor(docUri, "wt")) { in testGetDocumentUri()
|