/frameworks/base/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/model/app/ |
D | PackageManagerExtTest.kt | 47 private lateinit var packageManager: PackageManager variable in com.android.settingslib.spaprivileged.model.app.PackageManagerExtTest 51 packageManager.resolveActivityAsUser(any(), any<ResolveInfoFlags>(), eq(APP.userId)) in mockResolveActivityAsUser() 57 whenever(packageManager.getModuleInfo(PACKAGE_NAME, 0)).thenReturn(ModuleInfo()) in isSystemModule_whenSystemModule_returnTrue() 59 val isSystemModule = packageManager.isSystemModule(PACKAGE_NAME) in isSystemModule_whenSystemModule_returnTrue() 66 whenever(packageManager.getModuleInfo(PACKAGE_NAME, 0)).thenThrow(NameNotFoundException()) in isSystemModule_whenNotSystemModule_returnFalse() 68 val isSystemModule = packageManager.isSystemModule(PACKAGE_NAME) in isSystemModule_whenNotSystemModule_returnFalse() 77 val activityInfo = packageManager.resolveActionForApp(APP, ACTION) in resolveActionForApp_noResolveInfo() 86 val activityInfo = packageManager.resolveActionForApp(APP, ACTION) in resolveActionForApp_noActivityInfo() 100 val activityInfo = packageManager.resolveActionForApp(APP, ACTION)!! in resolveActionForApp_hasActivityInfo() 107 packageManager.resolveActionForApp( in resolveActionForApp_withFlags() [all …]
|
/frameworks/base/services/tests/PackageManagerServiceTests/host/test-apps/OverlayActor/src/com/android/server/pm/test/overlay/actor/ |
D | OverlayableVisibilityTest.kt | 34 private val packageManager = context.packageManager constant in com.android.server.pm.test.overlay.actor.OverlayableVisibilityTest 38 assertThat(packageManager.getApplicationInfo(TARGET_PACKAGE, 0)).isNotNull() in verifyVisible() 39 assertThat(packageManager.getApplicationInfo(OVERLAY_PACKAGE, 0)).isNotNull() in verifyVisible() 45 packageManager.getApplicationInfo(TARGET_PACKAGE, 0) in verifyNotVisible() 48 packageManager.getApplicationInfo(OVERLAY_PACKAGE, 0) in verifyNotVisible()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/models/recommendation/ |
D | SmartspaceMediaData.kt | 72 val packageManager = context.packageManager in getAppName() constant 73 packageManager.getLaunchIntentForPackage(packageName)?.let { in getAppName() 74 val launchActivity = it.resolveActivityInfo(packageManager, 0) in getAppName() 75 return launchActivity.loadLabel(packageManager) in getAppName() 84 val applicationInfo = packageManager.getApplicationInfo(packageName, /* flags= */ 0) in getAppName() 85 packageManager.getApplicationLabel(applicationInfo) in getAppName()
|
/frameworks/base/core/java/android/accessibilityservice/ |
D | AccessibilityShortcutInfo.java | 120 final PackageManager packageManager = context.getPackageManager(); in AccessibilityShortcutInfo() local 125 packageManager, META_DATA)) { in AccessibilityShortcutInfo() 143 final Resources resources = packageManager.getResourcesForApplication( in AccessibilityShortcutInfo() 205 public String loadSummary(@NonNull PackageManager packageManager) { in loadSummary() argument 206 return loadResourceString(packageManager, mActivityInfo, mSummaryResId); in loadSummary() 215 public String loadIntro(@NonNull PackageManager packageManager) { in loadIntro() argument 216 return loadResourceString(packageManager, mActivityInfo, mIntroResId); in loadIntro() 225 public String loadDescription(@NonNull PackageManager packageManager) { in loadDescription() argument 226 return loadResourceString(packageManager, mActivityInfo, mDescriptionResId); in loadDescription() 266 public String loadHtmlDescription(@NonNull PackageManager packageManager) { in loadHtmlDescription() argument [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/ |
D | ScreenshotDetectionControllerTest.kt | 50 @Mock lateinit var packageManager: PackageManager variable in com.android.systemui.screenshot.ScreenshotDetectionControllerTest 58 controller = ScreenshotDetectionController(windowManager, packageManager) in setup() 95 packageManager.getActivityInfo( in testMaybeNotifyOfScreenshot_oneApp() 101 whenever(activityInfo.loadLabel(eq(packageManager))).thenReturn(appName) in testMaybeNotifyOfScreenshot_oneApp() 129 packageManager.getActivityInfo( in testMaybeNotifyOfScreenshot_multipleApps() 136 packageManager.getActivityInfo( in testMaybeNotifyOfScreenshot_multipleApps() 143 packageManager.getActivityInfo( in testMaybeNotifyOfScreenshot_multipleApps() 150 whenever(activityInfo1.loadLabel(eq(packageManager))).thenReturn(appName1) in testMaybeNotifyOfScreenshot_multipleApps() 151 whenever(activityInfo2.loadLabel(eq(packageManager))).thenReturn(appName2) in testMaybeNotifyOfScreenshot_multipleApps() 152 whenever(activityInfo3.loadLabel(eq(packageManager))).thenReturn(appName3) in testMaybeNotifyOfScreenshot_multipleApps() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/management/ |
D | ControlsRequestReceiverTest.kt | 53 private lateinit var packageManager: PackageManager variable in com.android.systemui.controls.management.ControlsRequestReceiverTest 68 mContext.setMockPackageManager(packageManager) in setUp() 69 `when`(packageManager.hasSystemFeature(PackageManager.FEATURE_CONTROLS)).thenReturn(true) in setUp() 84 `when`(packageManager.getPackageUid(anyString(), anyInt())) in testPackageVerification_nonExistentPackage() 92 `when`(packageManager.getPackageUid(anyString(), anyInt())).thenReturn(12345) in testPackageVerification_uidNotInForeground() 101 `when`(packageManager.getPackageUid(anyString(), anyInt())).thenReturn(12345) in testPackageVerification_OK() 111 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_packageNotVerified_nameNotFound() 121 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_packageNotVerified_notForeground() 133 `when`(packageManager.getPackageUid(eq(componentName.packageName), anyInt())) in testOnReceive_OK() 151 `when`(packageManager.hasSystemFeature(PackageManager.FEATURE_CONTROLS)).thenReturn(false) in testFeatureDisabled_activityNotStarted()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/pipeline/data/repository/ |
D | InstalledTilesComponentRepository.kt | 62 val packageManager = in getInstalledTilesComponents() constant 64 applicationContext.packageManager in getInstalledTilesComponents() 71 .packageManager in getInstalledTilesComponents() 91 .map { reloadComponents(userId, packageManager) } in getInstalledTilesComponents() 97 private fun reloadComponents(userId: Int, packageManager: PackageManager): Set<ComponentName> { in getInstalledTilesComponents() 98 return packageManager in getInstalledTilesComponents() 102 .filter { packageManager.isComponentActuallyEnabled(it) } in getInstalledTilesComponents()
|
/frameworks/base/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/ |
D | BatteryConsumerInfoHelper.java | 46 PackageManager packageManager) { in makeBatteryConsumerInfo() argument 55 return makeBatteryConsumerInfo(consumer, packageManager); in makeBatteryConsumerInfo() 69 UidBatteryConsumer uidBatteryConsumer, PackageManager packageManager) { in makeBatteryConsumerInfo() argument 80 String[] packages = packageManager.getPackagesForUid(uid); in makeBatteryConsumerInfo() 96 packageManager.getApplicationInfo(primaryPackageName, 0); in makeBatteryConsumerInfo() 97 info.label = applicationInfo.loadLabel(packageManager); in makeBatteryConsumerInfo() 129 packageManager.getApplicationInfo(SYSTEM_SERVER_PACKAGE_NAME, 0); in makeBatteryConsumerInfo()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/ |
D | WorkLockActivityTest.kt | 52 private val packageManager: PackageManager = mock() constant in com.android.systemui.keyguard.WorkLockActivityTest 63 packageManager: PackageManager, 64 ) : WorkLockActivity(broadcastDispatcher, userManager, packageManager) { 80 packageManager = packageManager in setUp() 88 packageManager.getApplicationInfoAsUser( in testGetBadgedIcon() 95 whenever(packageManager.getApplicationIcon(ArgumentMatchers.eq(info))).thenReturn(drawable) in testGetBadgedIcon()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | PackageBasedTokenUtil.java | 46 PackageManager packageManager = context.getPackageManager(); in generateToken() local 47 String token = generatePackageBasedToken(packageManager, packageName); in generateToken() 51 packageManager.getInstalledPackages(PackageManager.GET_META_DATA); in generateToken() 59 String otherToken = generatePackageBasedToken(packageManager, otherPackageName); in generateToken() 70 PackageManager packageManager, String packageName) { in generatePackageBasedToken() argument 76 signatures = packageManager.getPackageInfo( in generatePackageBasedToken()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/ |
D | TargetSdkResolverTest.kt | 53 private val packageManager: PackageManager = mock() constant in com.android.systemui.statusbar.notification.collection.TargetSdkResolverTest 62 mContext.setMockPackageManager(packageManager) in setUp() 83 verifyZeroInteractions(packageManager) in resolveFromNotificationExtras() 90 whenever(packageManager.getApplicationInfo(anyString(), anyInt())) in resolveFromPackageManager() 96 verify(packageManager).getApplicationInfo(eq(PACKAGE), anyInt()) in resolveFromPackageManager() 103 whenever(packageManager.getApplicationInfo(anyString(), anyInt())) in resolveFromPackageManager_andPackageManagerCrashes() 109 verify(packageManager).getApplicationInfo(eq(PACKAGE), anyInt()) in resolveFromPackageManager_andPackageManagerCrashes()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/mediaprojection/appselector/data/ |
D | RecentTaskLabelLoader.kt | 37 private val packageManager: PackageManager in loadLabel() constant in com.android.systemui.mediaprojection.appselector.data.ActivityTaskManagerLabelLoader 50 packageManager.getApplicationInfoAsUser( in loadLabel() 55 val label = packageManager.getApplicationLabel(appInfo) in loadLabel() 57 badgedLabel = packageManager.getUserBadgedLabel(label, userHandle) in loadLabel()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/pipeline/data/repository/ |
D | InstalledTilesComponentRepositoryImplTest.kt | 70 @Mock private lateinit var packageManager: PackageManager in <lambda>() variable in com.android.systemui.qs.pipeline.data.repository.InstalledTilesComponentRepositoryImplTest 80 whenever(context.packageManager).thenReturn(packageManager) in <lambda>() 83 whenever(packageManager.getComponentEnabledSetting(any())) in <lambda>() 87 whenever(packageManager.queryIntentServicesAsUser(any(), any<ResolveInfoFlags>(), anyInt())) in <lambda>() 156 packageManager.queryIntentServicesAsUser( in <lambda>() 180 packageManager.queryIntentServicesAsUser( in <lambda>() 199 packageManager.queryIntentServicesAsUser( in <lambda>() 218 packageManager.queryIntentServicesAsUser( in <lambda>() 240 whenever(secondaryUserContext.packageManager).thenReturn(secondaryUserPackageManager) in <lambda>() 247 whenever(packageManager.getComponentEnabledSetting(TEST_COMPONENT)) in <lambda>() [all …]
|
/frameworks/base/core/java/android/content/pm/ |
D | InstantAppInfo.java | 93 public @NonNull CharSequence loadLabel(@NonNull PackageManager packageManager) { in loadLabel() argument 95 return mApplicationInfo.loadLabel(packageManager); in loadLabel() 104 public @NonNull Drawable loadIcon(@NonNull PackageManager packageManager) { in loadIcon() argument 106 return mApplicationInfo.loadIcon(packageManager); in loadIcon() 108 return packageManager.getInstantAppIcon(mPackageName); in loadIcon()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/taptotransfer/common/ |
D | MediaTttUtils.kt | 57 val packageManager = context.packageManager in getIconInfoFromPackageName() constant 60 packageManager in getIconInfoFromPackageName() 65 .loadLabel(packageManager) in getIconInfoFromPackageName() 81 MediaTttIcon.Loaded(packageManager.getApplicationIcon(appPackageName)), in getIconInfoFromPackageName()
|
/frameworks/base/packages/SettingsLib/SpaPrivileged/src/com/android/settingslib/spaprivileged/model/app/ |
D | AppListRepository.kt | 69 private val packageManager = context.packageManager in getSystemPackageNames() constant in com.android.settingslib.spaprivileged.model.app.AppListRepositoryImpl 78 packageManager.getInstalledModules(0) in getSystemPackageNames() 105 packageManager.getInstalledApplicationsAsUser(regularFlags, userId) in getSystemPackageNames() 113 packageManager.getInstalledApplicationsAsUser(regularFlags, it) in getSystemPackageNames() 121 packageManager.getInstalledApplicationsAsUser(adminFlags, userId) in getSystemPackageNames() 176 packageManager.queryIntentActivitiesAsUser(launchIntent, flags, userId) in getSystemPackageNames() 179 packageManager.getHomeActivities(homeActivities) in getSystemPackageNames()
|
/frameworks/base/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/ |
D | Utils.java | 63 final PackageManager packageManager = context.getPackageManager(); in getApplicationLabel() local 65 final ApplicationInfo appInfo = packageManager.getApplicationInfoAsUser( in getApplicationLabel() 68 return packageManager.getApplicationLabel(appInfo); in getApplicationLabel() 73 final PackageManager packageManager = context.getPackageManager(); in getApplicationIcon() local 74 return packageManager.getApplicationIcon(packageName); in getApplicationIcon() 143 final PackageManager packageManager = context.getPackageManager(); in getApplicationInfo() local 145 final ApplicationInfo appInfo = packageManager.getApplicationInfoAsUser( in getApplicationInfo()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/ |
D | WorkProfileMessageController.kt | 43 private val packageManager: PackageManager, constant in com.android.systemui.screenshot.WorkProfileMessageController 59 val info = packageManager.getActivityInfo(fileManager, ComponentInfoFlags.of(0L)) in onScreenshotTaken() 60 val icon = packageManager.getActivityIcon(fileManager) in onScreenshotTaken() 61 badgedIcon = packageManager.getUserBadgedIcon(icon, userHandle) in onScreenshotTaken() 62 label = info.loadLabel(packageManager) in onScreenshotTaken()
|
D | ScreenshotDetectionController.kt | 34 private val packageManager: PackageManager, constant in com.android.systemui.screenshot.ScreenshotDetectionController 49 packageManager in maybeNotifyOfScreenshot() 51 .loadLabel(packageManager) in maybeNotifyOfScreenshot()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/enterprise/ |
D | ActionDisabledLearnMoreButtonLauncher.java | 39 (packageManager, url, userHandle) -> packageManager.resolveActivityAsUser( 46 PackageManager packageManager, String url, UserHandle userHandle); in canResolveActivityAsUser() argument 126 PackageManager packageManager, in canLaunchHelpPage() argument 130 return resolveActivityChecker.canResolveActivityAsUser(packageManager, url, userHandle); in canLaunchHelpPage()
|
/frameworks/base/telephony/common/com/android/internal/telephony/ |
D | SmsApplication.java | 260 PackageManager packageManager = context.getPackageManager(); in getApplicationCollectionInternal() local 268 List<ResolveInfo> smsReceivers = packageManager.queryBroadcastReceiversAsUser(intent, in getApplicationCollectionInternal() 295 List<ResolveInfo> mmsReceivers = packageManager.queryBroadcastReceiversAsUser(intent, in getApplicationCollectionInternal() 316 List<ResolveInfo> respondServices = packageManager.queryIntentServicesAsUser(intent, in getApplicationCollectionInternal() 337 List<ResolveInfo> sendToActivities = packageManager.queryIntentActivitiesAsUser(intent, in getApplicationCollectionInternal() 355 packageManager.queryBroadcastReceiversAsUser(intent, in getApplicationCollectionInternal() 382 packageManager.queryBroadcastReceiversAsUser(intent, in getApplicationCollectionInternal() 409 packageManager.queryBroadcastReceiversAsUser(intent, in getApplicationCollectionInternal() 548 PackageManager packageManager = context.getPackageManager(); in defaultSmsAppChanged() local 554 assignExclusiveSmsPermissionsToSystemApp(context, packageManager, appOps, in defaultSmsAppChanged() [all …]
|
D | CellBroadcastUtils.java | 39 PackageManager packageManager = context.getPackageManager(); in getDefaultCellBroadcastReceiverPackageName() local 40 ResolveInfo resolveInfo = packageManager.resolveActivity( in getDefaultCellBroadcastReceiverPackageName() 56 if (TextUtils.isEmpty(packageName) || packageManager.checkPermission( in getDefaultCellBroadcastReceiverPackageName()
|
/frameworks/base/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/tv/ |
D | PipTestBase.kt | 30 val packageManager: PackageManager = instrumentation.context.packageManager constant in com.android.wm.shell.flicker.pip.tv.PipTestBase 32 packageManager.run { in <lambda>()
|
/frameworks/base/packages/SettingsLib/Utils/src/com/android/settingslib/utils/applications/ |
D | AppUtils.java | 36 PackageManager packageManager, String packageName) { in getApplicationLabel() argument 39 packageManager.getApplicationInfo( in getApplicationLabel() 43 return appInfo.loadLabel(packageManager); in getApplicationLabel()
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | SoftRestrictedPermissionPolicy.java | 259 PackageManager packageManager = context.getPackageManager(); 260 String[] packageNames = packageManager.getPackagesForUid(uid); 268 applicationInfo = packageManager.getApplicationInfoAsUser(packageName, 0, user); 280 PackageManager packageManager = context.getPackageManager(); 281 String[] packageNames = packageManager.getPackagesForUid(uid); 287 if (packageManager.checkPermission(WRITE_MEDIA_STORAGE, packageName)
|