Home
last modified time | relevance | path

Searched refs:pkg (Results 1 – 25 of 230) sorted by relevance

12345678910

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageParserTest.java69 PackageParser.Package pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, in testParse_noCache() local
71 assertNotNull(pkg); in testParse_noCache()
74 pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, in testParse_noCache()
76 assertNotNull(pkg); in testParse_noCache()
93 PackageParser.Package pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, in testParse_withCache() local
95 assertEquals("cache_android", pkg.packageName); in testParse_withCache()
99 pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, false /* useCaches */); in testParse_withCache()
100 assertEquals("android", pkg.packageName); in testParse_withCache()
105 pkg = pp.parsePackage(FRAMEWORK, 0 /* parseFlags */, true /* useCaches */); in testParse_withCache()
106 assertEquals("android", pkg.packageName); in testParse_withCache()
[all …]
/frameworks/base/core/java/android/app/
DINotificationManager.aidl43 void cancelAllNotifications(String pkg, int userId); in cancelAllNotifications() argument
45 void clearData(String pkg, int uid, boolean fromApp); in clearData() argument
46 void enqueueToast(String pkg, ITransientNotification callback, int duration); in enqueueToast() argument
47 void cancelToast(String pkg, ITransientNotification callback); in cancelToast() argument
48 void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id, in enqueueNotificationWithTag() argument
50 void cancelNotificationWithTag(String pkg, String tag, int id, int userId); in cancelNotificationWithTag() argument
52 void setShowBadge(String pkg, int uid, boolean showBadge); in setShowBadge() argument
53 boolean canShowBadge(String pkg, int uid); in canShowBadge() argument
54 void setNotificationsEnabledForPackage(String pkg, int uid, boolean enabled); in setNotificationsEnabledForPackage() argument
55 boolean areNotificationsEnabledForPackage(String pkg, int uid); in areNotificationsEnabledForPackage() argument
[all …]
/frameworks/base/services/tests/notification/src/com/android/server/notification/
DGroupHelperTest.java59 private StatusBarNotification getSbn(String pkg, int id, String tag, in getSbn() argument
67 return new StatusBarNotification(pkg, pkg, id, tag, 0, 0, nb.build(), user, null, in getSbn()
71 private StatusBarNotification getSbn(String pkg, int id, String tag, in getSbn() argument
73 return getSbn(pkg, id, tag, user, null); in getSbn()
78 final String pkg = "package"; in testNoGroup_postingUnderLimit() local
80 mGroupHelper.onNotificationPosted(getSbn(pkg, i, String.valueOf(i), UserHandle.SYSTEM)); in testNoGroup_postingUnderLimit()
83 eq(UserHandle.USER_SYSTEM), eq(pkg), anyString()); in testNoGroup_postingUnderLimit()
91 final String pkg = "package"; in testNoGroup_multiPackage() local
94 mGroupHelper.onNotificationPosted(getSbn(pkg, i, String.valueOf(i), UserHandle.SYSTEM)); in testNoGroup_multiPackage()
99 eq(UserHandle.USER_SYSTEM), eq(pkg), anyString()); in testNoGroup_multiPackage()
[all …]
/frameworks/base/packages/DefaultContainerService/src/com/android/defcontainer/
DDefaultContainerService.java103 PackageLite pkg = null;
107 pkg = PackageParser.parsePackageLite(packageFile, 0);
108 handle = NativeLibraryHelper.Handle.create(pkg);
109 return copyPackageToContainerInner(pkg, handle, containerId, key, isExternal,
134 PackageLite pkg = null;
137 pkg = PackageParser.parsePackageLite(packageFile, 0);
138 return copyPackageInner(pkg, target);
166 final PackageParser.PackageLite pkg;
169 pkg = PackageParser.parsePackageLite(packageFile, 0);
170 sizeBytes = PackageHelper.calculateInstalledSize(pkg, isForwardLocked, abiOverride);
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DRankingConfig.java33 Collection<NotificationChannelGroup> getNotificationChannelGroups(String pkg, in getNotificationChannelGroups() argument
35 void createNotificationChannelGroup(String pkg, int uid, NotificationChannelGroup group, in createNotificationChannelGroup() argument
37 ParceledListSlice<NotificationChannelGroup> getNotificationChannelGroups(String pkg, in getNotificationChannelGroups() argument
39 void createNotificationChannel(String pkg, int uid, NotificationChannel channel, in createNotificationChannel() argument
41 void updateNotificationChannel(String pkg, int uid, NotificationChannel channel); in updateNotificationChannel() argument
42 …NotificationChannel getNotificationChannel(String pkg, int uid, String channelId, boolean includeD… in getNotificationChannel() argument
43 void deleteNotificationChannel(String pkg, int uid, String channelId); in deleteNotificationChannel() argument
44 void permanentlyDeleteNotificationChannel(String pkg, int uid, String channelId); in permanentlyDeleteNotificationChannel() argument
45 void permanentlyDeleteNotificationChannels(String pkg, int uid); in permanentlyDeleteNotificationChannels() argument
46 …ParceledListSlice<NotificationChannel> getNotificationChannels(String pkg, int uid, boolean includ… in getNotificationChannels() argument
DRankingHelper.java240 private static String recordKey(String pkg, int uid) { in recordKey() argument
241 return pkg + "|" + uid; in recordKey()
244 private Record getRecord(String pkg, int uid) { in getRecord() argument
245 final String key = recordKey(pkg, uid); in getRecord()
251 private Record getOrCreateRecord(String pkg, int uid) { in getOrCreateRecord() argument
252 return getOrCreateRecord(pkg, uid, in getOrCreateRecord()
256 private Record getOrCreateRecord(String pkg, int uid, int importance, int priority, in getOrCreateRecord() argument
258 final String key = recordKey(pkg, uid); in getOrCreateRecord()
260 Record r = (uid == Record.UNKNOWN_UID) ? mRestoredWithoutUids.get(pkg) : mRecords.get( in getOrCreateRecord()
264 r.pkg = pkg; in getOrCreateRecord()
[all …]
DNotificationManagerService.java480 private boolean checkNotificationOp(String pkg, int uid) { in checkNotificationOp() argument
481 return mAppOps.checkOp(AppOpsManager.OP_POST_NOTIFICATION, uid, pkg) in checkNotificationOp()
482 == AppOpsManager.MODE_ALLOWED && !isPackageSuspendedForUser(pkg, uid); in checkNotificationOp()
488 final String pkg; field in NotificationManagerService.ToastRecord
493 ToastRecord(int pid, String pkg, ITransientNotification callback, int duration, in ToastRecord() argument
496 this.pkg = pkg; in ToastRecord()
507 if (filter != null && !filter.matches(pkg)) return; in dump()
516 + " pkg=" + pkg in toString()
605 String pkg, String tag, int id, int userId) {
606 cancelNotification(callingUid, callingPid, pkg, tag, id, 0,
[all …]
DSnoozeHelper.java92 protected boolean isSnoozed(int userId, String pkg, String key) { in isSnoozed() argument
94 && mSnoozedNotifications.get(userId).containsKey(pkg) in isSnoozed()
95 && mSnoozedNotifications.get(userId).get(pkg).containsKey(key); in isSnoozed()
98 protected Collection<NotificationRecord> getSnoozed(int userId, String pkg) { in getSnoozed() argument
100 && mSnoozedNotifications.get(userId).containsKey(pkg)) { in getSnoozed()
101 return mSnoozedNotifications.get(userId).get(pkg).values(); in getSnoozed()
160 protected boolean cancel(int userId, String pkg, String tag, int id) { in cancel() argument
163 mSnoozedNotifications.get(userId).get(pkg); in cancel()
205 protected boolean cancel(int userId, String pkg) { in cancel() argument
207 if (mSnoozedNotifications.get(userId).containsKey(pkg)) { in cancel()
[all …]
/frameworks/base/core/java/android/content/
DComponentName.java57 public static @NonNull ComponentName createRelative(@NonNull String pkg, @NonNull String cls) { in createRelative() argument
65 fullName = pkg + cls; in createRelative()
70 return new ComponentName(pkg, fullName); in createRelative()
88 public static @NonNull ComponentName createRelative(@NonNull Context pkg, @NonNull String cls) { in createRelative() argument
89 return createRelative(pkg.getPackageName(), cls); in createRelative()
100 public ComponentName(@NonNull String pkg, @NonNull String cls) { in ComponentName() argument
101 if (pkg == null) throw new NullPointerException("package name is null"); in ComponentName()
103 mPackage = pkg; in ComponentName()
115 public ComponentName(@NonNull Context pkg, @NonNull String cls) { in ComponentName() argument
117 mPackage = pkg.getPackageName(); in ComponentName()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageManagerServiceUtils.java92 for (PackageParser.Package pkg : packages) { in applyPackageFilter()
93 if (filter.test(pkg)) { in applyPackageFilter()
94 sortTemp.add(pkg); in applyPackageFilter()
101 for (PackageParser.Package pkg : sortTemp) { in applyPackageFilter()
102 result.add(pkg); in applyPackageFilter()
105 packageManagerService.findSharedNonSystemLibraries(pkg); in applyPackageFilter()
126 applyPackageFilter((pkg) -> pkg.coreApp, result, remainingPkgs, sortTemp, in getPackagesForDexopt()
132 applyPackageFilter((pkg) -> pkgNames.contains(pkg.packageName), result, remainingPkgs, in getPackagesForDexopt()
136 applyPackageFilter((pkg) -> in getPackagesForDexopt()
137 packageManagerService.getDexManager().isUsedByOtherApps(pkg.packageName), result, in getPackagesForDexopt()
[all …]
DKeySetManagerService.java130 PackageSetting pkg = mPackages.get(packageName); in packageIsSignedByLPr() local
131 if (pkg == null) { in packageIsSignedByLPr()
134 if (pkg.keySetData == null) { in packageIsSignedByLPr()
141 ArraySet<Long> pkgKeys = mKeySetMapping.get(pkg.keySetData.getProperSigningKeySet()); in packageIsSignedByLPr()
156 PackageSetting pkg = mPackages.get(packageName); in packageIsSignedByExactlyLPr() local
157 if (pkg == null) { in packageIsSignedByExactlyLPr()
160 if (pkg.keySetData == null in packageIsSignedByExactlyLPr()
161 || pkg.keySetData.getProperSigningKeySet() in packageIsSignedByExactlyLPr()
169 ArraySet<Long> pkgKeys = mKeySetMapping.get(pkg.keySetData.getProperSigningKeySet()); in packageIsSignedByExactlyLPr()
183 public void assertScannedPackageValid(PackageParser.Package pkg) in assertScannedPackageValid() argument
[all …]
DPackageDexOptimizer.java103 static boolean canOptimizePackage(PackageParser.Package pkg) { in canOptimizePackage() argument
104 return (pkg.applicationInfo.flags & ApplicationInfo.FLAG_HAS_CODE) != 0; in canOptimizePackage()
114 int performDexOpt(PackageParser.Package pkg, String[] sharedLibraries, in performDexOpt() argument
117 if (!canOptimizePackage(pkg)) { in performDexOpt()
121 final long acquireTime = acquireWakeLockLI(pkg.applicationInfo.uid); in performDexOpt()
123 return performDexOptLI(pkg, sharedLibraries, instructionSets, checkProfiles, in performDexOpt()
136 private int performDexOptLI(PackageParser.Package pkg, String[] sharedLibraries, in performDexOptLI() argument
141 targetInstructionSets : getAppDexInstructionSets(pkg.applicationInfo); in performDexOptLI()
143 final List<String> paths = pkg.getAllCodePaths(); in performDexOptLI()
144 final int sharedGid = UserHandle.getSharedAppGid(pkg.applicationInfo.uid); in performDexOptLI()
[all …]
DOtaDexoptService.java154 for (PackageParser.Package pkg : others) { in prepare()
155 deleteOatArtifactsOfPackage(pkg); in prepare()
245 private static String getOatDir(PackageParser.Package pkg) { in getOatDir() argument
246 if (!pkg.canHaveOatDir()) { in getOatDir()
249 File codePath = new File(pkg.codePath); in getOatDir()
256 private void deleteOatArtifactsOfPackage(PackageParser.Package pkg) { in deleteOatArtifactsOfPackage() argument
257 String[] instructionSets = getAppDexInstructionSets(pkg.applicationInfo); in deleteOatArtifactsOfPackage()
258 for (String codePath : pkg.getAllCodePaths()) { in deleteOatArtifactsOfPackage()
261 mPackageManagerService.mInstaller.deleteOdex(codePath, isa, getOatDir(pkg)); in deleteOatArtifactsOfPackage()
272 private synchronized List<String> generatePackageDexopts(PackageParser.Package pkg, in generatePackageDexopts() argument
[all …]
DInstantAppRegistry.java137 PackageParser.Package pkg = mService.mPackages.get(packageName); in getInstantAppCookieLPw() local
138 if (pkg == null) { in getInstantAppCookieLPw()
142 byte[] pendingCookie = mCookiePersistence.getPendingPersistCookieLPr(pkg, userId); in getInstantAppCookieLPw()
170 PackageParser.Package pkg = mService.mPackages.get(packageName); in setInstantAppCookieLPw() local
171 if (pkg == null) { in setInstantAppCookieLPw()
175 mCookiePersistence.schedulePersistLPw(userId, pkg, cookie); in setInstantAppCookieLPw()
261 public void onPackageInstalledLPw(@NonNull PackageParser.Package pkg, @NonNull int[] userIds) { in onPackageInstalledLPw() argument
262 PackageSetting ps = (PackageSetting) pkg.mExtras; in onPackageInstalledLPw()
269 if (mService.mPackages.get(pkg.packageName) == null || !ps.getInstalled(userId)) { in onPackageInstalledLPw()
274 propagateInstantAppPermissionsIfNeeded(pkg.packageName, userId); in onPackageInstalledLPw()
[all …]
DPackageSetting.java34 PackageParser.Package pkg; field in PackageSetting
101 pkg = orig.pkg; in doCopy()
140 proto.write(PackageProto.VERSION_STRING, pkg.mVersionName); in writeToProto()
145 if (pkg != null) { in writeToProto()
148 proto.write(PackageProto.SplitProto.REVISION_CODE, pkg.baseRevisionCode); in writeToProto()
150 if (pkg.splitNames != null) { in writeToProto()
151 for (int i = 0; i < pkg.splitNames.length; i++) { in writeToProto()
153 proto.write(PackageProto.SplitProto.NAME, pkg.splitNames[i]); in writeToProto()
154 proto.write(PackageProto.SplitProto.REVISION_CODE, pkg.splitRevisionCodes[i]); in writeToProto()
DDefaultPermissionGrantPolicy.java220 private void grantRuntimePermissionsForPackageLocked(int userId, PackageParser.Package pkg) { in grantRuntimePermissionsForPackageLocked() argument
222 for (String permission : pkg.requestedPermissions) { in grantRuntimePermissionsForPackageLocked()
229 grantRuntimePermissionsLPw(pkg, permissions, true, userId); in grantRuntimePermissionsForPackageLocked()
236 for (PackageParser.Package pkg : mService.mPackages.values()) { in grantAllRuntimePermissions()
237 grantRuntimePermissionsForPackageLocked(userId, pkg); in grantAllRuntimePermissions()
250 for (PackageParser.Package pkg : mService.mPackages.values()) { in grantPermissionsToSysComponentsAndPrivApps()
251 if (!isSysComponentOrPersistentPlatformSignedPrivAppLPr(pkg) in grantPermissionsToSysComponentsAndPrivApps()
252 || !doesPackageSupportRuntimePermissions(pkg) in grantPermissionsToSysComponentsAndPrivApps()
253 || pkg.requestedPermissions.isEmpty()) { in grantPermissionsToSysComponentsAndPrivApps()
256 grantRuntimePermissionsForPackageLocked(userId, pkg); in grantPermissionsToSysComponentsAndPrivApps()
[all …]
DSettings.java549 if (dp == null && p.pkg != null && p.pkg.isSystemApp() && !p.pkg.isUpdatedSystemApp()) { in disableSystemPackageLPw()
550 if((p.pkg != null) && (p.pkg.applicationInfo != null)) { in disableSystemPackageLPw()
551 p.pkg.applicationInfo.flags |= ApplicationInfo.FLAG_UPDATED_SYSTEM_APP; in disableSystemPackageLPw()
575 if((p.pkg != null) && (p.pkg.applicationInfo != null)) { in enableSystemPackageLPw()
576 p.pkg.applicationInfo.flags &= ~ApplicationInfo.FLAG_UPDATED_SYSTEM_APP; in enableSystemPackageLPw()
933 void insertPackageSettingLPw(PackageSetting p, PackageParser.Package pkg) { in insertPackageSettingLPw() argument
934 p.pkg = pkg; in insertPackageSettingLPw()
937 final String volumeUuid = pkg.applicationInfo.volumeUuid; in insertPackageSettingLPw()
938 final String codePath = pkg.applicationInfo.getCodePath(); in insertPackageSettingLPw()
939 final String resourcePath = pkg.applicationInfo.getResourcePath(); in insertPackageSettingLPw()
[all …]
/frameworks/base/core/java/android/nfc/
DINfcAdapterExtras.aidl26 Bundle open(in String pkg, IBinder b); in open() argument
27 Bundle close(in String pkg, IBinder b); in close() argument
28 Bundle transceive(in String pkg, in byte[] data_in); in transceive() argument
29 int getCardEmulationRoute(in String pkg); in getCardEmulationRoute() argument
30 void setCardEmulationRoute(in String pkg, int route); in setCardEmulationRoute() argument
31 void authenticate(in String pkg, in byte[] token); in authenticate() argument
32 String getDriverName(in String pkg); in getDriverName() argument
/frameworks/base/core/java/android/service/notification/
DStatusBarNotification.java33 private final String pkg; field in StatusBarNotification
50 public StatusBarNotification(String pkg, String opPkg, int id, in StatusBarNotification() argument
53 if (pkg == null) throw new NullPointerException(); in StatusBarNotification()
56 this.pkg = pkg; in StatusBarNotification()
74 public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid, in StatusBarNotification() argument
77 if (pkg == null) throw new NullPointerException(); in StatusBarNotification()
80 this.pkg = pkg; in StatusBarNotification()
94 this.pkg = in.readString(); in StatusBarNotification()
117 String sbnKey = user.getIdentifier() + "|" + pkg + "|" + id + "|" + tag + "|" + uid; in key()
126 return user.getIdentifier() + "|" + pkg + "|" + "g:" + overrideGroupKey; in groupKey()
[all …]
/frameworks/base/core/java/android/content/pm/split/
DSplitDependencyLoader.java153 PackageParser.PackageLite pkg) throws IllegalDependencyException { in createDependenciesFromPackage() argument
164 for (int splitIdx = 0; splitIdx < pkg.splitNames.length; splitIdx++) { in createDependenciesFromPackage()
165 if (!pkg.isFeatureSplits[splitIdx]) { in createDependenciesFromPackage()
172 final String splitDependency = pkg.usesSplitNames[splitIdx]; in createDependenciesFromPackage()
174 final int depIdx = Arrays.binarySearch(pkg.splitNames, splitDependency); in createDependenciesFromPackage()
176 throw new IllegalDependencyException("Split '" + pkg.splitNames[splitIdx] in createDependenciesFromPackage()
191 for (int splitIdx = 0; splitIdx < pkg.splitNames.length; splitIdx++) { in createDependenciesFromPackage()
192 if (pkg.isFeatureSplits[splitIdx]) { in createDependenciesFromPackage()
199 final String configForSplit = pkg.configForSplit[splitIdx]; in createDependenciesFromPackage()
201 final int depIdx = Arrays.binarySearch(pkg.splitNames, configForSplit); in createDependenciesFromPackage()
[all …]
/frameworks/base/services/core/java/com/android/server/
DAttributeCache.java90 final Package pkg = mPackages.remove(packageName); in removePackage() local
91 if (pkg != null) { in removePackage()
92 for (int i = 0; i < pkg.mMap.size(); i++) { in removePackage()
93 final ArrayMap<int[], Entry> map = pkg.mMap.valueAt(i); in removePackage()
99 final Resources res = pkg.context.getResources(); in removePackage()
121 Package pkg = mPackages.get(packageName); in get() local
124 if (pkg != null) { in get()
125 map = pkg.mMap.get(resId); in get()
143 pkg = new Package(context); in get()
144 mPackages.put(packageName, pkg); in get()
[all …]
/frameworks/base/core/java/com/android/internal/content/
DPackageMonitor.java301 String pkg = uri != null ? uri.getSchemeSpecificPart() : null; in getPackageName() local
302 return pkg; in getPackageName()
321 String pkg = getPackageName(intent); in onReceive() local
327 if (pkg != null) { in onReceive()
329 mTempArray[0] = pkg; in onReceive()
333 onPackageUpdateFinished(pkg, uid); in onReceive()
334 onPackageModified(pkg); in onReceive()
337 onPackageAdded(pkg, uid); in onReceive()
339 onPackageAppeared(pkg, mChangeType); in onReceive()
342 mUpdatingPackages.remove(pkg); in onReceive()
[all …]
/frameworks/base/tools/preload2/src/com/android/preload/actions/
DRunMonkeyAction.java85 for (String pkg : pkgs) { in run()
86 Main.getUI().updateWaitDialog("Running monkey on " + pkg); in run()
90 forceStop(pkg); in run()
98 DeviceUtils.doShell(device, "monkey -p " + pkg + " " + ITERATIONS, 1, in run()
101 Main.getUI().updateWaitDialog("Retrieving heap data for " + pkg); in run()
102 Map<String, String> data = Main.findAndGetClassData(device, pkg); in run()
103 DumpData dumpData = new DumpData(pkg, data, new Date()); in run()
109 forceStop(pkg); in run()
/frameworks/base/packages/SystemUI/src/com/android/systemui/plugins/
DPluginManagerImpl.java212 String pkg = data.getEncodedSchemeSpecificPart(); in onReceive() local
213 if (mOneShotPackages.contains(pkg)) { in onReceive()
218 String label = pkg; in onReceive()
221 label = pm.getApplicationInfo(pkg, 0).loadLabel(pm).toString(); in onReceive()
236 Uri.parse("package://" + pkg)); in onReceive()
239 mContext.getSystemService(NotificationManager.class).notifyAsUser(pkg, in onReceive()
242 if (clearClassLoader(pkg)) { in onReceive()
243 Toast.makeText(mContext, "Reloading " + pkg, Toast.LENGTH_LONG).show(); in onReceive()
247 manager.onPackageChange(pkg); in onReceive()
251 manager.onPackageRemoved(pkg); in onReceive()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DForegroundServiceControllerImpl.java125 public void addNotification(String pkg, String key) { in addNotification() argument
126 if (mNotifications.get(pkg) == null) { in addNotification()
127 mNotifications.put(pkg, new ArraySet<String>()); in addNotification()
129 mNotifications.get(pkg).add(key); in addNotification()
131 public boolean removeNotification(String pkg, String key) { in removeNotification() argument
133 final ArraySet<String> keys = mNotifications.get(pkg); in removeNotification()
139 mNotifications.remove(pkg); in removeNotification()
146 for (String pkg : mRunning) { in isDungeonNeeded()
147 final ArraySet<String> set = mNotifications.get(pkg); in isDungeonNeeded()

12345678910