Home
last modified time | relevance | path

Searched refs:mPm (Results 1 – 25 of 62) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/os/
DPowerManagerTest.java40 private PowerManager mPm; field in PowerManagerTest
57 mPm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in setUp()
76 assertNotNull(mPm); in testPreconditions()
86 PowerManager.WakeLock wl = mPm.newWakeLock(PowerManager.FULL_WAKE_LOCK, "FULL_WAKE_LOCK"); in testNewWakeLock()
89 wl = mPm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "SCREEN_BRIGHT_WAKE_LOCK"); in testNewWakeLock()
92 wl = mPm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "SCREEN_DIM_WAKE_LOCK"); in testNewWakeLock()
95 wl = mPm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "PARTIAL_WAKE_LOCK"); in testNewWakeLock()
113 PowerManager.WakeLock wl = mPm.newWakeLock(badFlags, "foo"); in testBadNewWakeLock()
128 PowerManager.WakeLock wakeLock = mPm.newWakeLock( in testWakeLockWithWorkChains()
182 assertEquals(status, mPm.getCurrentThermalStatus()); in testGetThermalStatus()
[all …]
DPowerManagerVrTest.java35 private PowerManager mPm; field in PowerManagerVrTest
50 mPm = (PowerManager) getInstrumentation().getTargetContext().getSystemService( in setUp()
75 assertNotNull(mPm); in testPreconditions()
129 PowerManager.WakeLock wl = mPm.newWakeLock( in wakeUpDevice()
/frameworks/base/tests/permission/src/com/android/framework/permission/tests/
DPmPermissionsTests.java28 private PackageManager mPm; field in PmPermissionsTests
34 mPm = getContext().getPackageManager(); in setUp()
44 mPm.getPackageSizeInfo(mPkgName, null); in testGetPackageSize()
59 mPm.deleteApplicationCacheFiles(mPkgName, null); in testDeleteApplicationCacheFiles()
81 mPm.freeStorage(100000, null); in testFreeStorage1()
96 mPm.freeStorageAndNotify(100000, null); in testFreeStorage2()
111 mPm.clearApplicationUserData(mPkgName, null); in testClearApplicationUserData()
126 mPm.deletePackage(mPkgName, null, 0); in testDeletePackage()
/frameworks/base/core/java/android/content/pm/
DLauncherActivityInfo.java37 private final PackageManager mPm; field in LauncherActivityInfo
59 mPm = context.getPackageManager(); in LauncherActivityInfo()
93 return mActivityInfo.loadLabel(mPm); in getLabel()
112 = mPm.getResourcesForApplication(mActivityInfo.applicationInfo); in getIcon()
119 icon = mActivityInfo.loadIcon(mPm); in getIcon()
150 return mPm.getPackageInfo(mActivityInfo.packageName, in getFirstInstallTime()
176 return mPm.getUserBadgedIcon(originalIcon, mUser); in getBadgedIcon()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/applications/
DDefaultAppInfo.java41 protected final PackageManager mPm; field in DefaultAppInfo
56 mPm = pm; in DefaultAppInfo()
67 mPm = pm; in DefaultAppInfo()
80 return componentInfo.loadLabel(mPm); in loadLabel()
82 final ApplicationInfo appInfo = mPm.getApplicationInfoAsUser( in loadLabel()
84 return appInfo.loadLabel(mPm); in loadLabel()
90 return packageItemInfo.loadLabel(mPm); in loadLabel()
103 final ApplicationInfo appInfo = mPm.getApplicationInfoAsUser( in loadIcon()
116 final ApplicationInfo appInfo = mPm.getApplicationInfoAsUser( in loadIcon()
/frameworks/base/packages/SystemUI/src/com/android/systemui/plugins/
DPluginEnablerImpl.java28 private PackageManager mPm; field in PluginEnablerImpl
38 mPm = pm; in PluginEnablerImpl()
51 mPm.setComponentEnabledSetting(component, desiredState, PackageManager.DONT_KILL_APP); in setDisabled()
61 return mPm.getComponentEnabledSetting(component) in isEnabled()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DAppOpsInfo.java43 private PackageManager mPm; field in AppOpsInfo
72 mPm = pm; in bindGuts()
90 info = mPm.getApplicationInfo(mPkg, in bindHeader()
97 mAppName = String.valueOf(mPm.getApplicationLabel(info)); in bindHeader()
98 pkgicon = mPm.getApplicationIcon(info); in bindHeader()
102 pkgicon = mPm.getDefaultActivityIcon(); in bindHeader()
/frameworks/base/tests/NullHomeTest/src/com/android/test/nullhome/
DNullHomeTest.java50 private PackageManager mPm; field in NullHomeTest
56 mPm = mContext.getPackageManager(); in before()
63 mPm.getHomeActivities(homeActivities); in checkNullHome()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DRankingHelperTest.java82 @Mock PackageManager mPm; field in RankingHelperTest
111 when(mPm.getApplicationInfoAsUser(eq(PKG), anyInt(), anyInt())).thenReturn(legacy); in setUp()
112 when(mPm.getApplicationInfoAsUser(eq(UPDATED_PKG), anyInt(), anyInt())).thenReturn(upgrade); in setUp()
113 when(mPm.getApplicationInfoAsUser(eq(SYSTEM_PKG), anyInt(), anyInt())).thenReturn(upgrade); in setUp()
114 when(mPm.getPackageUidAsUser(eq(PKG), anyInt())).thenReturn(UID); in setUp()
115 when(mPm.getPackageUidAsUser(eq(UPDATED_PKG), anyInt())).thenReturn(UID2); in setUp()
116 when(mPm.getPackageUidAsUser(eq(SYSTEM_PKG), anyInt())).thenReturn(SYSTEM_UID); in setUp()
119 when(mPm.getPackageInfoAsUser(eq(SYSTEM_PKG), anyInt(), anyInt())).thenReturn(info); in setUp()
120 when(mPm.getPackageInfoAsUser(eq(PKG), anyInt(), anyInt())) in setUp()
126 when(mContext.getPackageManager()).thenReturn(mPm); in setUp()
DRoleObserverTest.java89 private IPackageManager mPm; field in RoleObserverTest
130 mRoleObserver = mService.new RoleObserver(mRoleManager, mPm, mExecutor); in setUp()
162 when(mPm.getPackageUid("dialer", MATCH_ALL, 0)).thenReturn(30); in testInit()
166 when(mPm.getPackageUid("emergency", MATCH_ALL, 0)).thenReturn(40); in testInit()
217 when(mPm.getPackageUid("phone", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault()
261 when(mPm.getPackageUid("emerPhone", MATCH_ALL, 0)).thenReturn(30); in testSwapDefault_multipleOverlappingApps()
295 when(mPm.getPackageUid("phone", MATCH_ALL, 10)).thenReturn(30); in testSwapDefault_newUser()
DNotificationAssistantsTest.java58 private PackageManager mPm; field in NotificationAssistantsTest
82 getContext().setMockPackageManager(mPm); in setUp()
94 when(mPm.queryIntentServicesAsUser(any(), anyInt(), anyInt())) in setUp()
/frameworks/base/core/java/com/android/internal/app/
DSuspendedAppActivity.java49 private PackageManager mPm; field in SuspendedAppActivity
55 return mPm.getApplicationInfoAsUser(packageName, 0, mUserId).loadLabel(mPm); in getAppLabel()
67 final ResolveInfo resolvedInfo = mPm.resolveActivityAsUser(moreDetailsIntent, 0, userId); in getMoreDetailsActivity()
139 mPm = getPackageManager(); in onCreate()
154 mSuspendingAppResources = mPm.getResourcesForApplicationAsUser(suspendingPackage, in onCreate()
DAbstractResolverComparator.java48 protected final PackageManager mPm; field in AbstractResolverComparator
101 mPm = context.getPackageManager(); in AbstractResolverComparator()
104 ? mPm.getDefaultBrowserPackageNameAsUser(UserHandle.myUserId()) in AbstractResolverComparator()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DForegroundServicesDialog.java159 final PackageManager mPm; field in ForegroundServicesDialog.PackageItemAdapter
165 mPm = context.getPackageManager(); in PackageItemAdapter()
176 apps.add(mPm.getApplicationInfo(packages[i], in setPackages()
182 apps.sort(new ApplicationInfo.DisplayNameComparator(mPm)); in setPackages()
200 label.setText(getItem(position).loadLabel(mPm)); in getView()
/frameworks/base/tests/StatusBar/src/com/android/statusbartest/
DPowerTest.java35 PowerManager mPm; field in PowerTest
46 mPm = (PowerManager)getSystemService("power"); in tests()
47 mProx = mPm.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, "PowerTest-prox"); in tests()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DNetworkLogger.java47 private final PackageManagerInternal mPm; field in NetworkLogger
62 mPm.getNameForUid(uid), timestamp);
71 ConnectEvent connectEvent = new ConnectEvent(ipAddr, port, mPm.getNameForUid(uid),
88 mPm = pm; in NetworkLogger()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/users/
DAppRestrictionsHelperTest.java58 private @Mock PackageManager mPm; field in AppRestrictionsHelperTest
92 when(mPm.getInstalledApplications(anyInt())).thenReturn(mInstalledAppInfos); in testFetchAndMergeApps()
153 verify(mPm, times(1)).deletePackageAsUser(eq("app3"), in testApplyUserAppsStates()
185 when(mPm.queryIntentActivities(argThat(new IntentMatcher(intent)), anyInt())) in addSystemAppsForIntent()
198 when(mPm.getPackageInfo(eq(pkg), anyInt())).thenReturn(packageInfo); in addSystemAppsWithRequiredAccounts()
218 when(mPm.getPackageInfo(eq(pkgName), anyInt())).thenReturn(packageInfo); in addInstalledApp()
282 return mPm; in getPackageManager()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DPackageInstallerActivity.java86 PackageManager mPm; field in PackageInstallerActivity
171 mPm.getApplicationLabel(mPkgInfo.applicationInfo)); in createDialog()
174 mPm.getApplicationLabel(mPkgInfo.applicationInfo)); in createDialog()
217 String[] packagesForUid = mPm.getPackagesForUid(sourceUid); in getPackageNameForUid()
252 String[] oldName = mPm.canonicalToCurrentPackageNames(new String[] { pkgName }); in initiateInstall()
263 mAppInfo = mPm.getApplicationInfo(pkgName, in initiateInstall()
292 mPm = getPackageManager(); in onCreate()
295 mInstaller = mPm.getPackageInstaller(); in onCreate()
506 mPkgInfo = mPm.getPackageInfo(packageUri.getSchemeSpecificPart(), in processPackageUri()
518 … mAppSnippet = new PackageUtil.AppSnippet(mPm.getApplicationLabel(mPkgInfo.applicationInfo), in processPackageUri()
[all …]
/frameworks/base/cmds/am/src/com/android/commands/am/
DAm.java42 private IPackageManager mPm; field in Am
71 mPm = IPackageManager.Stub.asInterface(ServiceManager.getService("package")); in onRun()
72 if (mPm == null) { in onRun()
152 Instrument instrument = new Instrument(mAm, mPm); in runInstrument()
/frameworks/base/core/java/android/util/
DIconDrawableFactory.java39 protected final PackageManager mPm; field in IconDrawableFactory
46 mPm = context.getPackageManager(); in IconDrawableFactory()
68 Drawable icon = mPm.loadUnbadgedItemIcon(itemInfo, appInfo); in getBadgedIcon()
/frameworks/base/services/core/java/com/android/server/net/watchlist/
DWatchlistLoggingHandler.java74 private final PackageManager mPm; field in WatchlistLoggingHandler
95 mPm = mContext.getPackageManager(); in WatchlistLoggingHandler()
154 final String[] packageNames = mPm.getPackagesForUid(uid); in isPackageTestOnly()
159 ai = mPm.getApplicationInfo(packageNames[0], 0); in isPackageTestOnly()
331 final String[] packageNames = mPm.getPackagesForUid(key); in getDigestFromUid()
336 final String apkPath = mPm.getPackageInfoAsUser(packageName, in getDigestFromUid()
/frameworks/base/services/core/java/com/android/server/storage/
DAppCollector.java100 private final PackageManager mPm; field in AppCollector.BackgroundHandler
108 mPm = pm; in BackgroundHandler()
122 final List<ApplicationInfo> apps = mPm.getInstalledApplicationsAsUser( in handleMessage()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/plugins/
DPluginInstanceManager.java69 private final PackageManager mPm; field in PluginInstanceManager
87 mPm = pm; in PluginInstanceManager()
301 List<ResolveInfo> result = mPm.queryIntentServices(intent, 0); in handleQueryPlugins()
342 ApplicationInfo info = mPm.getApplicationInfo(pkg, 0); in handleLoadPlugin()
344 if (mPm.checkPermission(PLUGIN_PERMISSION, pkg) in handleLoadPlugin()
376 label = mPm.getServiceInfo(component, 0).loadLabel(mPm).toString(); in handleLoadPlugin()
/frameworks/base/services/core/java/com/android/server/pm/
DPackageInstallerService.java133 private final PackageManagerService mPm; field in PackageInstallerService
193 mPm = pm; in PackageInstallerService()
260 boolean isDeviceUpgrading = mPm.isDeviceUpgrading(); in restoreAndApplyStagedSessionIfNeeded()
297 synchronized (mPm.mInstallLock) { in reconcileStagesLocked()
298 mPm.removeCodePathLI(stage); in reconcileStagesLocked()
360 mContext, mPm, mInstallThread.getLooper(), mStagingManager, in readSessionsLocked()
483 if (mPm.isUserRestricted(userId, UserManager.DISALLOW_INSTALL_APPS)) { in createSessionInternal()
503 && !mPm.isCallerVerifier(callingUid)) { in createSessionInternal()
619 session = new PackageInstallerSession(mInternalCallback, mContext, mPm, this, in createSessionInternal()
840 mPm.deletePackageVersioned(versionedPackage, adapter.getBinder(), userId, flags); in uninstall()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
DAppCollectorTest.java62 @Mock private PackageManager mPm; field in AppCollectorTest
72 when(mContext.getPackageManager()).thenReturn(mPm); in setUp()
80 }).when(mPm).getInstalledApplicationsAsUser(anyInt(), anyInt()); in setUp()

123