Home
last modified time | relevance | path

Searched refs:mPackageManager (Results 1 – 25 of 63) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/content/pm/
DComponentTest.java52 private PackageManager mPackageManager; field in ComponentTest
109 mPackageManager = mContext.getPackageManager(); in setUp()
133 mPackageManager.setComponentEnabledSetting(DISABLED_ACTIVITY_COMPONENTNAME, in testResolveDisabledActivity()
137 final ResolveInfo info = mPackageManager.resolveActivity(mDisabledActivityIntent, 0); in testResolveDisabledActivity()
140 final ResolveInfo info2 = mPackageManager.resolveActivity( in testResolveDisabledActivity()
149 mPackageManager.setComponentEnabledSetting(ENABLED_ACTIVITY_COMPONENTNAME, in testResolveEnabledActivity()
153 final ResolveInfo info = mPackageManager.resolveActivity(mEnabledActivityIntent, 0); in testResolveEnabledActivity()
162 mPackageManager.setComponentEnabledSetting(DISABLED_ACTIVITY_COMPONENTNAME, in testQueryDisabledActivity()
167 mPackageManager.queryIntentActivities(mDisabledActivityIntent, 0); in testQueryDisabledActivity()
171 mPackageManager.queryIntentActivities(mDisabledActivityIntent, in testQueryDisabledActivity()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierAppUtilsTest.java52 @Mock private IPackageManager mPackageManager; field in CarrierAppUtilsTest
75 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mPackageManager, in testDisableCarrierAppsUntilPrivileged_EmptyList()
78 Mockito.verifyNoMoreInteractions(mPackageManager, mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_EmptyList()
84 Mockito.when(mPackageManager.getApplicationInfo("com.example.missing.app", in testDisableCarrierAppsUntilPrivileged_MissingApp()
86 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mPackageManager, in testDisableCarrierAppsUntilPrivileged_MissingApp()
89 Mockito.verify(mPackageManager, Mockito.never()).setApplicationEnabledSetting( in testDisableCarrierAppsUntilPrivileged_MissingApp()
92 Mockito.verify(mPackageManager, Mockito.never()) in testDisableCarrierAppsUntilPrivileged_MissingApp()
102 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
104 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mPackageManager, in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
106 Mockito.verify(mPackageManager, Mockito.never()).setApplicationEnabledSetting( in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
[all …]
DCarrierSignalAgentTest.java96 .when(mPackageManager).queryBroadcastReceivers((Intent) any(), anyInt()); in testNotifyManifestReceivers()
141 .when(mPackageManager).queryBroadcastReceivers((Intent) any(), anyInt()); in testNotifyRuntimeReceivers()
161 .when(mPackageManager).queryBroadcastReceivers( in testNotify()
191 .when(mPackageManager).queryBroadcastReceivers((Intent) any(), anyInt()); in testNotify()
202 doReturn(new ArrayList<>()).when(mPackageManager).queryBroadcastReceivers((Intent) any(), in testNotify()
/frameworks/base/core/tests/coretests/src/android/provider/
DFontsContractTest.java62 private PackageManager mPackageManager; field in FontsContractTest
72 mPackageManager = mock(PackageManager.class); in setUp()
235 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(null); in testGetProvider_providerNotFound()
238 FontsContract.getProvider(mPackageManager, request); in testGetProvider_providerNotFound()
248 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); in testGetProvider_providerIsSystemApp()
250 ProviderInfo result = FontsContract.getProvider(mPackageManager, request); in testGetProvider_providerIsSystemApp()
258 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); in testGetProvider_providerIsSystemAppWrongPackage()
262 mPackageManager, in testGetProvider_providerIsSystemAppWrongPackage()
275 assertNull(FontsContract.getProvider(mPackageManager, request)); in testGetProvider_providerIsNonSystemAppNoCerts()
287 assertNull(FontsContract.getProvider(mPackageManager, requestWrongCerts)); in testGetProvider_providerIsNonSystemAppWrongCerts()
[all …]
/frameworks/base/services/core/java/com/android/server/om/
DOverlayManagerServiceImpl.java53 private final PackageManagerHelper mPackageManager; field in OverlayManagerServiceImpl
64 mPackageManager = packageManager; in OverlayManagerServiceImpl()
95 List<PackageInfo> overlayPackages = mPackageManager.getOverlayPackages(newUserId); in updateOverlaysForUser()
127 mPackageManager.getPackageInfo(overlayPackage.overlayTarget, newUserId); in updateOverlaysForUser()
152 if (mPackageManager.getPackageInfo(targetPackageName, newUserId) == null) { in updateOverlaysForUser()
171 final PackageInfo targetPackage = mPackageManager.getPackageInfo(packageName, userId); in onTargetPackageAdded()
181 final PackageInfo targetPackage = mPackageManager.getPackageInfo(packageName, userId); in onTargetPackageChanged()
202 final PackageInfo targetPackage = mPackageManager.getPackageInfo(packageName, userId); in onTargetPackageUpgraded()
226 … final PackageInfo overlayPackage = mPackageManager.getPackageInfo(oi.packageName, userId); in updateAllOverlaysForTarget()
247 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(packageName, userId); in onOverlayPackageAdded()
[all …]
DOverlayManagerService.java215 private final PackageManagerHelper mPackageManager; field in OverlayManagerService
232 mPackageManager = new PackageManagerHelper(); in OverlayManagerService()
236 mImpl = new OverlayManagerServiceImpl(mPackageManager, im, mSettings, in OverlayManagerService()
369 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageAdded()
372 mPackageManager.cachePackageInfo(packageName, userId, pi); in onPackageAdded()
387 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageChanged()
390 mPackageManager.cachePackageInfo(packageName, userId, pi); in onPackageChanged()
405 mPackageManager.forgetPackageInfo(packageName, userId); in onPackageUpgrading()
420 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageUpgraded()
423 mPackageManager.cachePackageInfo(packageName, userId, pi); in onPackageUpgraded()
[all …]
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/util/
DPartnerTest.java65 private TestPackageManager mPackageManager; field in PartnerTest
74 mPackageManager = new TestPackageManager(); in setUp()
75 RuntimeEnvironment.setRobolectricPackageManager(mPackageManager); in setUp()
80 mPackageManager.addResolveInfoForIntent( in testLoadPartner()
99 mPackageManager.addResolveInfoForIntent( in testLoadNonSystemPartner()
116 mPackageManager.addResolveInfoForIntent( in testLoadPartnerValue()
131 mPackageManager.addResolveInfoForIntent( in testLoadDefaultValue()
146 mPackageManager.addResolveInfoForIntent( in testNotDirectBootAware()
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/external/
DPackageManagerAdapter.java35 private PackageManager mPackageManager; field in PackageManagerAdapter
41 mPackageManager = context.getPackageManager(); in PackageManagerAdapter()
52 return mPackageManager.getServiceInfo(component, flags); in getServiceInfo()
57 return mPackageManager.getPackageInfoAsUser(packageName, flags, userId); in getPackageInfoAsUser()
/frameworks/base/services/core/java/com/android/server/security/
DKeyAttestationApplicationIdProviderService.java42 mPackageManager = context.getPackageManager(); in KeyAttestationApplicationIdProviderService()
45 private PackageManager mPackageManager; field in KeyAttestationApplicationIdProviderService
55 String[] packageNames = mPackageManager.getPackagesForUid(uid); in getKeyAttestationApplicationId()
63 PackageInfo packageInfo = mPackageManager.getPackageInfoAsUser(packageNames[i], in getKeyAttestationApplicationId()
/frameworks/base/tests/Compatibility/src/com/android/compatibilitytest/
DAppCompatibility.java55 private PackageManager mPackageManager; field in AppCompatibility
72 mPackageManager = mContext.getPackageManager(); in setUp()
73 Assert.assertNotNull("Missing Package Manager", mPackageManager); in setUp()
148 PackageInfo pi = mPackageManager.getPackageInfo(packageName, 0); in getProcessName()
174 intent = mPackageManager.getLeanbackLaunchIntentForPackage(packageName); in getLaunchIntentForPackage()
176 intent = mPackageManager.getLaunchIntentForPackage(packageName); in getLaunchIntentForPackage()
/frameworks/base/core/java/android/content/pm/
DAppsQueryHelper.java59 private final IPackageManager mPackageManager; field in AppsQueryHelper
63 mPackageManager = packageManager; in AppsQueryHelper()
171 return mPackageManager.getInstalledApplications( in getAllApps()
182 return mPackageManager.queryIntentActivities(intent, null, in queryIntentActivitiesAsUser()
196 return mPackageManager.queryIntentServices(intent, null, in queryIntentServicesAsUser()
211 return mPackageManager.getPackagesHoldingPermissions(new String[]{perm}, 0, in getPackagesHoldingPermission()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageManagerPresubmitTest.java51 private PackageManager mPackageManager; field in PackageManagerPresubmitTest
56 mPackageManager = mContext.getPackageManager(); in setUp()
68 List<PackageInfo> installedPackages = mPackageManager in testPrivAppPermissions()
93 PermissionInfo permissionInfo = mPackageManager.getPermissionInfo(pName, 0); in testPackagePrivAppPermission()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/
DTileUtilsTest.java79 private PackageManager mPackageManager; field in TileUtilsTest
95 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
96 when(mPackageManager.getResourcesForApplication(anyString())).thenReturn(mResources); in setUp()
110 when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt())) in getTilesForIntent_shouldParseCategory()
131 when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt())) in getTilesForIntent_shouldParseKeyHintForSystemApp()
151 when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt())) in getTilesForIntent_shouldSkipNonSystemApp()
174 when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt())) in getTilesForIntent_shouldSkipFilteredApps()
200 when(mPackageManager.queryIntentActivitiesAsUser(argThat(new ArgumentMatcher<Intent>() { in getCategories_shouldHandleExtraIntentAction()
226 verify(mPackageManager, atLeastOnce()).queryIntentActivitiesAsUser( in getCategories_withPackageName()
243 when(mPackageManager.queryIntentActivitiesAsUser(eq(intent), anyInt(), anyInt())) in getTilesForIntent_shouldReadMetadataTitleAsString()
[all …]
/frameworks/base/services/core/java/com/android/server/media/
DRemoteDisplayProviderWatcher.java52 private final PackageManager mPackageManager; field in RemoteDisplayProviderWatcher
64 mPackageManager = context.getPackageManager(); in RemoteDisplayProviderWatcher()
117 for (ResolveInfo resolveInfo : mPackageManager.queryIntentServicesAsUser( in scanPackages()
176 if (mPackageManager.checkPermission(Manifest.permission.CAPTURE_VIDEO_OUTPUT, in hasCaptureVideoPermission()
180 if (mPackageManager.checkPermission(Manifest.permission.CAPTURE_SECURE_VIDEO_OUTPUT, in hasCaptureVideoPermission()
/frameworks/base/packages/StatementService/src/com/android/statementservice/
DIntentFilterVerificationReceiver.java186 private final PackageManager mPackageManager; field in IntentFilterVerificationReceiver.IsAssociatedResultReceiver
192 mPackageManager = packageManager; in IsAssociatedResultReceiver()
199 mPackageManager.verifyIntentFilter(mVerificationId, in onReceiveResult()
203 mPackageManager.verifyIntentFilter(mVerificationId, in onReceiveResult()
208 sendErrorToPackageManager(mPackageManager, mVerificationId); in onReceiveResult()
/frameworks/base/services/retaildemo/java/com/android/server/retaildemo/
DPreloadAppsInstaller.java50 private final IPackageManager mPackageManager; field in PreloadAppsInstaller
63 mPackageManager = packageManager; in PreloadAppsInstaller()
106 mPackageManager.installExistingPackageAsUser(packageName, userId, in installExistingPackage()
121 mPackageManager.installPackageAsUser(file.getPath(), new PackageInstallObserver() { in installPackage()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/
DRecentLocationApps.java50 private final PackageManager mPackageManager; field in RecentLocationApps
56 mPackageManager = context.getPackageManager(); in RecentLocationApps()
153 CharSequence appLabel = mPackageManager.getApplicationLabel(appInfo); in getRequestFromOps()
154 CharSequence badgedAppLabel = mPackageManager.getUserBadgedLabel(appLabel, userHandle); in getRequestFromOps()
/frameworks/base/services/core/java/com/android/server/tv/
DTvRemoteProviderWatcher.java50 private final PackageManager mPackageManager; field in TvRemoteProviderWatcher
62 mPackageManager = context.getPackageManager(); in TvRemoteProviderWatcher()
112 for (ResolveInfo resolveInfo : mPackageManager.queryIntentServicesAsUser( in scanPackages()
181 if ((mPackageManager.checkPermission(Manifest.permission.TV_VIRTUAL_REMOTE_CONTROLLER, in hasNecessaryPermissions()
/frameworks/base/core/java/android/app/
DLauncherActivity.java59 PackageManager mPackageManager; field in LauncherActivity
342 mPackageManager = getPackageManager(); in onCreate()
344 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH)) { in onCreate()
362 if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH)) { in onCreate()
444 return mPackageManager.queryIntentActivities(queryIntent, /* no flags */ 0); in onQueryPackageManager()
451 Collections.sort(results, new ResolveInfo.DisplayNameComparator(mPackageManager)); in onSortResultList()
466 result.add(new ListItem(mPackageManager, resolveInfo, null)); in makeListItems()
/frameworks/support/v7/mediarouter/src/android/support/v7/media/
DRegisteredMediaRouteProviderWatcher.java42 private final PackageManager mPackageManager; field in RegisteredMediaRouteProviderWatcher
52 mPackageManager = context.getPackageManager(); in RegisteredMediaRouteProviderWatcher()
97 for (ResolveInfo resolveInfo : mPackageManager.queryIntentServices(intent, 0)) { in scanPackages()
/frameworks/base/services/java/com/android/server/
DSystemServer.java230 private PackageManager mPackageManager; field in SystemServer
580 mPackageManager = mSystemContext.getPackageManager(); in startBootstrapServices()
1096 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET) || in startOtherServices()
1097 mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST)) { in startOtherServices()
1227 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_MIDI)) { in startOtherServices()
1234 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST) in startOtherServices()
1235 || mPackageManager.hasSystemFeature( in startOtherServices()
1291 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_BACKUP)) { in startOtherServices()
1297 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_APP_WIDGETS) in startOtherServices()
1304 if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_VOICE_RECOGNIZERS)) { in startOtherServices()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DSuggestionParserTest.java53 private PackageManager mPackageManager; field in SuggestionParserTest
67 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
85 when(mPackageManager.queryIntentActivitiesAsUser( in setUp()
/frameworks/base/services/core/java/com/android/server/connectivity/
DPermissionMonitor.java63 private final PackageManager mPackageManager; field in PermissionMonitor
76 mPackageManager = context.getPackageManager(); in PermissionMonitor()
117 List<PackageInfo> apps = mPackageManager.getInstalledPackages(GET_PERMISSIONS); in startMonitoring()
237 final PackageInfo app = mPackageManager.getPackageInfo(name, GET_PERMISSIONS); in highestPermissionForUid()
276 String[] packages = mPackageManager.getPackagesForUid(appUid); in onAppRemoved()
/frameworks/base/services/backup/java/com/android/server/backup/
DPackageManagerBackupAgent.java78 private PackageManager mPackageManager; field in PackageManagerBackupAgent
122 mPackageManager = packageMgr; in init()
134 mAllPackages = getStorableApplications(mPackageManager); in evaluateStorablePackages()
204 homeInfo = mPackageManager.getPackageInfo(home.getPackageName(), in onBackup()
206 homeInstaller = mPackageManager.getInstallerPackageName(home.getPackageName()); in onBackup()
272 info = mPackageManager.getPackageInfo(packName, in onBackup()
578 return mPackageManager.getHomeActivities(new ArrayList<ResolveInfo>()); in getPreferredHomeComponent()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/users/
DAppRestrictionsHelper.java55 private final PackageManager mPackageManager; field in AppRestrictionsHelper
73 mPackageManager = mInjector.getPackageManager(); in AppRestrictionsHelper()
141 mPackageManager.deletePackageAsUser(packageName, null, in applyUserAppState()
162 final PackageManager pm = mPackageManager; in fetchAndMergeApps()
299 final PackageManager pm = mPackageManager; in addSystemApps()
337 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, 0); in isSystemPackage()

123