/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | PasspointProviderTest.java | 145 PasspointProvider mProvider; field in PasspointProviderTest 191 PasspointConfiguration actualConfig = mProvider.getConfig(); in verifyInstalledConfig() 473 mProvider = createProvider(config); in verifyModifyOriginalConfig() 493 mProvider = createProvider(config); in verifyModifyRetrievedConfig() 498 PasspointConfiguration retrievedConfig = mProvider.getConfig(); in verifyModifyRetrievedConfig() 521 mProvider = createProvider(config); in installCertsAndKeysSuccess() 534 assertTrue(mProvider.installCertsAndKeys()); in installCertsAndKeysSuccess() 538 PasspointConfiguration curConfig = mProvider.getConfig(); in installCertsAndKeysSuccess() 545 assertTrue(mProvider.getCaCertificateAliases().equals( in installCertsAndKeysSuccess() 547 assertTrue(mProvider.getClientPrivateKeyAndCertificateAlias() in installCertsAndKeysSuccess() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | ContactsProvider2TransactionTest.java | 42 private SynchronousContactsProvider2 mProvider; field in ContactsProvider2TransactionTest 48 mProvider = (SynchronousContactsProvider2) getProvider(); in setUp() 55 mProvider = null; in tearDown() 66 mProvider.resetTrasactionCallbackCalledFlags(); in testTransactionCallback_insert() 71 mProvider.assertCommitTransactionCalledForContactMode(); in testTransactionCallback_insert() 72 mProvider.assertNoTransactionsForProfileMode(); in testTransactionCallback_insert() 76 mProvider.resetTrasactionCallbackCalledFlags(); in testTransactionCallback_insert() 81 mProvider.assertCommitTransactionCalledForContactMode(); in testTransactionCallback_insert() 82 mProvider.assertCommitTransactionCalledForProfileMode(); in testTransactionCallback_insert() 100 mProvider.resetTrasactionCallbackCalledFlags(); in testTransactionCallback_update() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/ |
D | EnterprisePrivacyFeatureProviderImplTest.java | 98 private EnterprisePrivacyFeatureProvider mProvider; field in EnterprisePrivacyFeatureProviderImplTest 110 mProvider = new EnterprisePrivacyFeatureProviderImpl(mContext, mDevicePolicyManager, in setUp() 117 assertThat(mProvider.hasDeviceOwner()).isFalse(); in testHasDeviceOwner() 120 assertThat(mProvider.hasDeviceOwner()).isTrue(); in testHasDeviceOwner() 126 assertThat(mProvider.isInCompMode()).isFalse(); in testIsInCompMode() 129 assertThat(mProvider.isInCompMode()).isTrue(); in testIsInCompMode() 135 assertThat(mProvider.getDeviceOwnerOrganizationName()).isNull(); in testGetDeviceOwnerOrganizationName() 138 assertThat(mProvider.getDeviceOwnerOrganizationName()).isEqualTo(OWNER_ORGANIZATION); in testGetDeviceOwnerOrganizationName() 144 assertThat(mProvider.getDeviceOwnerDisclosure()).isNull(); in testGetDeviceOwnerDisclosure() 150 assertThat(mProvider.getDeviceOwnerDisclosure()).isEqualTo(disclosure); in testGetDeviceOwnerDisclosure() [all …]
|
/packages/services/Mtp/tests/src/com/android/mtp/ |
D | MtpDocumentsProviderTest.java | 49 private MtpDocumentsProvider mProvider; field in MtpDocumentsProviderTest 62 mProvider.shutdown(); in tearDown() 85 mProvider.resumeRootScanner(); in testOpenAndCloseDevice() 88 mProvider.openDevice(0); in testOpenAndCloseDevice() 91 mProvider.closeDevice(0); in testOpenAndCloseDevice() 98 mProvider.openDevice(1); in testOpenAndCloseErrorDevice() 103 assertEquals(0, mProvider.getOpenedDeviceRecordsCache().length); in testOpenAndCloseErrorDevice() 122 mProvider.resumeRootScanner(); in testOpenAndCloseErrorDevice() 124 mProvider.openDevice(0); in testOpenAndCloseErrorDevice() 147 mProvider.resumeRootScanner(); in testOpenDeviceOnDemand() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/ |
D | SettingsSliceProviderTest.java | 123 private SettingsSliceProvider mProvider; field in SettingsSliceProviderTest 150 mProvider = spy(new SettingsSliceProvider()); in setUp() 152 mProvider.mSliceWeakDataCache = new HashMap<>(); in setUp() 153 mProvider.mSlicesDatabaseAccessor = new SlicesDatabaseAccessor(mContext); in setUp() 154 when(mProvider.getContext()).thenReturn(mContext); in setUp() 176 Slice slice = mProvider.onBindSlice(INTENT_SLICE_URI); in testInitialSliceReturned_emptySlice() 186 mProvider.loadSlice(INTENT_SLICE_URI); in testLoadSlice_returnsSliceFromAccessor() 187 SliceData data = mProvider.mSliceWeakDataCache.get(INTENT_SLICE_URI); in testLoadSlice_returnsSliceFromAccessor() 197 mProvider.loadSlice(INTENT_SLICE_URI); in loadSlice_registersIntentFilter() 199 verify(mProvider) in loadSlice_registersIntentFilter() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/survey/ |
D | SurveyMixinTest.java | 43 private SurveyFeatureProvider mProvider; field in SurveyMixinTest 54 mProvider = FakeFeatureFactory.setupForTest().getSurveyFeatureProvider(mContext); in setUp() 55 when(mProvider.getSurveyId(any(), eq(FAKE_KEY))).thenReturn(FAKE_SURVEY_ID); in setUp() 61 when(mProvider.getSurveyExpirationDate(any(), any())).thenReturn(-1L); in onResume_triesRegisteringReceiverAndDownloadingWhenNoSurveyDetected() 70 verify(mProvider, times(1)).downloadSurvey(any(), any(), any()); in onResume_triesRegisteringReceiverAndDownloadingWhenNoSurveyDetected() 72 verify(mProvider, times(1)).createAndRegisterReceiver(any()); in onResume_triesRegisteringReceiverAndDownloadingWhenNoSurveyDetected() 74 verify(mProvider, never()).showSurveyIfAvailable(any(), any()); in onResume_triesRegisteringReceiverAndDownloadingWhenNoSurveyDetected() 80 when(mProvider.getSurveyExpirationDate(any(), any())).thenReturn(0L); in onResume_triesShowingSurveyWhenOneIsPresent() 89 verify(mProvider, never()).downloadSurvey(any(), any(), any()); in onResume_triesShowingSurveyWhenOneIsPresent() 91 verify(mProvider, never()).createAndRegisterReceiver(any()); in onResume_triesShowingSurveyWhenOneIsPresent() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/wifi/ |
D | WifiConfigurationProviderTest.java | 108 private final WifiConfigurationProvider mProvider = new WifiConfigurationProvider(); field in WifiConfigurationProviderTest 112 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration(WIFI_INFO_WPA); in testWpa() 124 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration(WIFI_INFO_WEP); in testWep() 135 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration(WIFI_INFO_WEP_2); in testWep2() 146 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration(WIFI_INFO_NONE); in testNone() 157 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration(WIFI_INFO_NULL); in testNull() 168 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration(WIFI_INFO_PAC); in testPac() 177 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration(WIFI_INFO_PROXY); in testStaticProxy() 186 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration( in testEAP_returnsCorrectKeyManagement() 194 WifiConfiguration wifiConf = mProvider.generateWifiConfiguration( in testEAP_returnsCorrectEnterpriseConfig() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/search/ |
D | SettingsSearchIndexablesProviderTest.java | 54 private SettingsSearchIndexablesProvider mProvider; field in SettingsSearchIndexablesProviderTest 60 mProvider = spy(new SettingsSearchIndexablesProvider()); in setUp() 66 mProvider.attachInfo(RuntimeEnvironment.application, info); in setUp() 98 final Cursor cursor = mProvider.query(rawUri, in testRawColumnFetched() 120 final Cursor cursor = mProvider.query(rawUri, in testResourcesColumnFetched() 141 try (Cursor cursor = mProvider.query(rawUri, in testNonIndexablesColumnFetched() 154 mProvider.refreshSearchEnabledState(mContext, in refreshSearchEnabledState_classNotFoundInCategoryMap_hasInjectionRawData() 157 assertThat(mProvider.getInjectionIndexableRawData(mContext)).isNotEmpty(); in refreshSearchEnabledState_classNotFoundInCategoryMap_hasInjectionRawData() 164 mProvider.refreshSearchEnabledState(mContext, in refreshSearchEnabledState_noDashboardCategory_hasInjectionRawData() 167 assertThat(mProvider.getInjectionIndexableRawData(mContext)).isNotEmpty(); in refreshSearchEnabledState_noDashboardCategory_hasInjectionRawData() [all …]
|
D | SearchFeatureProviderImplTest.java | 48 private SearchFeatureProviderImpl mProvider; field in SearchFeatureProviderImplTest 56 mProvider = new SearchFeatureProviderImpl(); in setUp() 72 mProvider.initSearchToolbar(mActivity, null, SettingsEnums.TESTING); in initSearchToolbar_hasResolvedInfo_shouldStartCorrectIntent() 77 mProvider.initSearchToolbar(mActivity, toolbar, SettingsEnums.TESTING); in initSearchToolbar_hasResolvedInfo_shouldStartCorrectIntent() 92 mProvider.initSearchToolbar(mActivity, toolbar, SettingsEnums.TESTING); in initSearchToolbar_noResolvedInfo_shouldNotStartActivity() 115 final Intent searchIntent = mProvider.buildSearchIntent(mActivity, SettingsEnums.TESTING); in buildSearchIntent_shouldIncludeReferrer() 124 mProvider.verifyLaunchSearchResultPageCaller(mActivity, null /* caller */); in verifyLaunchSearchResultPageCaller_nullCaller_shouldCrash() 130 mProvider.verifyLaunchSearchResultPageCaller(mActivity, cn); in verifyLaunchSearchResultPageCaller_badCaller_shouldCrash() 136 mProvider.verifyLaunchSearchResultPageCaller(mActivity, cn); in verifyLaunchSearchResultPageCaller_settingsCaller_shouldNotCrash() 141 final String packageName = mProvider.getSettingsIntelligencePkgName(mActivity); in verifyLaunchSearchResultPageCaller_settingsIntelligenceCaller_shouldNotCrash() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/search/ |
D | CarSettingsSearchIndexablesProviderTest.java | 69 private CarSettingsSearchIndexablesProvider mProvider; field in CarSettingsSearchIndexablesProviderTest 88 mProvider = new CarSettingsSearchIndexablesProvider(); in setup() 89 mProvider.setResources(mSearchIndexableResources); in setup() 94 assertThat(mProvider.queryXmlResources(null).getCount()).isEqualTo(0); in queryXmlResources_onEmptyResources_returnsEmptyList() 107 Cursor c = mProvider.queryXmlResources(null); in queryXmlResources_fillsColumns() 129 Cursor c = mProvider.queryXmlResources(null); in queryXmlResources_returnsAllRows() 151 Cursor c = mProvider.queryXmlResources(null); in queryXmlResources_onPartiallyFilledFields_returnsPartialRows() 166 assertThat(mProvider.queryXmlResources(null).getCount()).isEqualTo(0); in queryXmlResources_onNullResources_returnsEmptyList() 179 Cursor c = mProvider.queryRawData(null); in queryRawData_fillsColumns() 199 Cursor c = mProvider.queryRawData(null); in queryRawData_returnsAllRows() [all …]
|
/packages/apps/ThemePicker/src/com/android/customization/model/grid/ |
D | GridOptionsManager.java | 42 private final LauncherGridOptionsProvider mProvider; field in GridOptionsManager 62 mProvider = provider; in GridOptionsManager() 68 return mProvider.areGridsAvailable(); in isAvailable() 73 int updated = mProvider.applyGrid(option.name); in apply() 84 new FetchTask(mProvider, callback, reload).execute(); in fetchOptions() 90 mProvider.renderPreview(gridName, bundle, callback); in renderPreview() 94 private final LauncherGridOptionsProvider mProvider; field in GridOptionsManager.FetchTask 101 mProvider = provider; in FetchTask() 107 return mProvider.fetch(mReload); in doInBackground()
|
/packages/providers/TvProvider/tests/src/com/android/providers/tv/ |
D | UnrecognizedColumnsTest.java | 26 private TvProviderForTesting mProvider; field in UnrecognizedColumnsTest 42 mProvider = new TvProviderForTesting(); in setUp() 43 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 54 mProvider.attachInfoForTesting(getContext(), info); in setUp() 61 mProvider.setOpenHelper(null, true); in tearDown() 62 mProvider.shutdown(); in tearDown() 104 mProvider.callingPackage = MY_PACKAGE; in insertPrograms() 109 mProvider.callingPackage = ANOTHER_PACKAGE; in insertPrograms() 114 mProvider.callingPackage = MY_PACKAGE; in insertPrograms()
|
D | BootCompletedReceiverTest.java | 45 private TvProviderForTesting mProvider; field in BootCompletedReceiverTest 60 mProvider = new TvProviderForTesting(); in setUp() 61 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 70 mProvider.attachInfoForTesting(getContext(), info); in setUp() 84 mProvider.shutdown(); in tearDown() 103 mProvider.callingPackage = NON_EXISTING_PACKAGE_NAME; in testPackageRemoved() 118 mProvider.callingPackage = EXISTING_PACKAGE_NAME; in testPackageRemoved()
|
D | PackageRemovedReceiverTest.java | 45 private TvProviderForTesting mProvider; field in PackageRemovedReceiverTest 60 mProvider = new TvProviderForTesting(); in setUp() 61 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp() 67 mProvider.attachInfoForTesting(getContext(), info); in setUp() 81 mProvider.shutdown(); in tearDown() 95 mProvider.callingPackage = FAKE_PACKAGE_NAME_1; in testPackageRemoved() 106 mProvider.callingPackage = FAKE_PACKAGE_NAME_2; in testPackageRemoved()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/ |
D | SuggestionStateProviderTest.java | 40 private SuggestionStateProvider mProvider; field in SuggestionStateProviderTest 48 mProvider = Robolectric.setupContentProvider(SuggestionStateProvider.class); in setUp() 53 mProvider.query(null, null, null, null, null); in query_shouldCrash() 58 mProvider.getType(null); in getType_shouldCrash() 63 mProvider.insert(null, null); in insert_shouldCrash() 68 mProvider.delete(null, null, null); in delete_shouldCrash() 73 mProvider.update(null, null, null, null); in update_shouldCrash() 82 mProvider.call(SuggestionStateProvider.METHOD_GET_SUGGESTION_STATE, "foobar", extras); in getSuggestionState_shouldQueryFeatureProvider()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/ |
D | CardContentProviderTest.java | 48 private CardContentProvider mProvider; field in CardContentProviderTest 55 mProvider = spy(Robolectric.setupContentProvider(CardContentProvider.class)); in setUp() 138 mProvider.insert(mUri, generateOneRow()); in insert_isMainThread_shouldEnableStrictMode() 140 verify(mProvider).enableStrictMode(); in insert_isMainThread_shouldEnableStrictMode() 148 mProvider.query(mUri, null, null, null); in query_isMainThread_shouldEnableStrictMode() 150 verify(mProvider).enableStrictMode(); in query_isMainThread_shouldEnableStrictMode() 158 mProvider.insert(mUri, generateOneRow()); in insert_notMainThread_shouldNotEnableStrictMode() 160 verify(mProvider, never()).enableStrictMode(); in insert_notMainThread_shouldNotEnableStrictMode() 168 mProvider.query(mUri, null, null, null); in query_notMainThread_shouldNotEnableStrictMode() 170 verify(mProvider, never()).enableStrictMode(); in query_notMainThread_shouldNotEnableStrictMode() [all …]
|
D | SettingsContextualCardProviderTest.java | 49 private SettingsContextualCardProvider mProvider; field in SettingsContextualCardProviderTest 54 mProvider = spy(Robolectric.setupContentProvider(SettingsContextualCardProvider.class)); in setUp() 57 doReturn(context).when(mProvider).getContext(); in setUp() 62 final int actualNo = mProvider.getContextualCards().getCardCount(); in contentProviderCall_returnCorrectSize() 65 mProvider.call(ContextualCardProvider.METHOD_GET_CARD_LIST, "", null); in contentProviderCall_returnCorrectSize() 74 final ContextualCardList cards = mProvider.getContextualCards(); in getContextualCards_wifiSlice_shouldGetImportantCategory()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | ApplicationFeatureProviderImplTest.java | 92 private ApplicationFeatureProvider mProvider; field in ApplicationFeatureProviderImplTest 105 mProvider = new ApplicationFeatureProviderImpl(mContext, mPackageManager, in setUp() 118 mProvider.calculateNumberOfPolicyInstalledApps(async, (num) -> mAppCount = num); in verifyCalculateNumberOfPolicyInstalledApps() 135 mProvider.listPolicyInstalledApps((list) -> mAppList = list); in testListPolicyInstalledApps() 169 mProvider.calculateNumberOfAppsWithAdminGrantedPermissions(new String[]{PERMISSION}, async, in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 206 mProvider.listAppsWithAdminGrantedPermissions(new String[]{PERMISSION}, in testListAppsWithAdminGrantedPermissions() 254 assertThat(mProvider.findPersistentPreferredActivities(MAIN_USER_ID, in testFindPersistentPreferredActivities() 257 assertThat(mProvider.findPersistentPreferredActivities(MANAGED_PROFILE_ID, in testFindPersistentPreferredActivities() 277 ReflectionHelpers.setField(mProvider, "mContext", spyContext); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory() 279 final Set<String> keepEnabledPackages = mProvider.getKeepEnabledPackages(); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory() [all …]
|
D | GameSettingsPreferenceControllerTest.java | 42 private GameSettingsFeatureProvider mProvider; field in GameSettingsPreferenceControllerTest 50 mProvider = FakeFeatureFactory.setupForTest().getGameSettingsFeatureProvider(); in setUp() 51 mController = new GameSettingsPreferenceController(mContext, "test_key", mProvider); in setUp() 56 when(mProvider.isSupported(mContext)).thenReturn(true); in getAvailabilityStatus_GameSettingsFeatureEnabled_shouldReturnAVAILABLE() 62 when(mProvider.isSupported(mContext)).thenReturn(false); in getAvailabilityStatus_GameSettingsFeatureDisabled_shouldReturnUNSUPPORTED_ON_DEVICE()
|
/packages/apps/Messaging/tests/src/com/android/messaging/ |
D | FakeContentProvider.java | 70 private final ContentProviderClient mProvider; field in FakeContentProvider 77 mProvider = mGlobalContext.getContentResolver().acquireContentProviderClient(mUri); in FakeContentProvider() 79 mProvider = null; in FakeContentProvider() 104 if (mProvider != null) { in shutdown() 105 mProvider.release(); in shutdown() 122 if (mProvider != null) { in query() 126 final Cursor cursor = mProvider.query(uri, projection, selection, selectionArgs, in query() 146 type = mProvider.getType(uri); in getType()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | QueryTask.java | 36 private final SuggestionCursorProvider<C> mProvider; field in QueryTask 54 mProvider = provider; in QueryTask() 61 return mProvider.getName(); in getName() 66 final C cursor = mProvider.getSuggestions(mQuery, mQueryLimit); in run() 67 if (DBG) Log.d(TAG, "Suggestions from " + mProvider + " = " + cursor); in run() 73 return mProvider + "[" + mQuery + "]"; in toString()
|
/packages/apps/StorageManager/src/com/android/storagemanager/automatic/ |
D | AutomaticStorageManagementJobService.java | 45 private StorageManagementJobProvider mProvider; field in AutomaticStorageManagementJobService 60 mProvider = FeatureFactory.getFactory(this).getStorageManagementJobProvider(); in onStartJob() 61 if (maybeDisableDueToPolicy(mProvider, this, getClock())) { in onStartJob() 85 if (mProvider != null) { in onStartJob() 86 return mProvider.onStartJob(this, args, getDaysToRetain()); in onStartJob() 95 if (mProvider != null) { in onStopJob() 96 return mProvider.onStopJob(this, args); in onStopJob()
|
/packages/apps/ThemePicker/src/com/android/customization/model/theme/ |
D | ThemeManager.java | 58 private final ThemeBundleProvider mProvider; field in ThemeManager 69 mProvider = provider; in ThemeManager() 77 return mOverlayManagerCompat.isAvailable() && mProvider.isAvailable(); in isAvailable() 101 mProvider.storeCustomTheme(theme); in storeCustomTheme() 106 mProvider.fetch(callback, reload); in fetchOptions() 125 mProvider.removeCustomTheme(theme); in removeCustomTheme() 134 return mProvider.findEquivalent(other); in findThemeByPackages()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryActiveView.java | 28 private BatteryActiveProvider mProvider; field in BatteryActiveView 35 mProvider = provider; in setProvider() 51 if (mProvider == null) { in onDraw() 54 SparseIntArray array = mProvider.getColorArray(); in onDraw() 55 float period = mProvider.getPeriod(); in onDraw()
|
/packages/apps/EmergencyInfo/tests/robolectric/src/com/android/emergency/ |
D | EmergencySearchIndexablesProviderTest.java | 36 private EmergencySearchIndexablesProvider mProvider; field in EmergencySearchIndexablesProviderTest 40 mProvider = new EmergencySearchIndexablesProvider(); in setUp() 45 Cursor cursor = mProvider.queryXmlResources( in testQueryXmlResources() 65 Cursor cursor = mProvider.queryRawData(SearchIndexablesContract.INDEXABLES_RAW_COLUMNS); in testQueryRawData() 73 Cursor cursor = mProvider.queryNonIndexableKeys( in testQueryNonIndexableKeys()
|