Home
last modified time | relevance | path

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

123456

/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.java64 @Mock private PackageManager mPackageManager; field in CarrierAppUtilsTest
90 Mockito.when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
107 Mockito.verifyNoMoreInteractions(mPackageManager, mTelephonyManager); in testDisableCarrierAppsUntilPrivileged_EmptyList()
113 Mockito.when(mPackageManager.getApplicationInfo("com.example.missing.app", in testDisableCarrierAppsUntilPrivileged_MissingApp()
122 Mockito.verify(mPackageManager, Mockito.never()).setSystemAppState(Mockito.anyString(), in testDisableCarrierAppsUntilPrivileged_MissingApp()
124 Mockito.verify(mPackageManager, Mockito.never()).setSystemAppState(Mockito.anyString(), in testDisableCarrierAppsUntilPrivileged_MissingApp()
126 Mockito.verify(mPackageManager, Mockito.never()).setSystemAppState(Mockito.anyString(), in testDisableCarrierAppsUntilPrivileged_MissingApp()
128 Mockito.verify(mPackageManager, Mockito.never()).setSystemAppState(Mockito.anyString(), in testDisableCarrierAppsUntilPrivileged_MissingApp()
137 Mockito.when(mPackageManager.getApplicationInfo(CARRIER_APP, in testDisableCarrierAppsUntilPrivileged_NonSystemApp()
143 Mockito.verify(mPackageManager, Mockito.never()).setSystemAppState(Mockito.anyString(), 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/packages/SettingsLib/tests/robotests/src/com/android/settingslib/drawer/
DTileUtilsTest.java79 private PackageManager mPackageManager; field in TileUtilsTest
94 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
95 when(mPackageManager.getResourcesForApplication(anyString())).thenReturn(mResources); in setUp()
96 when(mPackageManager.getResourcesForApplication((String) isNull())).thenReturn(mResources); in setUp()
97 when(mPackageManager.getApplicationInfo(eq("abc"), anyInt())) in setUp()
111 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getTilesForIntent_shouldParseCategory()
113 when(mPackageManager.queryIntentContentProvidersAsUser(any(Intent.class), anyInt(), in getTilesForIntent_shouldParseCategory()
133 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getTilesForIntent_shouldParseKeyHintForSystemApp()
135 when(mPackageManager.queryIntentContentProvidersAsUser(any(Intent.class), anyInt(), in getTilesForIntent_shouldParseKeyHintForSystemApp()
154 when(mPackageManager.queryIntentActivitiesAsUser(any(Intent.class), anyInt(), anyInt())) in getTilesForIntent_shouldSkipNonSystemApp()
[all …]
/frameworks/base/packages/CarSystemUI/tests/src/com/android/systemui/car/sideloaded/
DSideLoadedAppDetectorTest.java60 private PackageManager mPackageManager; field in SideLoadedAppDetectorTest
74 mPackageManager, in setUp()
87 when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any())) in isSafe_systemApp_returnsTrue()
102 when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any())) in isSafe_updatedSystemApp_returnsTrue()
120 when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any())) in isSafe_nonSystemApp_withSafeSource_returnsTrue()
122 when(mPackageManager.getInstallSourceInfo(APP_PACKAGE_NAME)).thenReturn(sourceInfo); in isSafe_nonSystemApp_withSafeSource_returnsTrue()
139 when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any())) in isSafe_nonSystemApp_withUnsafeSource_returnsFalse()
141 when(mPackageManager.getInstallSourceInfo(APP_PACKAGE_NAME)).thenReturn(sourceInfo); in isSafe_nonSystemApp_withUnsafeSource_returnsFalse()
158 when(mPackageManager.getApplicationInfoAsUser(eq(APP_PACKAGE_NAME), anyInt(), any())) in isSafe_nonSystemApp_withoutSource_returnsFalse()
160 when(mPackageManager.getInstallSourceInfo(APP_PACKAGE_NAME)).thenReturn(sourceInfo); in isSafe_nonSystemApp_withoutSource_returnsFalse()
/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/services/devicepolicy/java/com/android/server/devicepolicy/
DPersonalAppsSuspensionHelper.java60 private final PackageManager mPackageManager; field in PersonalAppsSuspensionHelper
67 mPackageManager = context.getPackageManager(); in PersonalAppsSuspensionHelper()
75 mPackageManager.getInstalledPackages(PACKAGE_QUERY_FLAGS); in getPersonalAppsForSuspension()
92 mPackageManager.getUnsuspendablePackages(result.toArray(new String[0])); in getPersonalAppsForSuspension()
106 mPackageManager.queryIntentActivities(intent, PACKAGE_QUERY_FLAGS); in getSystemLauncherPackages()
116 mPackageManager.getApplicationInfo(packageName, PACKAGE_QUERY_FLAGS); in getSystemLauncherPackages()
157 mPackageManager.resolveActivity(intent, PACKAGE_QUERY_FLAGS); in getSettingsPackageName()
174 mPackageManager.queryIntentActivities(intentToResolve, PACKAGE_QUERY_FLAGS); in hasLauncherIntent()
/frameworks/base/services/core/java/com/android/server/security/
DKeyAttestationApplicationIdProviderService.java42 mPackageManager = context.getPackageManager(); in KeyAttestationApplicationIdProviderService()
45 private PackageManager mPackageManager; field in KeyAttestationApplicationIdProviderService
57 String[] packageNames = mPackageManager.getPackagesForUid(uid); in getKeyAttestationApplicationId()
65 PackageInfo packageInfo = mPackageManager.getPackageInfoAsUser(packageNames[i], in getKeyAttestationApplicationId()
/frameworks/base/services/usb/java/com/android/server/usb/
DUsbUserSettingsManager.java59 private final PackageManager mPackageManager; field in UsbUserSettingsManager
72 mPackageManager = mUserContext.getPackageManager(); in UsbUserSettingsManager()
85 return mPackageManager.queryIntentActivitiesAsUser(intent, PackageManager.GET_META_DATA, in queryIntentActivities()
105 try (XmlResourceParser parser = activityInfo.loadXmlMetaData(mPackageManager, in canBeDefault()
147 try (XmlResourceParser parser = activityInfo.loadXmlMetaData(mPackageManager, in canBeDefault()
175 PackageInfo packageInfo = mPackageManager.getPackageInfo(packageName, in getPackageActivities()
203 ArrayList<DeviceFilter> deviceFilters = getDeviceFilters(mPackageManager, in dump()
230 ArrayList<AccessoryFilter> accessoryFilters = getAccessoryFilters(mPackageManager, in dump()
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/car/sideloaded/
DSideLoadedAppDetector.java48 private final PackageManager mPackageManager; field in SideLoadedAppDetector
57 mPackageManager = packageManager; in SideLoadedAppDetector()
64 List<PackageInfo> packages = mPackageManager.getInstalledPackagesAsUser( in hasUnsafeInstalledApps()
98 applicationInfo = mPackageManager.getApplicationInfoAsUser(packageName, in isSafe()
124 InstallSourceInfo sourceInfo = mPackageManager.getInstallSourceInfo(packageName); in isSafe()
/frameworks/base/services/tests/servicestests/src/com/android/server/compat/
DOverrideValidatorImplTest.java55 private PackageManager mPackageManager; field in OverrideValidatorImplTest
83 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
97 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_debugBuildAnyChangeDebugApp_allowOverride()
141 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_debugBuildAnyChangeReleaseApp_allowOverride()
182 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_betaBuildTargetSdkChangeDebugApp_allowOverride()
213 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_betaBuildEnabledChangeDebugApp_allowOverride()
232 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_betaBuildDisabledChangeDebugApp_allowOverride()
255 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_betaBuildAnyChangeReleaseApp_rejectOverride()
294 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_finalBuildTargetSdkChangeDebugAppOptin_allowOverride()
318 when(mPackageManager.getApplicationInfo(eq(PACKAGE_NAME), anyInt())) in getOverrideAllowedState_finalBuildTargetSdkChangeDebugAppOptout_rejectOverride()
[all …]
/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/tests/TelephonyCommonTests/src/com/android/internal/telephony/tests/
DSmsApplicationTest.java105 @Mock private PackageManager mPackageManager; field in SmsApplicationTest
113 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
119 .when(mPackageManager) in setUp()
123 .when(mPackageManager) in setUp()
127 .when(mPackageManager) in setUp()
179 verify(mPackageManager, times(SCHEMES_FOR_PREFERRED_APP.size())) in testPackageChanged()
198 when(mPackageManager.getPackageInfo(eq(SmsApplication.PHONE_PACKAGE_NAME), anyInt())) in setupPackageInfosForCoreApps()
205 when(mPackageManager.getPackageInfo(eq(SmsApplication.MMS_SERVICE_PACKAGE_NAME), anyInt())) in setupPackageInfosForCoreApps()
212 when(mPackageManager.getPackageInfo(eq(SmsApplication.BLUETOOTH_PACKAGE_NAME), anyInt())) in setupPackageInfosForCoreApps()
219 when(mPackageManager.getPackageInfo( in setupPackageInfosForCoreApps()
/frameworks/base/core/tests/coretests/src/android/accessibilityservice/
DAccessibilityShortcutInfoTest.java55 private PackageManager mPackageManager; field in AccessibilityShortcutInfoTest
63 mPackageManager = mTargetContext.getPackageManager(); in setUp()
76 mShortcutInfo.loadDescription(mPackageManager), is(description)); in testDescription()
86 mShortcutInfo.loadSummary(mPackageManager), is(summary)); in testSummary()
108 mShortcutInfo.loadHtmlDescription(mPackageManager), is(htmlDescription)); in testHtmlDescription()
/frameworks/base/tests/PlatformCompatGating/src/com/android/tests/gating/
DPlatformCompatPermissionsTest.java57 private PackageManager mPackageManager; field in PlatformCompatPermissionsTest
68 mPackageManager = mContext.getPackageManager(); in setUp()
83 mPlatformCompat.reportChange(1, mPackageManager.getApplicationInfo(packageName, 0)); in reportChange_noLogCompatChangePermission_throwsSecurityException()
92 mPlatformCompat.reportChange(1, mPackageManager.getApplicationInfo(packageName, 0)); in reportChange_logCompatChangePermission_noThrow()
135 mPlatformCompat.isChangeEnabled(1, mPackageManager.getApplicationInfo(packageName, 0)); in isChangeEnabled_noReadCompatConfigPermission_throwsSecurityException()
145 mPlatformCompat.isChangeEnabled(1, mPackageManager.getApplicationInfo(packageName, 0)); in isChangeEnabled_noLogCompatChangeConfigPermission_throwsSecurityException()
154 mPlatformCompat.isChangeEnabled(1, mPackageManager.getApplicationInfo(packageName, 0)); in isChangeEnabled_readAndLogCompatChangeConfigPermission_noThrow()
/frameworks/base/services/core/java/com/android/server/pm/dex/
DSystemServerDexLoadReporter.java39 private final IPackageManager mPackageManager; field in SystemServerDexLoadReporter
42 mPackageManager = pm; in SystemServerDexLoadReporter()
56 mPackageManager.notifyDexLoad( in report()
/frameworks/base/services/core/java/com/android/server/om/
DOverlayManagerService.java229 private final PackageManagerHelperImpl mPackageManager; field in OverlayManagerService
247 mPackageManager = new PackageManagerHelperImpl(context); in OverlayManagerService()
249 IdmapManager im = new IdmapManager(IdmapDaemon.getInstance(), mPackageManager); in OverlayManagerService()
251 mImpl = new OverlayManagerServiceImpl(mPackageManager, im, mSettings, in OverlayManagerService()
254 mActorEnforcer = new OverlayActorEnforcer(mPackageManager); in OverlayManagerService()
395 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageAdded()
398 mPackageManager.cachePackageInfo(packageName, userId, pi); in onPackageAdded()
418 final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId, in onPackageChanged()
421 mPackageManager.cachePackageInfo(packageName, userId, pi); in onPackageChanged()
441 mPackageManager.forgetPackageInfo(packageName, userId); in onPackageReplacing()
[all …]
DOverlayManagerServiceImpl.java69 private final PackageManagerHelper mPackageManager; field in OverlayManagerServiceImpl
119 mPackageManager = packageManager; in OverlayManagerServiceImpl()
153 List<PackageInfo> overlayPackages = mPackageManager.getOverlayPackages(newUserId); in updateOverlaysForUser()
212 if (mPackageManager.getPackageInfo(targetPackageName, newUserId) == null) { in updateOverlaysForUser()
314 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(oi.packageName, in updateAndRefreshOverlaysForTarget()
348 PackageInfo packageInfo = mPackageManager.getPackageInfo(targetPackageName, userId); in updateAndRefreshOverlaysForTarget()
376 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(packageName, userId); in onOverlayPackageAdded()
439 final PackageInfo pkg = mPackageManager.getPackageInfo(packageName, userId); in onOverlayPackageReplaced()
503 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(packageName, userId); in setEnabled()
534 final PackageInfo overlayPackage = mPackageManager.getPackageInfo(packageName, userId); in setEnabledExclusive()
[all …]
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/
DButtonRoleHolderController.java54 private final PackageManager mPackageManager; field in ButtonRoleHolderController
65 mPackageManager = packageManager; in ButtonRoleHolderController()
134 ApplicationInfo appInfo = mPackageManager.getApplicationInfo(packageName, in loadIcon()
136 return appInfo.loadIcon(mPackageManager); in loadIcon()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
DCustomTileTest.kt64 @Mock private lateinit var mPackageManager: PackageManager variable in com.android.systemui.qs.external.CustomTileTest
75 mContext.setMockPackageManager(mPackageManager) in setUp()
81 `when`(mPackageManager.getApplicationInfo(anyString(), anyInt())) in setUp()
84 `when`(mPackageManager.getServiceInfo(any(ComponentName::class.java), anyInt())) in setUp()
96 `when`(userContext.packageManager).thenReturn(mPackageManager) in testCorrectUser()
/frameworks/base/services/core/java/com/android/server/pm/
DModuleInfoProvider.java61 private final IPackageManager mPackageManager; field in ModuleInfoProvider
71 mPackageManager = packageManager; in ModuleInfoProvider()
80 mPackageManager = null; in ModuleInfoProvider()
98 pi = mPackageManager.getPackageInfo(mPackageName, in systemReady()
186 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()
331 when(mPackageManager.getPackageInfo(eq(name), anyInt())) in assertBackgroundPermission()
458 when(mPackageManager.getPackagesForUid(anyInt())).thenReturn(new String[]{SYSTEM_PACKAGE2}); in testUserAndPackageAddRemove()
467 when(mPackageManager.getPackagesForUid(anyInt())).thenReturn(new String[]{}); in testUserAndPackageAddRemove()
480 when(mPackageManager.getInstalledPackages(eq(GET_PERMISSIONS | MATCH_ANY_USER))).thenReturn( in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
487 when(mPackageManager.getPackageInfo(eq(MOCK_PACKAGE1), eq(GET_PERMISSIONS))).thenReturn( in testUidFilteringDuringVpnConnectDisconnectAndUidUpdates()
530 when(mPackageManager.getInstalledPackages(eq(GET_PERMISSIONS | MATCH_ANY_USER))).thenReturn( in testUidFilteringDuringPackageInstallAndUninstall()
535 when(mPackageManager.getPackageInfo(eq(MOCK_PACKAGE1), eq(GET_PERMISSIONS))).thenReturn( in testUidFilteringDuringPackageInstallAndUninstall()
[all …]

123456