Home
last modified time | relevance | path

Searched refs:mMockPm (Results 1 – 9 of 9) sorted by relevance

/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/legal/
DLegalPreferenceControllerTestCase.java74 private PackageManager mMockPm; field in LegalPreferenceControllerTestCase
81 when(mContext.getPackageManager()).thenReturn(mMockPm); in setUp()
102 when(mMockPm.queryIntentActivities(any(Intent.class), anyInt())) in getAvailabilityStatus_systemApp_shouldReturnAvailable()
113 when(mMockPm.queryIntentActivities(any(Intent.class), anyInt())) in getAvailabilityStatus_notSystemApp_shouldReturnUnsupported()
118 when(mMockPm.queryIntentActivities(any(Intent.class), anyInt())).thenReturn(null); in getAvailabilityStatus_notSystemApp_shouldReturnUnsupported()
125 when(mMockPm.queryIntentActivities(eq(mPreferenceController.getIntent()), anyInt())) in getAvailabilityStatus_intentResolvesToNull_shouldReturnUnsupported()
139 when(mMockPm.queryIntentActivities(eq(intent), anyInt())).thenReturn(list); in onCreate_intentResolvesToActivity_isVisible()
153 when(mMockPm.queryIntentActivities(eq(intent), anyInt())).thenReturn(list); in onCreate_intentResolvesToActivity_updatesTitle()
167 when(mMockPm.queryIntentActivities(eq(intent), anyInt())).thenReturn(list); in onCreate_intentResolvesToActivity_updatesIntentToSpecificActivity()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/
DResetAppPrefFragmentTest.java80 private PackageManager mMockPm; field in ResetAppPrefFragmentTest
111 when(mContext.getPackageManager()).thenReturn(mMockPm); in setUp()
115 when(mMockPm.getInstalledApplications(anyInt())).thenReturn(mAppInfoList); in setUp()
139 when(mMockPm.getApplicationEnabledSetting(ENABLED_PKG_NAME)) in resetClicked_appEnabled_doesNotEnable()
144 verify(mMockPm, never()).setApplicationEnabledSetting(ENABLED_PKG_NAME, in resetClicked_appEnabled_doesNotEnable()
151 when(mMockPm.getApplicationEnabledSetting(DISABLED_PKG_NAME)) in resetClicked_appDisabled_doesEnable()
156 verify(mMockPm).setApplicationEnabledSetting(DISABLED_PKG_NAME, in resetClicked_appDisabled_doesEnable()
DBluetoothMacAddressPreferenceControllerTest.java60 private PackageManager mMockPm; field in BluetoothMacAddressPreferenceControllerTest
71 when(mContext.getPackageManager()).thenReturn(mMockPm); in setUp()
82 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)).thenReturn(true); in onCreate_setsAddress()
91 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)).thenReturn(false); in getAvailabilityStatus_featureBluetooth_unsupportedOnDevice()
99 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)).thenReturn(true); in getAvailabilityStatus_enableDefaultAdapter_availableForViewing()
DResetNetworkItemsPreferenceControllerTest.java55 private PackageManager mMockPm; field in ResetNetworkItemsPreferenceControllerTest
64 when(mContext.getPackageManager()).thenReturn(mMockPm); in setUp()
136 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_WIFI)).thenReturn(hasWifi); in setSystemFeatures()
137 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)).thenReturn(hasTelephony); in setSystemFeatures()
138 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)).thenReturn(hasBluetooth); in setSystemFeatures()
DSystemUpdatePreferenceControllerTest.java79 private PackageManager mMockPm; field in SystemUpdatePreferenceControllerTest
93 when(mContext.getPackageManager()).thenReturn(mMockPm); in setUp()
138 when(mMockPm.queryIntentActivities(eq(intent), anyInt())).thenReturn( in onCreate_setsActivityLabelAsTitle()
DResetNetworkSubscriptionPreferenceControllerTest.java79 private PackageManager mMockPm; field in ResetNetworkSubscriptionPreferenceControllerTest
91 when(mContext.getPackageManager()).thenReturn(mMockPm); in setUp()
93 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)).thenReturn(true); in setUp()
129 when(mMockPm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)).thenReturn(false); in getAvailabilityStatus_telephonyNotAvailable_unsupportedOnDevice()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/
DInstalledAppCountItemManagerTest.java52 private PackageManager mMockPm; field in InstalledAppCountItemManagerTest
73 when(mContext.getPackageManager()).thenReturn(mMockPm); in isSystemApp_userCanOpen_isCounted()
74 when(mMockPm.queryIntentActivitiesAsUser(any(), anyInt(), anyInt())).thenReturn(intents); in isSystemApp_userCanOpen_isCounted()
83 when(mContext.getPackageManager()).thenReturn(mMockPm); in isSystemApp_userCannotOpen_isNotCounted()
84 when(mMockPm.queryIntentActivitiesAsUser(any(), anyInt(), anyInt())).thenReturn(intents); in isSystemApp_userCannotOpen_isNotCounted()
DApplicationActionButtonsPreferenceControllerTest.java106 private PackageManager mMockPm; field in ApplicationActionButtonsPreferenceControllerTest
196 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onCreate_bundledApp_homePackage_disablesDisableButton()
299 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onStart_noDefaultHome_onlyHomeApp_disablesUninstallButton()
325 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onStart_noDefaultHome_multipleHomeApps_enablesUninstallButton()
351 when(mMockPm.getHomeActivities(anyList())).then(invocation -> { in onStart_defaultHomeApp_disablesUninstallButton()
613 verify(mMockPm).setApplicationEnabledSetting(PACKAGE_NAME, in disableDialogConfirmed_disablesPackage()
626 verify(mMockPm).setApplicationEnabledSetting(PACKAGE_NAME, in enableClicked_enablesPackage()
693 when(mContext.getPackageManager()).thenReturn(mMockPm); in setMocks()
705 when(mMockPm.getPackageInfo(eq(PACKAGE_NAME), anyInt())).thenReturn(mPackageInfo); in setMocks()
706 when(mMockPm.getPackageInfo("android", PackageManager.GET_SIGNATURES)) in setMocks()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/storage/
DStorageApplicationActionButtonsPreferenceControllerTest.java90 private PackageManager mMockPm; field in StorageApplicationActionButtonsPreferenceControllerTest
120 mPreferenceController.setPackageManager(mMockPm); in setUp()
188 doNothing().when(mMockPm).deleteApplicationCacheFiles(anyString(), any()); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
200 verify(mMockPm, never()).deleteApplicationCacheFiles(anyString(), any()); in handleClearCacheClick_disallowedBySystem_shouldNotDeleteApplicationCache()
212 doNothing().when(mMockPm).deleteApplicationCacheFiles(anyString(), any()); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
224 verify(mMockPm).deleteApplicationCacheFiles(anyString(), any()); in handleClearCacheClick_allowedBySystem_shouldNotDeleteApplicationCache()
285 when(mMockPm.resolveActivity(any(Intent.class), eq(0))).thenReturn(new ResolveInfo()); in handleClearDataClick_hasValidManageSpaceActivity_shouldNotShowDialogToClear()
314 when(mMockPm.resolveActivity(any(Intent.class), eq(0))).thenReturn(null); in handleClearDataClick_hasInvalidManageSpaceActivity_shouldShowDialogToClear()