Home
last modified time | relevance | path

Searched refs:mProvider (Results 1 – 25 of 52) sorted by relevance

123

/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DContactsProvider2TransactionTest.java42 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/
DEnterprisePrivacyFeatureProviderImplTest.java89 private EnterprisePrivacyFeatureProvider mProvider; field in EnterprisePrivacyFeatureProviderImplTest
101 mProvider = new EnterprisePrivacyFeatureProviderImpl(mContext, mDevicePolicyManager, in setUp()
108 assertThat(mProvider.hasDeviceOwner()).isFalse(); in testHasDeviceOwner()
111 assertThat(mProvider.hasDeviceOwner()).isTrue(); in testHasDeviceOwner()
117 assertThat(mProvider.isInCompMode()).isFalse(); in testIsInCompMode()
120 assertThat(mProvider.isInCompMode()).isTrue(); in testIsInCompMode()
126 assertThat(mProvider.getDeviceOwnerOrganizationName()).isNull(); in testGetDeviceOwnerOrganizationName()
129 assertThat(mProvider.getDeviceOwnerOrganizationName()).isEqualTo(OWNER_ORGANIZATION); in testGetDeviceOwnerOrganizationName()
135 assertThat(mProvider.getDeviceOwnerDisclosure()).isNull(); in testGetDeviceOwnerDisclosure()
144 assertThat(mProvider.getDeviceOwnerDisclosure()).isEqualTo(disclosure); in testGetDeviceOwnerDisclosure()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/
DSettingsSliceProviderTest.java111 private SettingsSliceProvider mProvider; field in SettingsSliceProviderTest
136 mProvider = spy(new SettingsSliceProvider()); in setUp()
138 mProvider.mSliceWeakDataCache = new HashMap<>(); in setUp()
139 mProvider.mSlicesDatabaseAccessor = new SlicesDatabaseAccessor(mContext); in setUp()
140 when(mProvider.getContext()).thenReturn(mContext); in setUp()
160 Slice slice = mProvider.onBindSlice(uri); in testInitialSliceReturned_emptySlice()
171 mProvider.loadSlice(uri); in testLoadSlice_returnsSliceFromAccessor()
172 SliceData data = mProvider.mSliceWeakDataCache.get(uri); in testLoadSlice_returnsSliceFromAccessor()
183 mProvider.loadSlice(uri); in loadSlice_registersIntentFilter()
185 verify(mProvider).registerIntentToUri(eq(FakeToggleController.INTENT_FILTER), eq(uri)); in loadSlice_registersIntentFilter()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/survey/
DSurveyMixinTest.java43 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/
DWifiConfigurationProviderTest.java108 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/
DSearchFeatureProviderImplTest.java48 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/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/
DCardContentProviderTest.java49 private CardContentProvider mProvider; field in CardContentProviderTest
56 mProvider = spy(Robolectric.setupContentProvider(CardContentProvider.class)); in setUp()
120 mProvider.insert(mUri, generateOneRow()); in insert_isMainThread_shouldEnableStrictMode()
122 verify(mProvider).enableStrictMode(); in insert_isMainThread_shouldEnableStrictMode()
130 mProvider.query(mUri, null, null, null); in query_isMainThread_shouldEnableStrictMode()
132 verify(mProvider).enableStrictMode(); in query_isMainThread_shouldEnableStrictMode()
140 mProvider.insert(mUri, generateOneRow()); in insert_notMainThread_shouldNotEnableStrictMode()
142 verify(mProvider, never()).enableStrictMode(); in insert_notMainThread_shouldNotEnableStrictMode()
150 mProvider.query(mUri, null, null, null); in query_notMainThread_shouldNotEnableStrictMode()
152 verify(mProvider, never()).enableStrictMode(); in query_notMainThread_shouldNotEnableStrictMode()
[all …]
DSettingsContextualCardProviderTest.java49 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/providers/TvProvider/tests/src/com/android/providers/tv/
DUnrecognizedColumnsTest.java26 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()
DBootCompletedReceiverTest.java45 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()
DPackageRemovedReceiverTest.java45 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()
DTransientRowHelperTests.java51 private TvProviderForTesting mProvider; field in TransientRowHelperTests
66 mProvider = new TvProviderForTesting(); in setUp()
67 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp()
73 mProvider.attachInfoForTesting(getContext(), info); in setUp()
75 new RebootSimulatingTransientRowHelper(getContext(), mProvider.getDatabaseHelper()); in setUp()
76 mProvider.setTransientRowHelper(mTransientRowHelper); in setUp()
83 mProvider.shutdown(); in tearDown()
DParametersTest.java38 private TvProviderForTesting mProvider; field in ParametersTest
53 mProvider = new TvProviderForTesting(); in setUp()
54 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp()
61 mProvider.attachInfoForTesting(getContext(), info); in setUp()
68 mProvider.shutdown(); in tearDown()
100 mProvider.callingPackage = packageName; in insertChannelWithPackageName()
102 mProvider.callingPackage = null; in insertChannelWithPackageName()
DDatabaseHelperTest.java35 private TvProviderForTesting mProvider; field in DatabaseHelperTest
48 mProvider = new TvProviderForTesting(); in setUp()
49 mResolver.addProvider(TvContract.AUTHORITY, mProvider); in setUp()
55 mProvider.attachInfoForTesting(getContext(), info); in setUp()
59 mProvider.setOpenHelper(mDatabaseHelper, false); in setUp()
64 mProvider.shutdown(); in tearDown()
75 mProvider.setOpenHelper( in testUpgradeDatabase()
/packages/apps/ThemePicker/src/com/android/customization/model/grid/
DGridOptionsManager.java34 private final LauncherGridOptionsProvider mProvider; field in GridOptionsManager
38 mProvider = provider; in GridOptionsManager()
44 return mProvider.areGridsAvailable(); in isAvailable()
49 int updated = mProvider.applyGrid(option.name); in apply()
60 new FetchTask(mProvider, callback).execute(); in fetchOptions()
64 private final LauncherGridOptionsProvider mProvider; field in GridOptionsManager.FetchTask
70 mProvider = provider; in FetchTask()
75 return mProvider.fetch(false); in doInBackground()
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/
DSuggestionStateProviderTest.java40 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/applications/
DApplicationFeatureProviderImplTest.java91 private ApplicationFeatureProvider mProvider; field in ApplicationFeatureProviderImplTest
104 mProvider = new ApplicationFeatureProviderImpl(mContext, mPackageManager, in setUp()
117 mProvider.calculateNumberOfPolicyInstalledApps(async, (num) -> mAppCount = num); in verifyCalculateNumberOfPolicyInstalledApps()
134 mProvider.listPolicyInstalledApps((list) -> mAppList = list); in testListPolicyInstalledApps()
168 mProvider.calculateNumberOfAppsWithAdminGrantedPermissions(new String[] {PERMISSION}, async, in verifyCalculateNumberOfAppsWithAdminGrantedPermissions()
205 mProvider.listAppsWithAdminGrantedPermissions(new String[] {PERMISSION}, in testListAppsWithAdminGrantedPermissions()
253 assertThat(mProvider.findPersistentPreferredActivities(MAIN_USER_ID, in testFindPersistentPreferredActivities()
256 assertThat(mProvider.findPersistentPreferredActivities(MANAGED_PROFILE_ID, in testFindPersistentPreferredActivities()
276 ReflectionHelpers.setField(mProvider, "mContext", spyContext); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory()
278 final Set<String> keepEnabledPackages = mProvider.getKeepEnabledPackages(); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory()
[all …]
/packages/apps/Messaging/tests/src/com/android/messaging/
DFakeContentProvider.java70 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/StorageManager/src/com/android/storagemanager/automatic/
DAutomaticStorageManagementJobService.java45 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/QuickSearchBox/src/com/android/quicksearchbox/
DQueryTask.java36 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/Settings/tests/robotests/src/com/android/settings/panel/
DPanelFeatureProviderImplTest.java40 private PanelFeatureProviderImpl mProvider; field in PanelFeatureProviderImplTest
45 mProvider = new PanelFeatureProviderImpl(); in setUp()
50 final PanelContent panel = mProvider.getPanel(mContext, in getPanel_internetConnectivityKey_returnsCorrectPanel()
58 final PanelContent panel = mProvider.getPanel(mContext, in getPanel_volume_returnsCorrectPanel()
66 final PanelContent panel = mProvider.getPanel(mContext, in getPanel_mediaOutputKey_returnsCorrectPanel()
/packages/apps/ThemePicker/src/com/android/customization/model/theme/
DThemeManager.java65 private final ThemeBundleProvider mProvider; field in ThemeManager
77 mProvider = provider; in ThemeManager()
86 return mOverlayManagerCompat.isAvailable() && mProvider.isAvailable(); in isAvailable()
170 mProvider.storeCustomTheme(theme);
175 mProvider.fetch(callback, reload);
194 mProvider.removeCustomTheme(theme);
203 return mProvider.findEquivalent(other);
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryActiveView.java28 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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/
DBatteryActiveView.java28 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/
DEmergencySearchIndexablesProviderTest.java36 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()

123