/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/aggregation/ |
D | ContactAggregatorTest.java | 103 long rawContactId1 = RawContactUtil.createRawContactWithName(mResolver, "zz", "top"); in testCrudAggregationExceptions() 104 long rawContactId2 = RawContactUtil.createRawContactWithName(mResolver, "aa", "bottom"); in testCrudAggregationExceptions() 115 Cursor c = mResolver.query(AggregationExceptions.CONTENT_URI, in testCrudAggregationExceptions() 129 c = mResolver.query(AggregationExceptions.CONTENT_URI, AGGREGATION_EXCEPTION_PROJECTION, in testCrudAggregationExceptions() 144 c = mResolver.query(AggregationExceptions.CONTENT_URI, AGGREGATION_EXCEPTION_PROJECTION, in testCrudAggregationExceptions() 151 long rawContactId = RawContactUtil.createRawContact(mResolver); in testAggregationCreatesNewAggregate() 153 Uri resultUri = DataUtil.insertStructuredName(mResolver, rawContactId, "Johna", "Smitha"); in testAggregationCreatesNewAggregate() 166 long rawContactId1 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1); in testAggregationOfExactFullNameMatch() 167 DataUtil.insertStructuredName(mResolver, rawContactId1, "Johnb", "Smithb"); in testAggregationOfExactFullNameMatch() 169 long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2); in testAggregationOfExactFullNameMatch() [all …]
|
D | ContactAggregator2Test.java | 103 long rawContactId1 = RawContactUtil.createRawContactWithName(mResolver, "zz", "top"); in testCrudAggregationExceptions() 104 long rawContactId2 = RawContactUtil.createRawContactWithName(mResolver, "aa", "bottom"); in testCrudAggregationExceptions() 115 Cursor c = mResolver.query(AggregationExceptions.CONTENT_URI, in testCrudAggregationExceptions() 129 c = mResolver.query(AggregationExceptions.CONTENT_URI, AGGREGATION_EXCEPTION_PROJECTION, in testCrudAggregationExceptions() 144 c = mResolver.query(AggregationExceptions.CONTENT_URI, AGGREGATION_EXCEPTION_PROJECTION, in testCrudAggregationExceptions() 151 long rawContactId = RawContactUtil.createRawContact(mResolver); in testAggregationCreatesNewAggregate() 153 Uri resultUri = DataUtil.insertStructuredName(mResolver, rawContactId, "Johna", "Smitha"); in testAggregationCreatesNewAggregate() 166 long rawContactId1 = RawContactUtil.createRawContact(mResolver, ACCOUNT_1); in testAggregationOfExactFullNameMatch() 167 DataUtil.insertStructuredName(mResolver, rawContactId1, "Johnb", "Smithb"); in testAggregationOfExactFullNameMatch() 169 long rawContactId2 = RawContactUtil.createRawContact(mResolver, ACCOUNT_2); in testAggregationOfExactFullNameMatch() [all …]
|
/packages/providers/TvProvider/tests/src/com/android/providers/tv/ |
D | PackageRemovedReceiverTest.java | 44 private MockContentResolver mResolver; field in PackageRemovedReceiverTest 52 mResolver = new MockContentResolver(); in setUp() 53 mResolver.addProvider(Settings.AUTHORITY, new MockContentProvider() { in setUp() 61 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 63 setContext(new MockTvProviderContext(mResolver, getContext())); in setUp() 75 Utils.clearTvProvider(mResolver); in setUp() 80 Utils.clearTvProvider(mResolver); in tearDown() 96 long channelInPackage1Id = Utils.insertChannel(mResolver); in testPackageRemoved() 97 Utils.insertPrograms(mResolver, channelInPackage1Id, programInPackage1); in testPackageRemoved() 98 Utils.insertPreviewPrograms(mResolver, channelInPackage1Id, previewProgramInPackage1); in testPackageRemoved() [all …]
|
D | BootCompletedReceiverTest.java | 44 private MockContentResolver mResolver; field in BootCompletedReceiverTest 52 mResolver = new MockContentResolver(); in setUp() 53 mResolver.addProvider(Settings.AUTHORITY, new MockContentProvider() { in setUp() 61 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 64 new MockTvProviderContext(mResolver, getContext()); in setUp() 78 Utils.clearTvProvider(mResolver); in setUp() 83 Utils.clearTvProvider(mResolver); in tearDown() 104 long channelInNonExistingPackageId = Utils.insertChannel(mResolver); in testPackageRemoved() 105 Utils.insertPrograms(mResolver, channelInNonExistingPackageId, programInNonExistingPackage); in testPackageRemoved() 107 mResolver, channelInNonExistingPackageId, previewProgramInNonExistingPackage); in testPackageRemoved() [all …]
|
D | ColumnFilterTest.java | 37 private MockContentResolver mResolver; field in ColumnFilterTest 44 mResolver = new MockContentResolver(); in setUp() 45 mResolver.addProvider(Settings.AUTHORITY, new MockContentProvider() { in setUp() 53 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 55 setContext(new MockTvProviderContext(mResolver, getContext())); in setUp() 60 Utils.clearTvProvider(mResolver); in setUp() 65 Utils.clearTvProvider(mResolver); in tearDown() 76 Uri uri = mResolver.insert(Channels.CONTENT_URI, values); in insertChannel() 88 Cursor cursor = mResolver.query(Channels.CONTENT_URI, projection, null, null, null); in testQueryChannel() 101 Cursor cursor = mResolver.query(Channels.CONTENT_URI, projection, null, null, null); in testQueryChannel_count() [all …]
|
D | UnrecognizedColumnsTest.java | 25 private MockContentResolver mResolver; field in UnrecognizedColumnsTest 34 mResolver = new MockContentResolver(); in setUp() 35 mResolver.addProvider(Settings.AUTHORITY, new MockContentProvider() { in setUp() 43 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 45 mContext = new MockTvProviderContext(mResolver, getContext()); in setUp() 60 Utils.clearTvProvider(mResolver); in tearDown() 79 mResolver.query(TvContract.Programs.CONTENT_URI, projection, null, null, null); in testUnrecognizedColumns() 105 long myChannelId = Utils.insertChannel(mResolver); in insertPrograms() 107 Utils.insertPrograms(mResolver, myChannelId, mProgram); in insertPrograms() 110 long anotherChannelId = Utils.insertChannel(mResolver); in insertPrograms() [all …]
|
D | ParametersTest.java | 37 private MockContentResolver mResolver; field in ParametersTest 45 mResolver = new MockContentResolver(); in setUp() 46 mResolver.addProvider(Settings.AUTHORITY, new MockContentProvider() { in setUp() 54 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 56 mContext = new MockTvProviderContext(mResolver, getContext()); in setUp() 62 Utils.clearTvProvider(mResolver); in setUp() 67 Utils.clearTvProvider(mResolver); in tearDown() 92 try (Cursor cursor = mResolver.query( in verifyChannelCount() 101 mResolver.insert(Channels.CONTENT_URI, values); in insertChannelWithPackageName() 121 int count = mResolver.update(channelsUri, values, null, null); in verifyChannelUpdate() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | VoicemailProviderTest.java | 112 Uri uri = mResolver.insert(voicemailUri(), getTestVoicemailValues()); in testInsert() 125 Uri uri = mResolver.insert(voicemailUri(), values); in testInsertReadMessageIsNotNew() 133 Cursor c = mResolver.query(uri, projection, Voicemails.NEW + "=0", null, in testInsertReadMessageIsNotNew() 151 mResolver.bulkInsert(voicemailUri(), in testBulkInsert() 159 OutputStream out = mResolver.openOutputStream(uri); in testFileContent() 164 InputStream in = mResolver.openInputStream(uri); in testFileContent() 191 int count = mResolver.update(uri, values, null, null); in testUpdate() 198 final Uri uri = mResolver.insert(voicemailUri(), getTestVoicemailValues()); in testUpdateOwnPackageVoicemail_NotDirty() 201 mResolver.update(uri, updateValues, null, null); in testUpdateOwnPackageVoicemail_NotDirty() 204 try (Cursor cursor = mResolver in testUpdateOwnPackageVoicemail_NotDirty() [all …]
|
D | SearchIndexManagerTest.java | 53 long rawContactId = RawContactUtil.createRawContact(mResolver); in testSearchIndexForStructuredName() 55 DataUtil.insertStructuredName(mResolver, rawContactId, "John", "Doe"); in testSearchIndexForStructuredName() 58 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName() 67 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName() 74 long rawContactId = RawContactUtil.createRawContact(mResolver); in testSearchIndexForStructuredName_phoneticOnly() 76 DataUtil.insertStructuredName(mResolver, rawContactId, "John", "Doe"); in testSearchIndexForStructuredName_phoneticOnly() 79 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName_phoneticOnly() 88 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForStructuredName_phoneticOnly() 99 long rawContactId = RawContactUtil.createRawContact(mResolver); in testSearchIndexForChineseName() 103 DataUtil.insertStructuredName(mResolver, rawContactId, values); in testSearchIndexForChineseName() [all …]
|
D | LegacyContactsProviderTest.java | 80 Uri uri = mResolver.insert(People.CONTENT_URI, values); in testPeopleInsert() 93 Uri uri = mResolver.insert(People.CONTENT_URI, values); in testPeopleUpdate() 101 mResolver.update(uri, values, null, null); in testPeopleUpdate() 107 mResolver.update(People.CONTENT_URI, values, People._ID + "=" + personId, null); in testPeopleUpdate() 115 Uri personId = mResolver.insert(People.CONTENT_URI, values); in testPeopleDelete() 116 mResolver.delete(personId, null, null); in testPeopleDelete() 118 Cursor c = mResolver.query(personId, null, People.NAME + "='John Doe'" , null, null); in testPeopleDelete() 123 mResolver.query(People.DELETED_CONTENT_URI, null, null, null, null); in testPeopleDelete() 132 mResolver.insert(People.CONTENT_URI, values); in testPeopleFilter() 136 mResolver.insert(People.CONTENT_URI, values); in testPeopleFilter() [all …]
|
D | ContactsProvider2Test.java | 1234 Uri rowUri = mResolver.insert(RawContacts.CONTENT_URI, values); in testRawContactsInsert() 1247 long rawContactId = RawContactUtil.createRawContactWithName(mResolver); in testDataDirectoryWithLookupUri() 1272 Cursor cursor = mResolver.query(dataUri, new String[]{ Data.DATA1 }, null, null, Data._ID); in assertDataRows() 1294 long rawContactId1 = RawContactUtil.createRawContactWithName(mResolver, account1); in testContactEntitiesWithIdBasedUri() 1299 long rawContactId2 = RawContactUtil.createRawContact(mResolver, account2); in testContactEntitiesWithIdBasedUri() 1316 long rawContactId1 = RawContactUtil.createRawContactWithName(mResolver, account1); in testContactEntitiesWithLookupUri() 1321 long rawContactId2 = RawContactUtil.createRawContact(mResolver, account2); in testContactEntitiesWithLookupUri() 1348 Cursor cursor = mResolver.query(entityUri, null, null, null, in assertEntityRows() 1408 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "John", "Doe"); in testDataInsert() 1412 Uri dataUri = mResolver.insert(Data.CONTENT_URI, values); in testDataInsert() [all …]
|
D | GroupsTest.java | 165 mResolver.update(updateUri, values, null, null); in testMarkAsDirtyParameter() 177 assertEquals(1, mResolver.update(uri, values, null, null)); in testGroupDirtyClearedWhenSetExplicitly() 187 mResolver.delete(uri, null, null); in testGroupDeletion1() 192 mResolver.delete(permanentDeletionUri, null, null); in testGroupDeletion1() 202 mResolver.delete(permanentDeletionUri, null, null); in testGroupDeletion2() 212 mResolver.update(uri, values, null, null); in testGroupVersionUpdates() 238 final Cursor cursor = mResolver.query(Contacts.CONTENT_URI, new String[] { in assertContactVisible() 260 final long rawContactId = RawContactUtil.createRawContact(this.mResolver, sTestAccount); in testDelayVisibleTransaction() 274 mResolver.applyBatch(ContactsContract.AUTHORITY, oper); in testDelayVisibleTransaction() 279 mResolver.applyBatch(ContactsContract.AUTHORITY, oper); in testDelayVisibleTransaction() [all …]
|
D | ContactsProvider2TransactionTest.java | 67 mResolver.insert(RawContacts.CONTENT_URI, values); in testTransactionCallback_insert() 77 mResolver.insert(Profile.CONTENT_RAW_CONTACTS_URI, values); in testTransactionCallback_insert() 93 mResolver.insert(RawContacts.CONTENT_URI, values); in testTransactionCallback_update() 94 mResolver.insert(Profile.CONTENT_RAW_CONTACTS_URI, values); in testTransactionCallback_update() 101 assertTrue(mResolver.update(RawContacts.CONTENT_URI, values, null, null) > 0); in testTransactionCallback_update() 111 assertTrue(mResolver.update(Profile.CONTENT_RAW_CONTACTS_URI, values, null, null) > 0); in testTransactionCallback_update() 127 mResolver.insert(RawContacts.CONTENT_URI, values); in testTransactionCallback_delete() 128 mResolver.insert(Profile.CONTENT_RAW_CONTACTS_URI, values); in testTransactionCallback_delete() 132 assertTrue(mResolver.delete(RawContacts.CONTENT_URI, null, null) > 0); in testTransactionCallback_delete() 141 assertTrue(mResolver.delete(Profile.CONTENT_RAW_CONTACTS_URI, null, null) > 0); in testTransactionCallback_delete() [all …]
|
D | SqlInjectionDetectionTest.java | 99 long rawContactId = RawContactUtil.createRawContactWithName(mResolver, "Hot", "Tamale"); in testPhoneQueryBadLimit() 108 final Cursor c = mResolver.query(Phone.CONTENT_URI, PHONE_ID_PROJECTION, null, null, null); in testPhoneQueryBadLimit() 119 final Cursor c = mResolver.query(uri, projection, selection, null, sortOrder); in assertQueryValid() 126 final Cursor c = mResolver.query(uri, projection, selection, null, sortOrder); in assertQueryThrows() 133 mResolver.delete(Contacts.CONTENT_URI, ";delete from contacts;--", null); in testBadDelete() 137 mResolver.delete(Contacts.CONTENT_URI, "_id in data_usage_stat", null); in testBadDelete() 144 mResolver.update(Data.CONTENT_URI, cv(), ";delete from contacts;--", null); in testBadUpdate() 148 mResolver.update(Data.CONTENT_URI, cv(), "_id in data_usage_stat", null); in testBadUpdate() 151 mResolver.update(Data.CONTENT_URI, cv("_id/**/", 1), null, null); in testBadUpdate() 154 mResolver.update(Data.CONTENT_URI, cv("[data1]", 1), null, null); in testBadUpdate() [all …]
|
D | CallLogProviderTest.java | 137 mResolver.delete(Calls.CONTENT_URI_WITH_VOICEMAIL, null, null); in tearDown() 351 Uri uri = mResolver.insert(Calls.CONTENT_URI, values); in testInsert_RegularCallRecord() 375 mResolver.insert(Calls.CONTENT_URI, values); in testInsert_VoicemailCallRecord() 380 Uri uri = mResolver.insert(Calls.CONTENT_URI_WITH_VOICEMAIL, values); in testInsert_VoicemailCallRecord() 399 int count = mResolver.update(uri, values, null, null); in testUpdate() 408 mResolver.delete(uri, null, null); in testDelete() 414 int count = mResolver.delete(Calls.CONTENT_URI, Calls._ID + "=" in testDelete() 422 mResolver.insert(Calls.CONTENT_URI, values); in testCallLogFilter() 425 Cursor c = mResolver.query(filterUri, null, null, null, null); in testCallLogFilter() 432 c = mResolver.query(filterUri, null, null, null, null); in testCallLogFilter() [all …]
|
D | BaseContactsProvider2Test.java | 114 protected MockContentResolver mResolver; field in BaseContactsProvider2Test 151 mResolver = mActor.resolver; in setUp() 212 return mResolver.update(uri, values, null, null); in updateItem() 237 return ContentUris.parseId(mResolver.insert(uri, values)); in createGroup() 255 return mResolver.insert(Settings.CONTENT_URI, values); in createSettings() 278 Uri resultUri = mResolver.insert(Data.CONTENT_URI, values); in insertOrganization() 314 Uri resultUri = mResolver.insert(Data.CONTENT_URI, values); in insertPhoneNumber() 351 Uri resultUri = mResolver.insert(Data.CONTENT_URI, values); in insertEmail() 368 Uri resultUri = mResolver.insert(Data.CONTENT_URI, values); in insertSipAddress() 379 Uri resultUri = mResolver.insert(Data.CONTENT_URI, values); in insertNickname() [all …]
|
/packages/services/Telephony/tests/src/com/android/phone/ |
D | SimPhonebookProviderTest.java | 92 private ContentResolver mResolver; field in SimPhonebookProviderTest 117 mResolver = mProviderRule.getResolver(); in setUp() 119 TestableSimPhonebookProvider.setup(mResolver, mMockSubscriptionManager, mIccPhoneBook); in setUp() 125 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, null, null, in query_entityFiles_returnsCursorWithCorrectProjection() 133 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, new String[0], null, in query_entityFiles_returnsCursorWithCorrectProjection() 139 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, new String[]{ in query_entityFiles_returnsCursorWithCorrectProjection() 146 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, new String[]{ in query_entityFiles_returnsCursorWithCorrectProjection() 158 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, projection, null, null)) { in query_entityFiles_returnsCursorWithCorrectProjection() 166 mResolver.query(ElementaryFiles.CONTENT_URI, new String[]{"invalid_column"}, null, in query_entityFiles_unrecognizedColumn_throwsIllegalArgumentException() 175 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, null, null, null)) { in query_entityFiles_noSim_returnsEmptyCursor() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/graphicsdriver/ |
D | GraphicsDriverEnableForAllAppsPreferenceControllerTest.java | 61 private ContentResolver mResolver; field in GraphicsDriverEnableForAllAppsPreferenceControllerTest 71 mResolver = mContext.getContentResolver(); in setUp() 80 Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1); in setUp() 82 mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, UPDATABLE_DRIVER_DEFAULT); in setUp() 94 mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, UPDATABLE_DRIVER_DEFAULT); in getAvailability_developmentSettingsEnabledAndUpdatableDriverSettingsOn_available() 101 Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); in getAvailability_developmentSettingsDisabled_conditionallyUnavailable() 108 Settings.Global.putInt(mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, in getAvailability_updatableDriverOff_conditionallyUnavailable() 117 mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, UPDATABLE_DRIVER_DEFAULT); in displayPreference_shouldAddListPreference() 129 verify(mGraphicsDriverContentObserver).register(mResolver); in onStart_shouldRegister() 137 verify(mGraphicsDriverContentObserver).unregister(mResolver); in onStop_shouldUnregister() [all …]
|
D | GraphicsDriverGlobalSwitchBarControllerTest.java | 49 private ContentResolver mResolver; field in GraphicsDriverGlobalSwitchBarControllerTest 56 mResolver = mContext.getContentResolver(); in setUp() 62 mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, UPDATABLE_DRIVER_DEFAULT); in constructor_updatableDriverOn_shouldCheckSwitchBar() 71 Settings.Global.putInt(mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, in constructor_updatableDriverOff_shouldUncheckSwitchBar() 81 Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1); in constructor_developmentSettingsEnabled_shouldEnableSwitchBar() 90 Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); in constructor_developmentSettingsDisabled_shouldDisableSwitchBar() 105 verify(mGraphicsDriverContentObserver).register(mResolver); in onStart_shouldStartListeningAndRegister() 116 verify(mGraphicsDriverContentObserver).unregister(mResolver); in onStop_shouldStopListeningAndUnregister() 121 Settings.Global.putInt(mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, in onSwitchToggled_checked_shouldTurnOnUpdatableDriver() 128 mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, in onSwitchToggled_checked_shouldTurnOnUpdatableDriver() [all …]
|
D | GraphicsDriverAppPreferenceControllerTest.java | 82 private ContentResolver mResolver; field in GraphicsDriverAppPreferenceControllerTest 92 mResolver = mContext.getContentResolver(); in setUp() 106 Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1); in getAvailability_developmentSettingsEnabledAndProductionDriverOn_available() 108 mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, UPDATABLE_DRIVER_DEFAULT); in getAvailability_developmentSettingsEnabledAndProductionDriverOn_available() 116 Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0); in getAvailability_developmentSettingsDisabled_conditionallyUnavailable() 124 Settings.Global.putInt(mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, in getAvailability_graphicsDriverOff_conditionallyUnavailable() 147 verify(mGraphicsDriverContentObserver).register(mResolver); in onStart_shouldRegister() 156 verify(mGraphicsDriverContentObserver).unregister(mResolver); in onStop_shouldUnregister() 161 Settings.Global.putInt(mResolver, Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1); in updateState_available_visible() 163 mResolver, Settings.Global.UPDATABLE_DRIVER_ALL_APPS, UPDATABLE_DRIVER_DEFAULT); in updateState_available_visible() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/map/ |
D | SmsMmsContactsTest.java | 53 @Mock private ContentResolver mResolver; field in SmsMmsContactsTest 77 assertThat(SmsMmsContacts.getPhoneNumberUncached(mResolver, TEST_ID)) in getPhoneNumberUncached_withNonEmptyCursor() 88 assertThat(SmsMmsContacts.getPhoneNumberUncached(mResolver, TEST_ID)).isNull(); in getPhoneNumberUncached_withEmptyCursor() 99 mContacts.fillPhoneCache(mResolver); in fillPhoneCache() 101 assertThat(mContacts.getPhoneNumber(mResolver, TEST_ID)).isEqualTo(TEST_PHONE_NUMBER); in fillPhoneCache() 112 mContacts.fillPhoneCache(mResolver); in fillPhoneCache_withNonNullPhoneNumbers() 113 assertThat(mContacts.getPhoneNumber(mResolver, TEST_ID)).isEqualTo(TEST_PHONE_NUMBER); in fillPhoneCache_withNonNullPhoneNumbers() 117 mContacts.fillPhoneCache(mResolver); in fillPhoneCache_withNonNullPhoneNumbers() 119 assertThat(mContacts.getPhoneNumber(mResolver, TEST_ID)).isNull(); in fillPhoneCache_withNonNullPhoneNumbers() 132 mContacts.fillPhoneCache(mResolver); in clearCache() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/ |
D | VolumeSliceHelperTest.java | 61 private ContentResolver mResolver; field in VolumeSliceHelperTest 74 when(mContext.getContentResolver()).thenReturn(mResolver); in setUp() 164 verify(mResolver).notifyChange(mMediaController.getSliceUri(), null); in onReceive_audioStreamRegistered_shouldNotifyChange() 171 verify(mResolver, never()).notifyChange(mMediaController.getSliceUri(), null); in onReceive_audioStreamNotRegistered_shouldNotNotifyChange() 181 verify(mResolver, never()).notifyChange(mMediaController.getSliceUri(), null); in onReceive_audioStreamNotMatched_shouldNotNotifyChange() 192 verify(mResolver, never()).notifyChange(mMediaController.getSliceUri(), null); in onReceive_mediaVolumeNotChanged_shouldNotNotifyChange() 204 verify(mResolver).notifyChange(mSeparateRingController.getSliceUri(), null); in onReceive_ringStreamVolumeMuted_shouldNotifySeparateRing() 216 verify(mResolver).notifyChange(mRingController.getSliceUri(), null); in onReceive_ringStreamVolumeMuted_shouldNotifyRing() 228 verify(mResolver).notifyChange(mSeparateRingController.getSliceUri(), null); in onReceive_ringStreamVolumeMuted_shouldNotifyBothRings() 229 verify(mResolver).notifyChange(mRingController.getSliceUri(), null); in onReceive_ringStreamVolumeMuted_shouldNotifyBothRings() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/ |
D | CardContentProviderTest.java | 50 private ContentResolver mResolver; field in CardContentProviderTest 57 mResolver = mContext.getContentResolver(); in setUp() 76 mResolver.insert(mUri, generateOneRow()); in cardData_insert() 86 mResolver.bulkInsert(mUri, generateTwoRows()); in cardData_bulkInsert_twoRows() 96 mResolver.bulkInsert(mUri, generateTwoRowsWithDismissTimestamp()); in bulkInsert_keepDismissalTimestamp_shouldHaveTimestamp() 98 mResolver.bulkInsert(mUri, generateTwoRows()); in bulkInsert_keepDismissalTimestamp_shouldHaveTimestamp() 106 mResolver.bulkInsert(mUri, generateTwoRowsWithDismissTimestamp()); in bulkInsert_notKeepDismissalTimestamp_shouldNotHaveTimestamp() 108 mResolver.bulkInsert(mUri, generateTwoRows()); in bulkInsert_notKeepDismissalTimestamp_shouldNotHaveTimestamp() 116 mResolver.insert(mUri, generateOneRow()); in cardData_query() 124 mResolver.delete(mUri, null, null); in cardData_delete() [all …]
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarProvider2Test.java | 104 private MockContentResolver mResolver; field in CalendarProvider2Test 314 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() 330 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() 986 mResolver = new MockContentResolver(); in setUp() 998 mContext = new IsolatedContext(mResolver, targetContextWrapper) { in setUp() 1011 mWorkContext = new IsolatedContext(mResolver, targetContextWrapper) { in setUp() 1069 mResolver.addProvider(CalendarContract.AUTHORITY, mProvider); in setUp() 1070 mResolver.addProvider("subscribedfeeds", new MockProvider("subscribedfeeds")); in setUp() 1071 mResolver.addProvider("sync", new MockProvider("sync")); in setUp() 1072 mResolver.addProvider(WORK_PROFILE_AUTHORITY, mWorkProfileProvider); in setUp() [all …]
|
/packages/apps/Car/LocalMediaPlayer/src/com/android/car/media/localmediaplayer/ |
D | DataModel.java | 82 private ContentResolver mResolver; field in DataModel 89 mResolver = context.getContentResolver(); in DataModel() 93 FilesystemListTask query = new FilesystemListTask(result, ALL_AUDIO_URI, mResolver); in onQueryByFolder() 99 .setResolver(mResolver) in onQueryByAlbum() 111 .setResolver(mResolver) in onQueryByArtist() 123 .setResolver(mResolver) in onQueryByGenre() 154 cursor = mResolver.query(uri, null, AudioColumns.TITLE_KEY + " = ?", in getMetadata() 177 InputStream unused = mResolver.openInputStream(albumArtUri); in getMetadata() 205 .setResolver(mResolver) in onQueryByKey() 244 private ContentResolver mResolver; field in DataModel.FilesystemListTask [all …]
|