Home
last modified time | relevance | path

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

12345

/frameworks/base/core/tests/coretests/src/android/content/pm/
DComponentTest.java53 private PackageManager mPackageManager; field in ComponentTest
110 mPackageManager = mContext.getPackageManager(); in setUp()
134 mPackageManager.setComponentEnabledSetting(DISABLED_ACTIVITY_COMPONENTNAME, in testResolveDisabledActivity()
138 final ResolveInfo info = mPackageManager.resolveActivity(mDisabledActivityIntent, 0); in testResolveDisabledActivity()
141 final ResolveInfo info2 = mPackageManager.resolveActivity( in testResolveDisabledActivity()
150 mPackageManager.setComponentEnabledSetting(ENABLED_ACTIVITY_COMPONENTNAME, in testResolveEnabledActivity()
154 final ResolveInfo info = mPackageManager.resolveActivity(mEnabledActivityIntent, 0); in testResolveEnabledActivity()
163 mPackageManager.setComponentEnabledSetting(DISABLED_ACTIVITY_COMPONENTNAME, in testQueryDisabledActivity()
168 mPackageManager.queryIntentActivities(mDisabledActivityIntent, 0); in testQueryDisabledActivity()
172 mPackageManager.queryIntentActivities(mDisabledActivityIntent, in testQueryDisabledActivity()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DCarrierAppUtilsTest.java57 @Mock private IPackageManager mPackageManager; field in CarrierAppUtilsTest
80 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mPackageManager, in testDisableCarrierAppsUntilPrivileged_EmptyList()
83 Mockito.verifyNoMoreInteractions(mPackageManager, mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_EmptyList()
89 Mockito.when(mPackageManager.getApplicationInfo("com.example.missing.app", in testDisableCarrierAppsUntilPrivileged_MissingApp()
95 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mPackageManager, in testDisableCarrierAppsUntilPrivileged_MissingApp()
98 Mockito.verify(mPackageManager, Mockito.never()).setSystemAppHiddenUntilInstalled( in testDisableCarrierAppsUntilPrivileged_MissingApp()
100 Mockito.verify(mPackageManager, Mockito.never()).setSystemAppInstallState( in testDisableCarrierAppsUntilPrivileged_MissingApp()
102 Mockito.verify(mPackageManager, Mockito.never()) in testDisableCarrierAppsUntilPrivileged_MissingApp()
112 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
116 CarrierAppUtils.disableCarrierAppsUntilPrivileged(CALLING_PACKAGE, mPackageManager, in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/
DDefaultAppInfoTest.java51 private PackageManager mPackageManager; field in DefaultAppInfoTest
64 doReturn(mPackageManager).when(mContext).getPackageManager(); in setUp()
65 when(mPackageManager.getApplicationInfoAsUser(anyString(), anyInt(), in setUp()
67 when(mPackageManager.loadUnbadgedItemIcon(mPackageItemInfo, mApplicationInfo)).thenReturn( in setUp()
74 mInfo = new DefaultAppInfo(mContext, mPackageManager, 0 /* uid */, mPackageItemInfo); in initInfoWithActivityInfo_shouldLoadInfo()
80 verify(mPackageItemInfo).loadLabel(mPackageManager); in initInfoWithActivityInfo_shouldLoadInfo()
87 mInfo = new DefaultAppInfo(mContext, mPackageManager, 0 /* uid */, mComponentName); in initInfoWithComponent_shouldLoadInfo()
/frameworks/base/core/tests/coretests/src/android/provider/
DFontsContractTest.java64 private PackageManager mPackageManager; field in FontsContractTest
74 mPackageManager = mock(PackageManager.class); in setUp()
237 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(null); in testGetProvider_providerNotFound()
240 FontsContract.getProvider(mPackageManager, request); in testGetProvider_providerNotFound()
250 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); in testGetProvider_providerIsSystemApp()
252 ProviderInfo result = FontsContract.getProvider(mPackageManager, request); in testGetProvider_providerIsSystemApp()
260 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); in testGetProvider_providerIsSystemAppWrongPackage()
264 mPackageManager, in testGetProvider_providerIsSystemAppWrongPackage()
277 assertNull(FontsContract.getProvider(mPackageManager, request)); in testGetProvider_providerIsNonSystemAppNoCerts()
289 assertNull(FontsContract.getProvider(mPackageManager, requestWrongCerts)); in testGetProvider_providerIsNonSystemAppWrongCerts()
[all …]
/frameworks/base/services/core/java/com/android/server/timezone/
DPackageTrackerHelperImpl.java41 private final PackageManager mPackageManager; field in PackageTrackerHelperImpl
45 mPackageManager = context.getPackageManager(); in PackageTrackerHelperImpl()
79 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in getInstalledPackageVersion()
86 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in isPrivilegedApp()
95 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, flags); in usesPermission()
110 ProviderInfo providerInfo = mPackageManager.resolveContentProviderAsUser( in contentProviderRegistered()
132 List<ResolveInfo> resolveInfo = mPackageManager.queryBroadcastReceiversAsUser( in receiverRegistered()
/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/core/tests/coretests/src/android/view/textclassifier/
DFakeContextBuilder.java54 private final PackageManager mPackageManager; field in FakeContextBuilder
61 mPackageManager = mock(PackageManager.class); in FakeContextBuilder()
62 when(mPackageManager.resolveActivity(any(Intent.class), anyInt())).thenReturn(null); in FakeContextBuilder()
66 return mPackageManager; in FakeContextBuilder()
106 when(mPackageManager.resolveActivity(any(Intent.class), anyInt())).thenAnswer( in build()
114 when(mPackageManager.getApplicationLabel(any(ApplicationInfo.class))).thenAnswer( in build()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/
DTileUtilsTest.java73 private PackageManager mPackageManager; field in TileUtilsTest
88 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
89 when(mPackageManager.getResourcesForApplication(anyString())).thenReturn(mResources); in setUp()
90 when(mPackageManager.getResourcesForApplication((String) isNull())).thenReturn(mResources); in setUp()
91 when(mPackageManager.getApplicationInfo(eq("abc"), anyInt())) in setUp()
105 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getTilesForIntent_shouldParseCategory()
124 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getTilesForIntent_shouldParseKeyHintForSystemApp()
142 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getTilesForIntent_shouldSkipNonSystemApp()
163 verify(mPackageManager, atLeastOnce()).queryIntentActivitiesAsUser( in getCategories_withPackageName()
179 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getTilesForIntent_shouldReadMetadataTitleAsString()
[all …]
/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/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/usb/java/com/android/server/usb/
DUsbUserSettingsManager.java64 private final PackageManager mPackageManager; field in UsbUserSettingsManager
79 mPackageManager = mUserContext.getPackageManager(); in UsbUserSettingsManager()
137 ApplicationInfo aInfo = mPackageManager.getApplicationInfo(packageName, 0); in isCameraPermissionGranted()
196 ApplicationInfo aInfo = mPackageManager.getApplicationInfo(packageName, 0); in requestPermissionDialog()
275 return mPackageManager.queryIntentActivitiesAsUser(intent, PackageManager.GET_META_DATA, in queryIntentActivities()
295 try (XmlResourceParser parser = activityInfo.loadXmlMetaData(mPackageManager, in canBeDefault()
337 try (XmlResourceParser parser = activityInfo.loadXmlMetaData(mPackageManager, in canBeDefault()
365 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, in getPackageActivities()
395 ArrayList<DeviceFilter> deviceFilters = getDeviceFilters(mPackageManager, in dump()
422 ArrayList<AccessoryFilter> accessoryFilters = getAccessoryFilters(mPackageManager, in dump()
/frameworks/base/core/java/android/permission/
DPermissionManager.java56 private final IPackageManager mPackageManager; field in PermissionManager
66 mPackageManager = packageManager; in PermissionManager()
82 return mPackageManager.getRuntimePermissionsVersion(mContext.getUserId()); in getRuntimePermissionsVersion()
100 mPackageManager.setRuntimePermissionsVersion(version, mContext.getUserId()); in setRuntimePermissionsVersion()
/frameworks/base/services/core/java/com/android/server/om/
DOverlayManagerServiceImpl.java69 private final PackageManagerHelper mPackageManager; field in OverlayManagerServiceImpl
115 mPackageManager = packageManager; in OverlayManagerServiceImpl()
148 List<PackageInfo> overlayPackages = mPackageManager.getOverlayPackages(newUserId); in updateOverlaysForUser()
203 if (mPackageManager.getPackageInfo(targetPackageName, newUserId) == null) { in updateOverlaysForUser()
305 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(oi.packageName, in updateAndRefreshOverlaysForTarget()
339 PackageInfo packageInfo = mPackageManager.getPackageInfo(targetPackageName, userId); in updateAndRefreshOverlaysForTarget()
367 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(packageName, userId); in onOverlayPackageAdded()
428 final PackageInfo pkg = mPackageManager.getPackageInfo(packageName, userId); in onOverlayPackageReplaced()
490 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(packageName, userId); in setEnabled()
521 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(packageName, userId); in setEnabledExclusive()
[all …]
DOverlayManagerService.java223 private final PackageManagerHelper mPackageManager; field in OverlayManagerService
240 mPackageManager = new PackageManagerHelper(); in OverlayManagerService()
242 IdmapManager im = new IdmapManager(installer, mPackageManager); in OverlayManagerService()
244 mImpl = new OverlayManagerServiceImpl(mPackageManager, im, mSettings, in OverlayManagerService()
382 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageAdded()
385 mPackageManager.cachePackageInfo(packageName, userId, pi); in onPackageAdded()
405 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageChanged()
408 mPackageManager.cachePackageInfo(packageName, userId, pi); in onPackageChanged()
428 mPackageManager.forgetPackageInfo(packageName, userId); in onPackageReplacing()
446 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageReplaced()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DModuleInfoProvider.java62 private final IPackageManager mPackageManager; field in ModuleInfoProvider
71 mPackageManager = packageManager; in ModuleInfoProvider()
78 mPackageManager = null; in ModuleInfoProvider()
95 pi = mPackageManager.getPackageInfo(mPackageName, in systemReady()
181 allPackages = mPackageManager.getInstalledPackages( in getInstalledModules()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DPermissionMonitorTest.java115 @Mock private PackageManager mPackageManager; field in PermissionMonitorTest
126 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
140 when(mPackageManager.getInstalledPackages(anyInt())).thenReturn(/* empty app list */ null); in setUp()
329 when(mPackageManager.getPackageInfo(eq(name), anyInt())) in assertBackgroundPermission()
455 when(mPackageManager.getPackagesForUid(anyInt())).thenReturn(new String[]{SYSTEM_PACKAGE2}); in testUserAndPackageAddRemove()
464 when(mPackageManager.getPackagesForUid(anyInt())).thenReturn(new String[]{}); in testUserAndPackageAddRemove()
477 when(mPackageManager.getInstalledPackages(eq(GET_PERMISSIONS | MATCH_ANY_USER))).thenReturn( in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
484 when(mPackageManager.getPackageInfo(eq(MOCK_PACKAGE1), eq(GET_PERMISSIONS))).thenReturn( in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
527 when(mPackageManager.getInstalledPackages(eq(GET_PERMISSIONS | MATCH_ANY_USER))).thenReturn( in testUidFilteringDuringPackageInstallAndUninstall()
532 when(mPackageManager.getPackageInfo(eq(MOCK_PACKAGE1), eq(GET_PERMISSIONS))).thenReturn( in testUidFilteringDuringPackageInstallAndUninstall()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/power/
DAttentionDetectorTest.java56 private PackageManager mPackageManager; field in AttentionDetectorTest
69 when(mPackageManager.getAttentionServicePackageName()).thenReturn("com.google.android.as"); in setUp()
70 when(mPackageManager.checkPermission(any(), any())).thenReturn( in setUp()
121 when(mPackageManager.checkPermission(any(), any())).thenReturn( in testOnUserActivity_doesntCheckIfNotSufficientPermissions()
131 when(mPackageManager.checkPermission(any(), any())).thenReturn( in testOnUserActivity_disablesSettingIfNotSufficientPermissions()
302 mPackageManager = AttentionDetectorTest.this.mPackageManager; in TestableAttentionDetector()
/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/packages/SettingsLib/src/com/android/settingslib/location/
DRecentLocationAccesses.java62 private final PackageManager mPackageManager; field in RecentLocationAccesses
74 mPackageManager = context.getPackageManager(); in RecentLocationAccesses()
180 ApplicationInfo appInfo = mPackageManager.getApplicationInfoAsUser( in getAccessFromOps()
190 CharSequence appLabel = mPackageManager.getApplicationLabel(appInfo); in getAccessFromOps()
191 CharSequence badgedAppLabel = mPackageManager.getUserBadgedLabel(appLabel, userHandle); in getAccessFromOps()
DRecentLocationApps.java61 private final PackageManager mPackageManager; field in RecentLocationApps
67 mPackageManager = context.getPackageManager(); in RecentLocationApps()
200 ApplicationInfo appInfo = mPackageManager.getApplicationInfoAsUser( in getRequestFromOps()
210 CharSequence appLabel = mPackageManager.getApplicationLabel(appInfo); in getRequestFromOps()
211 CharSequence badgedAppLabel = mPackageManager.getUserBadgedLabel(appLabel, userHandle); in getRequestFromOps()
/frameworks/av/media/utils/
DServiceUtilities.cpp260 if (mPackageManager == nullptr) { in doIsAllowed()
262 mPackageManager = retreivePackageManager(); in doIsAllowed()
263 if (mPackageManager == nullptr) { in doIsAllowed()
270 auto status = mPackageManager->getNamesForUids({(int32_t)uid}, &packageNames); in doIsAllowed()
282 status = mPackageManager->isAudioPlaybackCaptureAllowed(packageNames, &isAllowed); in doIsAllowed()
311 if (mPackageManager == nullptr) { in dump()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/location/
DRecentLocationAccessesTest.java48 private PackageManager mPackageManager; field in RecentLocationAccessesTest
64 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
68 when(mPackageManager.getApplicationLabel(isA(ApplicationInfo.class))) in setUp()
70 when(mPackageManager.getUserBadgedLabel(isA(CharSequence.class), isA(UserHandle.class))) in setUp()
133 when(mPackageManager.getApplicationInfoAsUser( in mockTestApplicationInfos()
DRecentLocationAppsTest.java49 private PackageManager mPackageManager; field in RecentLocationAppsTest
63 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
68 when(mPackageManager.getApplicationLabel(isA(ApplicationInfo.class))) in setUp()
70 when(mPackageManager.getUserBadgedLabel(isA(CharSequence.class), isA(UserHandle.class))) in setUp()
131 when(mPackageManager.getApplicationInfoAsUser( in mockTestApplicationInfos()
/frameworks/base/services/core/java/com/android/server/pm/dex/
DDynamicCodeLogger.java60 private final IPackageManager mPackageManager; field in DynamicCodeLogger
71 mPackageManager = pms; in DynamicCodeLogger()
106 mPackageManager.getPackageInfo(packageName, /*flags*/ 0, userId); in logDynamicCodeLoading()
169 loadingUid = mPackageManager.getPackageUid(loadingPackageName, /*flags*/ 0, in logDynamicCodeLoading()
225 packages = mPackageManager.getPackagesForUid(loadingUid); in recordNative()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/
DActivityManagerWrapper.java79 private final PackageManager mPackageManager; field in ActivityManagerWrapper
85 mPackageManager = context.getPackageManager(); in ActivityManagerWrapper()
163 return getBadgedLabel(info.loadLabel(mPackageManager).toString(), userId); in getBadgedActivityLabel()
170 return getBadgedLabel(appInfo.loadLabel(mPackageManager).toString(), userId); in getBadgedApplicationLabel()
183 activityLabel = info.loadLabel(mPackageManager).toString(); in getBadgedContentDescription()
185 String applicationLabel = info.applicationInfo.loadLabel(mPackageManager).toString(); in getBadgedContentDescription()
197 label = mPackageManager.getUserBadgedLabel(label, new UserHandle(userId)).toString(); in getBadgedLabel()

12345