/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | InstalledAppCounterTest.java | 85 private PackageManagerWrapper mPackageManager; field in InstalledAppCounterTest 115 when(mPackageManager.queryIntentActivitiesAsUser( in expectQueryIntentActivities() 136 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MAIN_USER_ID)); in testCountInstalledAppsAcrossAllUsers() 137 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), in testCountInstalledAppsAcrossAllUsers() 139 verify(mPackageManager, atLeast(0)).queryIntentActivitiesAsUser(anyObject(), anyInt(), in testCountInstalledAppsAcrossAllUsers() 141 verifyNoMoreInteractions(mPackageManager); in testCountInstalledAppsAcrossAllUsers() 152 mPackageManager, mApp1)).isTrue(); in testIncludeInCount() 154 mPackageManager, mApp2)).isTrue(); in testIncludeInCount() 156 mPackageManager, mApp3)).isTrue(); in testIncludeInCount() 158 mPackageManager, mApp4)).isFalse(); in testIncludeInCount() [all …]
|
D | AppWithAdminGrantedPermissionsCounterTest.java | 84 @Mock private PackageManagerWrapper mPackageManager; field in AppWithAdminGrantedPermissionsCounterTest 128 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MAIN_USER_ID)); in verifyCountInstalledApps() 129 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), in verifyCountInstalledApps() 131 verify(mPackageManager, atLeast(0)).getInstallReason(anyObject(), anyObject()); in verifyCountInstalledApps() 132 verifyNoMoreInteractions(mPackageManager); in verifyCountInstalledApps() 142 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp1)).isTrue(); in testIncludeInCount() 145 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp2)).isFalse(); in testIncludeInCount() 148 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp3)).isTrue(); in testIncludeInCount() 151 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp4)).isFalse(); in testIncludeInCount() 154 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp5)).isFalse(); in testIncludeInCount() [all …]
|
D | InstalledAppListerTest.java | 79 @Mock private PackageManagerWrapper mPackageManager; field in InstalledAppListerTest 89 when(mPackageManager.queryIntentActivitiesAsUser( in expectQueryIntentActivities() 109 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in testCountInstalledAppsAcrossAllUsers() 128 when(mPackageManager.getInstallReason(APP_1, mainUser)) in testCountInstalledAppsAcrossAllUsers() 130 when(mPackageManager.getInstallReason(APP_2, mainUser)) in testCountInstalledAppsAcrossAllUsers() 132 when(mPackageManager.getInstallReason(APP_3, mainUser)) in testCountInstalledAppsAcrossAllUsers() 134 when(mPackageManager.getInstallReason(APP_4, mainUser)) in testCountInstalledAppsAcrossAllUsers() 140 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in testCountInstalledAppsAcrossAllUsers() 151 when(mPackageManager.getInstallReason(APP_5, managedProfileUser)) in testCountInstalledAppsAcrossAllUsers() 153 when(mPackageManager.getInstallReason(APP_6, managedProfileUser)) in testCountInstalledAppsAcrossAllUsers() [all …]
|
D | AppWithAdminGrantedPermissionsListerTest.java | 82 @Mock private PackageManagerWrapper mPackageManager; field in AppWithAdminGrantedPermissionsListerTest 111 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in verifyListInstalledApps() 153 when(mPackageManager.getInstallReason(APP_1, mainUser)) in verifyListInstalledApps() 155 when(mPackageManager.getInstallReason(APP_2, mainUser)) in verifyListInstalledApps() 157 when(mPackageManager.getInstallReason(APP_3, mainUser)) in verifyListInstalledApps() 159 when(mPackageManager.getInstallReason(APP_4, mainUser)) in verifyListInstalledApps() 161 when(mPackageManager.getInstallReason(APP_5, mainUser)) in verifyListInstalledApps() 166 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in verifyListInstalledApps() 181 when(mPackageManager.getInstallReason(APP_6, managedProfileUser)) in verifyListInstalledApps() 203 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MAIN_USER_ID)); in verifyListInstalledApps() [all …]
|
D | ApplicationFeatureProviderImplTest.java | 74 private @Mock PackageManagerWrapper mPackageManager; field in ApplicationFeatureProviderImplTest 90 mProvider = new ApplicationFeatureProviderImpl(mContext, mPackageManager, in setUp() 97 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in verifyCalculateNumberOfPolicyInstalledApps() 99 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in verifyCalculateNumberOfPolicyInstalledApps() 115 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in testListPolicyInstalledApps() 117 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in testListPolicyInstalledApps() 149 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 151 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 186 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in testListAppsWithAdminGrantedPermissions() 188 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in testListAppsWithAdminGrantedPermissions() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | CrossProfileIntentFiltersSetterTest.java | 50 @Mock PackageManager mPackageManager; field in CrossProfileIntentFiltersSetterTest 59 mSetter = new CrossProfileIntentFiltersSetter(mPackageManager, mUserManager); in setUp() 68 verify(mPackageManager, times(CrossProfileIntentFiltersSetter.FILTERS.size())) in testSetFilters() 72 verify(mPackageManager).addCrossProfileIntentFilter( in testSetFilters() 78 verify(mPackageManager).addCrossProfileIntentFilter( in testSetFilters() 95 verifyZeroInteractions(mPackageManager); in testResetFilters_NoProfiles() 110 verify(mPackageManager).clearCrossProfileIntentFilters(TEST_PARENT_USER_ID); in testResetFilters_OneProfile() 111 verify(mPackageManager).clearCrossProfileIntentFilters(TEST_PROFILE_USER_ID); in testResetFilters_OneProfile() 114 verify(mPackageManager, times(CrossProfileIntentFiltersSetter.FILTERS.size())) in testResetFilters_OneProfile()
|
D | DeleteNonRequiredAppsTaskTest.java | 62 private FakePackageManager mPackageManager; field in DeleteNonRequiredAppsTaskTest 70 mPackageManager = new FakePackageManager(); in setUp() 72 when(mTestContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 85 mPackageManager.setInstalledApps(setFromArray("app.a")); in testNoAppsToDelete() 107 mPackageManager.setInstalledApps(setFromArray("app.a", "app.c")); in testAppsToDelete() 148 mPackageManager.setInstalledApps(setFromArray("app.a")); in testDeletionFailed() 151 mPackageManager.setDeletionSucceeds(false); in testDeletionFailed()
|
D | InstallExistingPackageTaskTest.java | 53 @Mock private PackageManager mPackageManager; field in InstallExistingPackageTaskTest 61 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 70 when(mPackageManager.installExistingPackageAsUser(INSTALL_PACKAGE_NAME, TEST_USER_ID)) in testSuccess() 77 verify(mPackageManager).installExistingPackageAsUser(INSTALL_PACKAGE_NAME, TEST_USER_ID); in testSuccess() 85 when(mPackageManager.installExistingPackageAsUser(INSTALL_PACKAGE_NAME, TEST_USER_ID)) in testPackageNotFound() 99 when(mPackageManager.installExistingPackageAsUser(INSTALL_PACKAGE_NAME, TEST_USER_ID)) in testInstallFailed()
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | ContactDirectoryManagerTest.java | 56 private ContactsMockPackageManager mPackageManager; field in ContactDirectoryManagerTest 121 mPackageManager = (ContactsMockPackageManager) getProvider() in setUp() 159 mPackageManager.setInstalledPackages( in testScanAllProviders() 233 mPackageManager.setInstalledPackages( in testScanAllProviders_scanCondition() 240 mPackageManager.setInstalledPackages( in testScanAllProviders_scanCondition() 246 mPackageManager.setInstalledPackages( in testScanAllProviders_scanCondition() 255 mPackageManager.setInstalledPackages( in testPackageInstalled() 284 mPackageManager.getInstalledPackages(0).add( in testPackageInstalled() 306 mPackageManager.setInstalledPackages( in testPackageUninstalled() 336 mPackageManager.getInstalledPackages(0).remove(1); in testPackageUninstalled() [all …]
|
/packages/apps/Settings/src/com/android/settings/search/ |
D | DynamicIndexableContentMonitor.java | 249 @Nullable private PackageManager mPackageManager; field in DynamicIndexableContentMonitor.PackageChangeMonitor 254 if (mPackageManager != null) { in registerMonitor() 257 mPackageManager = context.getPackageManager(); in registerMonitor() 267 if (mPackageManager == null) { in unregisterMonitor() 271 mPackageManager = null; in unregisterMonitor() 291 final int state = mPackageManager.getApplicationEnabledSetting(packageName); in onPackageModified() 323 private PackageManager mPackageManager; field in DynamicIndexableContentMonitor.AccessibilityServicesMonitor 345 mPackageManager = context.getPackageManager(); in initialize() 371 final List<ResolveInfo> services = mPackageManager in onPackageAvailable() 394 private PackageManager mPackageManager; field in DynamicIndexableContentMonitor.InputMethodServicesMonitor [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/defaultapps/ |
D | DefaultBrowserPreferenceControllerTest.java | 60 private PackageManagerWrapper mPackageManager; field in DefaultBrowserPreferenceControllerTest 70 ReflectionHelpers.setField(mController, "mPackageManager", mPackageManager); in setUp() 75 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in isAvailable_noBrowser_shouldReturnFalse() 84 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in isAvailable_hasBrowser_shouldReturnTrue() 91 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getSoleAppLabel_hasNoApp_shouldNotReturnLabel() 103 verify(mPackageManager).getDefaultBrowserPackageNameAsUser(anyInt()); in getDefaultApp_shouldGetDefaultBrowserPackage() 109 when(mPackageManager.getDefaultBrowserPackageNameAsUser(anyInt())) in isBrowserDefault_onlyApp_shouldReturnTrue() 111 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in isBrowserDefault_onlyApp_shouldReturnTrue()
|
/packages/apps/Settings/src/com/android/settings/applications/defaultapps/ |
D | DefaultBrowserPreferenceController.java | 63 return new DefaultAppInfo(mPackageManager, in getDefaultAppInfo() 64 mPackageManager.getPackageManager().getApplicationInfo( in getDefaultAppInfo() 65 mPackageManager.getDefaultBrowserPackageNameAsUser(mUserId), 0)); in getDefaultAppInfo() 85 return mPackageManager.queryIntentActivitiesAsUser(BROWSE_PROBE, PackageManager.MATCH_ALL, in getCandidates() 93 return list.get(0).loadLabel(mPackageManager.getPackageManager()).toString(); in getOnlyAppLabel() 113 String defaultPackage = mPackageManager.getDefaultBrowserPackageNameAsUser(userId); in isBrowserDefault() 118 final List<ResolveInfo> list = mPackageManager.queryIntentActivitiesAsUser(BROWSE_PROBE, in isBrowserDefault()
|
/packages/apps/TV/src/com/android/tv/menu/ |
D | AppLinkCardView.java | 63 private final PackageManager mPackageManager; field in AppLinkCardView 82 mPackageManager = context.getPackageManager(); in AppLinkCardView() 112 mAppInfoView.setText(mPackageManager.getApplicationLabel(appInfo)); in onBind() 118 Drawable appIcon = mPackageManager.getApplicationIcon(appInfo); in onBind() 127 mPackageManager.getApplicationLabel(appInfo))); in onBind() 215 banner = mPackageManager.getActivityBanner(mIntent); 217 banner = mPackageManager.getActivityIcon(mIntent); 226 banner = mPackageManager.getApplicationBanner(appInfo); 229 banner = mPackageManager.getApplicationIcon(appInfo);
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/ |
D | MoveAppActivity.java | 45 private PackageManager mPackageManager; field in MoveAppActivity 76 mPackageManager = getPackageManager(); in onCreate() 77 mPackageManager.registerMoveCallback(mMoveCallback, new Handler()); in onCreate() 101 mPackageManager.unregisterMoveCallback(mMoveCallback); in onDestroy() 106 mAppMoveId = mPackageManager.movePackage(packageName, destination); in onRequestMovePackageToVolume() 109 applicationInfo = mPackageManager in onRequestMovePackageToVolume() 116 .newInstance(mPackageManager.getApplicationLabel(applicationInfo)); in onRequestMovePackageToVolume()
|
/packages/apps/MusicFX/src/com/android/musicfx/ |
D | Compatibility.java | 110 PackageManager mPackageManager; field in Compatibility.Service 119 if (mPackageManager == null) { in onHandleIntent() 120 mPackageManager = getPackageManager(); in onHandleIntent() 150 …List<ResolveInfo> ris = mPackageManager.queryIntentActivities(i, PackageManager.GET_DISABLED_COMPO… in pickDefaultControlPanel() 200 …List<ResolveInfo> ris = mPackageManager.queryBroadcastReceivers(i, PackageManager.GET_DISABLED_COM… in setDefault() 204 … ris = mPackageManager.queryBroadcastReceivers(i, PackageManager.GET_DISABLED_COMPONENTS); in setDefault() 226 mPackageManager.setComponentEnabledSetting(comp, in setupReceivers() 231 mPackageManager.setComponentEnabledSetting(comp, in setupReceivers()
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | DefaultLayoutParser.java | 112 ResolveInfo resolved = mPackageManager.resolveActivity(metaIntent, in invalidPackageOrClass() 114 final List<ResolveInfo> appList = mPackageManager.queryIntentActivities( in invalidPackageOrClass() 132 final Intent intent = mPackageManager.getLaunchIntentForPackage(info.packageName); in invalidPackageOrClass() 139 return addShortcut(info.loadLabel(mPackageManager).toString(), intent, in invalidPackageOrClass() 148 ApplicationInfo info = mPackageManager.getApplicationInfo( in getSingleSystemActivity() 242 final Partner partner = Partner.get(mPackageManager); in parseAndAdd() 285 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert() 287 String[] packages = mPackageManager.currentToCanonicalPackageNames( in verifyAndInsert() 291 mPackageManager.getReceiverInfo(cn, 0); in verifyAndInsert()
|
/packages/apps/PackageInstaller/src/com/android/packageinstaller/permission/model/ |
D | AppPermissionGroup.java | 46 private final PackageManager mPackageManager; field in AppPermissionGroup 195 mPackageManager = mContext.getPackageManager(); in AppPermissionGroup() 244 mPackageManager.updatePermissionFlags(permission.getName(), in resetReviewRequired() 362 mPackageManager.grantRuntimePermission(mPackageInfo.packageName, in grantRuntimePermissions() 373 mPackageManager.updatePermissionFlags(permission.getName(), in grantRuntimePermissions() 413 mPackageManager.updatePermissionFlags(permission.getName(), in grantRuntimePermissions() 451 mPackageManager.revokeRuntimePermission(mPackageInfo.packageName, in revokeRuntimePermissions() 461 mPackageManager.updatePermissionFlags(permission.getName(), in revokeRuntimePermissions() 473 mPackageManager.updatePermissionFlags(permission.getName(), in revokeRuntimePermissions() 515 mPackageManager.updatePermissionFlags(permission.getName(), in revokeRuntimePermissions() [all …]
|
/packages/apps/Car/LensPicker/src/com/android/support/car/lenspicker/ |
D | LensPickerAdapter.java | 50 private PackageManager mPackageManager; field in LensPickerAdapter 59 mPackageManager = context.getPackageManager(); in LensPickerAdapter() 98 mPackageManager, mSharedPrefs); in doInBackground() 105 ApplicationInfo aInfo = mPackageManager.getApplicationInfo(packageName, 0); in doInBackground() 111 displayName = rInfo.loadLabel(mPackageManager).toString(); in doInBackground() 158 return mPackageManager.getApplicationIcon(aInfo); in getComponentIcon() 162 CharSequence appLabel = mPackageManager.getApplicationLabel(aInfo); in getComponentLabel()
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
D | AppsAsyncLoader.java | 71 private PackageManagerWrapper mPackageManager; field in AppsAsyncLoader 87 mPackageManager = pm; in AppsAsyncLoader() 109 mPackageManager.getInstalledApplicationsAsUser(0, mUserId); in loadApps() 143 .setIcon(mPackageManager.getUserBadgedIcon(app)) in loadApps() 144 .setLabel(mPackageManager.loadLabel(app)) in loadApps() 211 private PackageManagerWrapper mPackageManager; field in AppsAsyncLoader.Builder 235 this.mPackageManager = packageManager; in setPackageManager() 255 mPackageManager, in build() 380 pi = mPackageManager.getPackageInfo(packageName, 0); in getDaysSinceInstalled()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/ |
D | AppPrefLoaderTest.java | 53 private PackageManager mPackageManager; field in AppPrefLoaderTest 65 new AppPrefLoader(RuntimeEnvironment.application, pkgs, mPackageManager); in setUp() 71 when(mPackageManager.getApplicationInfo(anyString(), anyInt())) in loadInBackground_packageNotFound_shouldReturnEmptySet() 81 when(mPackageManager.getApplicationInfo(anyString(), anyInt())).thenReturn(info); in loadInBackground_shouldReturnPreference() 84 when(info.loadIcon(mPackageManager)).thenReturn(drawable); in loadInBackground_shouldReturnPreference() 85 when(info.loadLabel(mPackageManager)).thenReturn(label); in loadInBackground_shouldReturnPreference()
|
/packages/apps/Settings/tests/app/src/com/android/settings/applications/ |
D | ExternalSourcesSettingsTest.java | 69 private PackageManager mPackageManager; field in ExternalSourcesSettingsTest 78 mPackageManager = mContext.getPackageManager(); in setUp() 89 final int uid = mPackageManager.getPackageUidAsUser(mPackageName, user.id); in resetAppOpModeForAllProfiles() 107 final ApplicationInfo info = mPackageManager.getApplicationInfo(packageName, 0); in getApplicationLabel() 108 return mPackageManager.getApplicationLabel(info).toString(); in getApplicationLabel() 157 mPackageManager.getPackageUidAsUser(mPackageName, userId), mPackageName, appOpMode); in testAppDetailScreenForAppOp() 175 final int packageUid = mPackageManager.getPackageUid(mPackageName, 0); in testSwitchToggle()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | PowerUsageFeatureProviderImplTest.java | 50 private PackageManager mPackageManager; field in PowerUsageFeatureProviderImplTest 58 when(mPackageManager.getPackagesForUid(UID_CALENDAR)).thenReturn(PACKAGES_CALENDAR); in setUp() 59 when(mPackageManager.getPackagesForUid(UID_MEDIA)).thenReturn(PACKAGES_MEDIA); in setUp() 60 when(mPackageManager.getPackagesForUid(UID_SYSTEMUI)).thenReturn(PACKAGES_SYSTEMUI); in setUp() 61 mPowerFeatureProvider.mPackageManager = mPackageManager; in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | EmergencyBroadcastPreferenceControllerTest.java | 54 private PackageManager mPackageManager; field in EmergencyBroadcastPreferenceControllerTest 66 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 88 when(mPackageManager.getApplicationEnabledSetting(anyString())) in isAvailable_notAdminUser_shouldReturnFalse() 100 when(mPackageManager.getApplicationEnabledSetting(anyString())) in isAvailable_hasConfigCellBroadcastRestriction_shouldReturnFalse() 113 when(mPackageManager.getApplicationEnabledSetting(anyString())) in isAvailable_cellBroadcastAppLinkDisabled_shouldReturnFalse() 125 when(mPackageManager.getApplicationEnabledSetting(anyString())) in isAvailable_cellBroadcastReceiverDisabled_shouldReturnFalse()
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | PictureInPictureSettings.java | 54 private PackageManager mPackageManager; field in PictureInPictureSettings 101 mPackageManager = mContext.getPackageManager(); in onCreate() 117 final List<PackageInfo> installedPackages = mPackageManager.getInstalledPackagesAsUser( in onResume() 129 Collections.sort(pipApps, new PackageItemInfo.DisplayNameComparator(mPackageManager)); in onResume() 135 final CharSequence label = appInfo.loadLabel(mPackageManager); in onResume() 138 pref.setIcon(appInfo.loadIcon(mPackageManager)); in onResume()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/storage/ |
D | MoveAppStepFragment.java | 45 private PackageManager mPackageManager; field in MoveAppStepFragment 69 mPackageManager = getActivity().getPackageManager(); in onCreate() 87 icon = mPackageManager.getApplicationIcon(mPackageName); in onCreateGuidance() 103 info = mPackageManager.getApplicationInfo(packageName, 0); in onCreateActions() 108 mCurrentVolume = mPackageManager.getPackageCurrentVolume(info); in onCreateActions() 109 mCandidateVolumes = mPackageManager.getPackageCandidateVolumes(info); in onCreateActions()
|