/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | InstalledAppCounterTest.java | 77 private PackageManager mPackageManager; field in InstalledAppCounterTest 107 when(mPackageManager.queryIntentActivitiesAsUser( in expectQueryIntentActivities() 129 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MAIN_USER_ID)); in testCountInstalledAppsAcrossAllUsers() 130 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MANAGED_PROFILE_ID)); in testCountInstalledAppsAcrossAllUsers() 131 verify(mPackageManager, atLeast(0)) in testCountInstalledAppsAcrossAllUsers() 133 verifyNoMoreInteractions(mPackageManager); in testCountInstalledAppsAcrossAllUsers() 144 mPackageManager, mApp1)).isTrue(); in testIncludeInCount() 146 mPackageManager, mApp2)).isTrue(); in testIncludeInCount() 148 mPackageManager, mApp3)).isTrue(); in testIncludeInCount() 150 mPackageManager, mApp4)).isFalse(); in testIncludeInCount() [all …]
|
D | AppWithAdminGrantedPermissionsCounterTest.java | 83 private PackageManager mPackageManager; field in AppWithAdminGrantedPermissionsCounterTest 129 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MAIN_USER_ID)); in verifyCountInstalledApps() 130 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), in verifyCountInstalledApps() 132 verify(mPackageManager, atLeast(0)).getInstallReason(anyObject(), anyObject()); in verifyCountInstalledApps() 133 verifyNoMoreInteractions(mPackageManager); in verifyCountInstalledApps() 143 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp1)).isTrue(); in testIncludeInCount() 146 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp2)).isFalse(); in testIncludeInCount() 149 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp3)).isTrue(); in testIncludeInCount() 152 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp4)).isFalse(); in testIncludeInCount() 155 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp5)).isFalse(); in testIncludeInCount() [all …]
|
D | InstalledAppListerTest.java | 74 private PackageManager mPackageManager; field in InstalledAppListerTest 84 when(mPackageManager.queryIntentActivitiesAsUser( in expectQueryIntentActivities() 105 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in testCountInstalledAppsAcrossAllUsers() 124 when(mPackageManager.getInstallReason(APP_1, mainUser)) in testCountInstalledAppsAcrossAllUsers() 126 when(mPackageManager.getInstallReason(APP_2, mainUser)) in testCountInstalledAppsAcrossAllUsers() 128 when(mPackageManager.getInstallReason(APP_3, mainUser)) in testCountInstalledAppsAcrossAllUsers() 130 when(mPackageManager.getInstallReason(APP_4, mainUser)) in testCountInstalledAppsAcrossAllUsers() 136 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in testCountInstalledAppsAcrossAllUsers() 147 when(mPackageManager.getInstallReason(APP_5, managedProfileUser)) in testCountInstalledAppsAcrossAllUsers() 149 when(mPackageManager.getInstallReason(APP_6, managedProfileUser)) in testCountInstalledAppsAcrossAllUsers() [all …]
|
D | AppWithAdminGrantedPermissionsListerTest.java | 79 private PackageManager mPackageManager; field in AppWithAdminGrantedPermissionsListerTest 110 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in verifyListInstalledApps() 152 when(mPackageManager.getInstallReason(APP_1, mainUser)) in verifyListInstalledApps() 154 when(mPackageManager.getInstallReason(APP_2, mainUser)) in verifyListInstalledApps() 156 when(mPackageManager.getInstallReason(APP_3, mainUser)) in verifyListInstalledApps() 158 when(mPackageManager.getInstallReason(APP_4, mainUser)) in verifyListInstalledApps() 160 when(mPackageManager.getInstallReason(APP_5, mainUser)) in verifyListInstalledApps() 165 when(mPackageManager.getInstalledApplicationsAsUser(PackageManager.GET_DISABLED_COMPONENTS in verifyListInstalledApps() 180 when(mPackageManager.getInstallReason(APP_6, managedProfileUser)) in verifyListInstalledApps() 202 verify(mPackageManager).getInstalledApplicationsAsUser(anyInt(), eq(MAIN_USER_ID)); in verifyListInstalledApps() [all …]
|
D | ApplicationFeatureProviderImplTest.java | 83 private PackageManager mPackageManager; field in ApplicationFeatureProviderImplTest 104 mProvider = new ApplicationFeatureProviderImpl(mContext, mPackageManager, in setUp() 111 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in verifyCalculateNumberOfPolicyInstalledApps() 113 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in verifyCalculateNumberOfPolicyInstalledApps() 128 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in testListPolicyInstalledApps() 130 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in testListPolicyInstalledApps() 162 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 164 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in verifyCalculateNumberOfAppsWithAdminGrantedPermissions() 199 when(mPackageManager.getInstallReason(APP_1, new UserHandle(MAIN_USER_ID))) in testListAppsWithAdminGrantedPermissions() 201 when(mPackageManager.getInstallReason(APP_2, new UserHandle(MANAGED_PROFILE_ID))) in testListAppsWithAdminGrantedPermissions() [all …]
|
D | DefaultAppsPreferenceControllerTest.java | 51 private PackageManager mPackageManager; field in DefaultAppsPreferenceControllerTest 67 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 70 when(mBrowserApplicationInfo.loadLabel(mPackageManager)).thenReturn("Browser1"); in setUp() 71 when(mPackageManager.getApplicationInfo(eq(BROWSER_PACKAGE_NAME), anyInt())).thenReturn( in setUp() 73 when(mDialerApplicationInfo.loadLabel(mPackageManager)).thenReturn("Phone1"); in setUp() 74 when(mPackageManager.getApplicationInfo(eq(DIALER_PACKAGE_NAME), anyInt())).thenReturn( in setUp() 76 when(mSmsApplicationInfo.loadLabel(mPackageManager)).thenReturn("Sms1"); in setUp() 77 when(mPackageManager.getApplicationInfo(eq(SMS_PACKAGE_NAME), anyInt())).thenReturn( in setUp()
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/inputmethod/ |
D | InputMethodUtilTest.java | 77 private PackageManager mPackageManager; field in InputMethodUtilTest 101 mPackageManager, DUMMY_PACKAGE_NAME); in setUp() 112 mPackageManager, DUMMY_PACKAGE_NAME); in setUp() 133 mPackageManager, mInputMethodManager, DUMMY_PACKAGE_NAME); in getPermittedAndEnabledInputMethodList_noPermittedMethods_returnsEmptyList() 149 mPackageManager, mInputMethodManager, DUMMY_PACKAGE_NAME); in getPermittedAndEnabledInputMethodList_withGoogleTypingIME_doesNotIncludeIME() 151 mPackageManager, mInputMethodManager, InputMethodUtil.GOOGLE_VOICE_TYPING); in getPermittedAndEnabledInputMethodList_withGoogleTypingIME_doesNotIncludeIME() 165 InputMethodInfo info = createMockInputMethodInfoWithSubtypes(mPackageManager, in getPackageIcon_hasApplicationIcon() 167 when(mPackageManager.getApplicationIcon(eq(info.getPackageName()))).thenReturn(mIcon); in getPackageIcon_hasApplicationIcon() 168 assertThat(InputMethodUtil.getPackageIcon(mPackageManager, info)).isEqualTo(mIcon); in getPackageIcon_hasApplicationIcon() 173 InputMethodInfo info = createMockInputMethodInfoWithSubtypes(mPackageManager, in getPackageIcon_noApplicationIcon() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/ |
D | ConnectedDeviceGroupControllerTest.java | 73 private ShadowApplicationPackageManager mPackageManager; field in ConnectedDeviceGroupControllerTest 86 mPackageManager = (ShadowApplicationPackageManager) Shadows.shadowOf( in setUp() 91 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, true); in setUp() 158 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, false); in getAvailabilityStatus_noBluetoothUsbDockFeature_returnUnSupported() 159 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_ACCESSORY, false); in getAvailabilityStatus_noBluetoothUsbDockFeature_returnUnSupported() 160 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_HOST, false); in getAvailabilityStatus_noBluetoothUsbDockFeature_returnUnSupported() 170 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, true); in getAvailabilityStatus_BluetoothFeature_returnSupported() 171 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_ACCESSORY, false); in getAvailabilityStatus_BluetoothFeature_returnSupported() 172 mPackageManager.setSystemFeature(PackageManager.FEATURE_USB_HOST, false); in getAvailabilityStatus_BluetoothFeature_returnSupported() 182 mPackageManager.setSystemFeature(PackageManager.FEATURE_BLUETOOTH, false); in getAvailabilityStatus_haveUsbFeature_returnSupported() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/ |
D | MoreSpecialAccessPreferenceControllerTest.java | 57 private PackageManager mPackageManager; field in MoreSpecialAccessPreferenceControllerTest 63 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 68 when(mPackageManager.getPermissionControllerPackageName()).thenReturn( in constructor_shouldResolveActivityWithPermissionControllerPackageName() 73 verify(mPackageManager).resolveActivity(intentCaptor.capture(), anyInt()); in constructor_shouldResolveActivityWithPermissionControllerPackageName() 80 when(mPackageManager.getPermissionControllerPackageName()).thenReturn(null); in getAvailabilityStatus_noPermissionController_shouldReturnUnsupportedOnDevice() 90 when(mPackageManager.getPermissionControllerPackageName()).thenReturn( in getAvailabilityStatus_canNotResolveActivity_shouldReturnUnsupportedOnDevice() 101 when(mPackageManager.getPermissionControllerPackageName()).thenReturn( in getAvailabilityStatus_canResolveActivity_shouldReturnAvailableUnsearchable() 103 when(mPackageManager.resolveActivity(any(Intent.class), anyInt())).thenReturn( in getAvailabilityStatus_canResolveActivity_shouldReturnAvailableUnsearchable() 114 when(mPackageManager.getPermissionControllerPackageName()) in handlePreferenceTreeClick_differentKey_shouldReturnFalse() 126 when(mPackageManager.getPermissionControllerPackageName()) in handlePreferenceTreeClick_sameKey_shouldReturnTrue() [all …]
|
/packages/modules/ExtServices/tests/src/android/ext/services/notification/ |
D | NotificationEntryTest.java | 64 private IPackageManager mPackageManager; field in NotificationEntryTest 104 when(mPackageManager.getApplicationInfo(anyString(), anyInt(), anyInt())) in setUp() 120 mContext, mPackageManager, sbn, channel, mSmsHelper); in testHasPerson() 129 mContext, mPackageManager, sbn, channel, mSmsHelper); in testNotPerson() 138 mContext, mPackageManager, sbn, channel, mSmsHelper); in testHasPerson_matchesDefaultSmsApp() 147 mContext, mPackageManager, sbn, channel, mSmsHelper); in testHasPerson_doesntMatchDefaultSmsApp() 159 mContext, mPackageManager, generateSbn(n), channel, mSmsHelper); in testIsInboxStyle() 171 mContext, mPackageManager, generateSbn(n), channel, mSmsHelper); in testIsMessagingStyle() 183 mContext, mPackageManager, generateSbn(n), channel, mSmsHelper); in testIsNotPersonStyle() 194 mContext, mPackageManager, generateSbn(channel.getId()), channel, mSmsHelper); in testIsAudioAttributes() [all …]
|
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/ |
D | CrossProfileIntentFiltersSetterTest.java | 51 @Mock PackageManager mPackageManager; field in CrossProfileIntentFiltersSetterTest 60 mSetter = new CrossProfileIntentFiltersSetter(mPackageManager, mUserManager); in setUp() 69 verify(mPackageManager, times(CrossProfileIntentFiltersSetter.FILTERS.size())) in testSetFilters() 73 verify(mPackageManager).addCrossProfileIntentFilter( in testSetFilters() 79 verify(mPackageManager).addCrossProfileIntentFilter( in testSetFilters() 96 verifyZeroInteractions(mPackageManager); in testResetFilters_NoProfiles() 111 verify(mPackageManager).clearCrossProfileIntentFilters(TEST_PARENT_USER_ID); in testResetFilters_OneProfile() 112 verify(mPackageManager).clearCrossProfileIntentFilters(TEST_PROFILE_USER_ID); in testResetFilters_OneProfile() 115 verify(mPackageManager, times(CrossProfileIntentFiltersSetter.FILTERS.size())) in testResetFilters_OneProfile()
|
D | SetDevicePolicyTaskTest.java | 55 @Mock private PackageManager mPackageManager; field in SetDevicePolicyTaskTest 73 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 78 when(mPackageManager.getApplicationEnabledSetting(ADMIN_PACKAGE_NAME)) in setUp() 92 when(mPackageManager.getApplicationEnabledSetting(ADMIN_PACKAGE_NAME)) in testEnableDevicePolicyApp_DefaultToDefault() 99 verify(mPackageManager, never()).setApplicationEnabledSetting(eq(ADMIN_PACKAGE_NAME), in testEnableDevicePolicyApp_DefaultToDefault() 110 when(mPackageManager.getApplicationEnabledSetting(ADMIN_PACKAGE_NAME)) in testEnableDevicePolicyApp_DisabledToDefault() 117 verify(mPackageManager).setApplicationEnabledSetting(ADMIN_PACKAGE_NAME, in testEnableDevicePolicyApp_DisabledToDefault() 129 when(mPackageManager.getApplicationEnabledSetting(ADMIN_PACKAGE_NAME)) in testEnableDevicePolicyApp_EnabledToEnabled() 136 verify(mPackageManager, never()).setApplicationEnabledSetting(eq(ADMIN_PACKAGE_NAME), in testEnableDevicePolicyApp_EnabledToEnabled() 147 when(mPackageManager.getApplicationEnabledSetting(ADMIN_PACKAGE_NAME)) in testEnableDevicePolicyApp_PackageNotFound()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/ |
D | ThemePreferenceControllerTest.java | 59 private PackageManager mPackageManager; field in ThemePreferenceControllerTest 73 when(mPackageManager.getApplicationInfo(any(), anyInt())).thenReturn(mApplicationInfo); in setUp() 74 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 84 when(mPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn( in testAvailable_false() 93 when(mPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn( in testAvailable_true() 112 when(mPackageManager.getApplicationInfo(anyString(), anyInt()).loadLabel(mPackageManager)) in updateState_themeSet_shouldSetPreferenceValue() 131 when(mPackageManager.getApplicationInfo(anyString(), anyInt()).loadLabel(mPackageManager)) in updateState_themeNull_shouldSetDefaultSummary() 150 when(mPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn( in getCurrentTheme_withEnabledState() 164 when(mPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn( in testGetCurrentTheme_withoutEnabledState()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/development/qstile/ |
D | DevelopmentTilePreferenceController.java | 44 private final PackageManager mPackageManager; field in DevelopmentTilePreferenceController 49 mPackageManager = context.getPackageManager(); in DevelopmentTilePreferenceController() 63 final List<ResolveInfo> resolveInfos = mPackageManager.queryIntentServices(intent, in displayPreference() 67 final int enabledSetting = mPackageManager.getComponentEnabledSetting( in displayPreference() 74 preference.setTitle(sInfo.loadLabel(mPackageManager)); in displayPreference() 87 private final PackageManager mPackageManager; field in DevelopmentTilePreferenceController.OnChangeHandler 92 mPackageManager = context.getPackageManager(); in OnChangeHandler() 102 mPackageManager.setComponentEnabledSetting(componentName, enabled in onPreferenceChange()
|
/packages/apps/Settings/src/com/android/settings/development/qstile/ |
D | DevelopmentTilePreferenceController.java | 44 private final PackageManager mPackageManager; field in DevelopmentTilePreferenceController 49 mPackageManager = context.getPackageManager(); in DevelopmentTilePreferenceController() 63 final List<ResolveInfo> resolveInfos = mPackageManager.queryIntentServices(intent, in displayPreference() 67 final int enabledSetting = mPackageManager.getComponentEnabledSetting( in displayPreference() 74 preference.setTitle(sInfo.loadLabel(mPackageManager)); in displayPreference() 87 private final PackageManager mPackageManager; field in DevelopmentTilePreferenceController.OnChangeHandler 92 mPackageManager = context.getPackageManager(); in OnChangeHandler() 102 mPackageManager.setComponentEnabledSetting(componentName, enabled in onPreferenceChange()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/ |
D | LocationFooterPreferenceControllerTest.java | 65 private PackageManager mPackageManager; field in LocationFooterPreferenceControllerTest 79 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 84 when(mPackageManager.getResourcesForApplication(any(ApplicationInfo.class))) in setUp() 95 when(mPackageManager.queryBroadcastReceivers(any(Intent.class), anyInt())) in isAvailable_hasValidFooter_returnsTrue() 106 when(mPackageManager.queryBroadcastReceivers(any(Intent.class), anyInt())) in isAvailable_noSystemApp_returnsFalse() 116 when(mPackageManager.queryBroadcastReceivers(any(Intent.class), anyInt())) in isAvailable_noRequiredMetadata_returnsFalse() 138 when(mPackageManager.queryBroadcastReceivers(any(), anyInt())) in updateState_sendBroadcast() 152 when(mPackageManager.queryBroadcastReceivers(any(Intent.class), anyInt())) in updateState_addPreferences() 165 when(mPackageManager.queryBroadcastReceivers(any(Intent.class), anyInt())) in updateState_notSystemApp_ignore() 177 when(mPackageManager.queryBroadcastReceivers(any(Intent.class), anyInt())) in updateState_thenOnPause_sendBroadcasts()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
D | FaceSetupSliceTest.java | 48 private PackageManager mPackageManager; field in FaceSetupSliceTest 55 mPackageManager = mock(PackageManager.class); in setUp() 56 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp() 61 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(false); in getSlice_noFaceManager_shouldReturnNull() 70 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true); in getSlice_faceEnrolled_noReEnroll_shouldReturnNull() 83 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true); in getSlice_faceNotEnrolled_shouldReturnSlice() 94 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true); in getSlice_faceEnrolled_shouldReEnroll_shouldReturnSlice() 107 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_FACE)).thenReturn(true); in getSlice_faceEnrolled_musteEnroll_shouldReturnSlice()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/fuelgauge/batterytip/ |
D | RestrictAppTest.java | 52 private PackageManager mPackageManager; field in RestrictAppTest 57 mPackageManager = context.getPackageManager(); in setUp() 66 mBatteryDatabaseManager.insertAnomaly(mPackageManager.getPackageUid(PACKAGE_SETTINGS, 0), in batterySettings_hasOneAnomaly_showAnomaly() 78 mBatteryDatabaseManager.insertAnomaly(mPackageManager.getPackageUid(PACKAGE_SETTINGS, 0), in batterySettings_hasTwoAnomalies_showAnomalies() 81 mBatteryDatabaseManager.insertAnomaly(mPackageManager.getPackageUid(PACKAGE_SYSTEM_UI, 0), in batterySettings_hasTwoAnomalies_showAnomalies() 93 mBatteryDatabaseManager.insertAnomaly(mPackageManager.getPackageUid(PACKAGE_SETTINGS, 0), in batterySettings_hasAutoHandledAnomalies_showAutoHandled() 96 mBatteryDatabaseManager.insertAnomaly(mPackageManager.getPackageUid(PACKAGE_SYSTEM_UI, 0), in batterySettings_hasAutoHandledAnomalies_showAutoHandled() 108 final int uid = mPackageManager.getPackageUid(PACKAGE_SETTINGS, 0); in insertDuplicateAnomalies_onlyInsertOnce()
|
/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/tests/robotests/src/com/android/settings/security/trustagent/ |
D | TrustAgentsPreferenceControllerTest.java | 70 private ShadowApplicationPackageManager mPackageManager; field in TrustAgentsPreferenceControllerTest 78 mPackageManager = (ShadowApplicationPackageManager) Shadows.shadowOf( in setUp() 100 mPackageManager.setResolveInfosForIntent(TEST_INTENT, availableAgents); in onStart_noTrustAgent_shouldNotAddPreference() 117 mPackageManager.setResolveInfosForIntent(TEST_INTENT, availableAgents); in onStart_hasAUninstalledTrustAgent_shouldRemoveOnePreferenceAndLeaveTwoPreferences() 122 mPackageManager.setResolveInfosForIntent(TEST_INTENT, availableAgents); in onStart_hasAUninstalledTrustAgent_shouldRemoveOnePreferenceAndLeaveTwoPreferences() 136 mPackageManager.setResolveInfosForIntent(TEST_INTENT, availableAgents); in onStart_hasANewTrustAgent_shouldAddOnePreferenceAndHaveFourPreferences() 142 mPackageManager.setResolveInfosForIntent(TEST_INTENT, availableAgents); in onStart_hasANewTrustAgent_shouldAddOnePreferenceAndHaveFourPreferences() 155 mPackageManager.setResolveInfosForIntent(TEST_INTENT, availableAgents); in onStart_hasUnrestrictedTrustAgent_shouldAddThreeChangeablePreferences() 174 mPackageManager.setResolveInfosForIntent(TEST_INTENT, availableAgents); in onStart_hasRestrictedTructAgent_shouldAddThreeUnchangeablePreferences()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/ |
D | MoveAppActivity.java | 46 private PackageManager mPackageManager; field in MoveAppActivity 77 mPackageManager = getPackageManager(); in onCreate() 78 mPackageManager.registerMoveCallback(mMoveCallback, new Handler()); in onCreate() 102 mPackageManager.unregisterMoveCallback(mMoveCallback); in onDestroy() 107 mAppMoveId = mPackageManager.movePackage(packageName, destination); in onRequestMovePackageToVolume() 110 applicationInfo = mPackageManager in onRequestMovePackageToVolume() 117 .newInstance(mPackageManager.getApplicationLabel(applicationInfo)); in onRequestMovePackageToVolume()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | LocalTerminalPreferenceControllerTest.java | 54 private PackageManager mPackageManager; field in LocalTerminalPreferenceControllerTest 65 doReturn(mPackageManager).when(mController).getPackageManager(); in setup() 83 verify(mPackageManager).setApplicationEnabledSetting(TERMINAL_APP_PACKAGE, in onPreferenceChanged_turnOnTerminal() 91 verify(mPackageManager).setApplicationEnabledSetting(TERMINAL_APP_PACKAGE, in onPreferenceChanged_turnOffTerminal() 97 when(mPackageManager.getApplicationEnabledSetting(TERMINAL_APP_PACKAGE)).thenReturn( in updateState_preferenceShouldBeChecked() 106 when(mPackageManager.getApplicationEnabledSetting(TERMINAL_APP_PACKAGE)).thenReturn( in updateState_preferenceShouldNotBeChecked() 117 verify(mPackageManager).setApplicationEnabledSetting(TERMINAL_APP_PACKAGE, in onDeveloperOptionsSwitchDisabled_shouldDisablePreference()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryUtils.java | 91 private PackageManager mPackageManager; field in BatteryUtils 108 mPackageManager = context.getPackageManager(); in BatteryUtils() 136 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getScreenUsageTimeMs() 162 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getProcessBackgroundTimeMs() 270 sipper.mPackages = mPackageManager.getPackagesForUid(sipper.getUid()); in isHiddenSystemModule() 329 final String[] packageNames = mPackageManager.getPackagesForUid(uid); in getPackageName() 341 ApplicationInfo info = mPackageManager.getApplicationInfo(packageName, in getTargetSdkVersion() 415 return packageName == null ? UID_NULL : mPackageManager.getPackageUid(packageName, in getPackageUid() 528 return mPackageManager == null || mAppOpsManager == null; in isDataCorrupted() 553 ApplicationInfo info = mPackageManager.getApplicationInfo(packageName, in isPreOApp() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/fuelgauge/ |
D | BatteryUtils.java | 86 private PackageManager mPackageManager; field in BatteryUtils 103 mPackageManager = context.getPackageManager(); in BatteryUtils() 131 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getScreenUsageTimeMs() 157 Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid())); in getProcessBackgroundTimeMs() 302 final String[] packageNames = mPackageManager.getPackagesForUid(uid); in getPackageName() 314 ApplicationInfo info = mPackageManager.getApplicationInfo(packageName, in getTargetSdkVersion() 388 return packageName == null ? UID_NULL : mPackageManager.getPackageUid(packageName, in getPackageUid() 489 return mPackageManager == null || mAppOpsManager == null; in isDataCorrupted() 514 ApplicationInfo info = mPackageManager.getApplicationInfo(packageName, in isPreOApp() 544 final String[] packageNames = mPackageManager.getPackagesForUid(uid); in shouldHideAnomaly() [all …]
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
D | AppsAsyncLoader.java | 72 private PackageManager mPackageManager; field in AppsAsyncLoader 88 mPackageManager = pm; in AppsAsyncLoader() 110 mPackageManager.getInstalledApplicationsAsUser(0, mUserId); in loadApps() 145 mPackageManager.getUserBadgedIcon( in loadApps() 146 mPackageManager.loadUnbadgedItemIcon(app, app), in loadApps() 148 .setLabel(app.loadLabel(mPackageManager)) in loadApps() 151 if (mFilter.filterApp(extraInfo) && !isDefaultLauncher(mPackageManager, extraInfo)) { in loadApps() 232 private PackageManager mPackageManager; field in AppsAsyncLoader.Builder 256 this.mPackageManager = packageManager; in setPackageManager() 276 mPackageManager, in build() [all …]
|