Loading services/core/java/android/content/pm/PackageManagerInternal.java +1 −14 Original line number Diff line number Diff line Loading @@ -301,25 +301,12 @@ public abstract class PackageManagerInternal { public abstract @PackageManager.DistractionRestriction int getDistractingPackageRestrictions( String packageName, int userId); /** * Do a straight uid lookup for the given package/application in the given user. This enforces * app visibility rules and permissions. Call {@link #getPackageUidInternal} for the internal * implementation. * @deprecated Use {@link PackageManager#getPackageUid(String, int)} * @return The app's uid, or < 0 if the package was not found in that user */ @Deprecated public abstract int getPackageUid(String packageName, @PackageInfoFlags int flags, int userId); /** * Do a straight uid lookup for the given package/application in the given user. * @see PackageManager#getPackageUidAsUser(String, int, int) * @return The app's uid, or < 0 if the package was not found in that user * TODO(b/148235092): rename this to getPackageUid */ public abstract int getPackageUidInternal(String packageName, @PackageInfoFlags int flags, int userId); public abstract int getPackageUid(String packageName, @PackageInfoFlags int flags, int userId); /** * Retrieve all of the information we know about a particular package/application. Loading services/core/java/com/android/server/StorageManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -2160,7 +2160,7 @@ class StorageManagerService extends IStorageManager.Stub Slog.i(TAG, "Remounting storage for pid: " + pid); final String[] sharedPackages = mPmInternal.getSharedUserPackagesForPackage(packageName, userId); final int uid = mPmInternal.getPackageUidInternal(packageName, 0, userId); final int uid = mPmInternal.getPackageUid(packageName, 0 /* flags */, userId); final String[] packages = sharedPackages.length != 0 ? sharedPackages : new String[]{packageName}; try { Loading services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -605,7 +605,7 @@ public class CrossProfileAppsServiceImpl extends ICrossProfileApps.Stub { private boolean isPlatformSignedAppWithAutomaticProfilesPermission( String packageName, int[] profileIds) { for (int userId : profileIds) { final int uid = mInjector.getPackageManagerInternal().getPackageUidInternal( final int uid = mInjector.getPackageManagerInternal().getPackageUid( packageName, /* flags= */ 0, userId); if (uid == -1) { continue; Loading services/core/java/com/android/server/pm/PackageManagerService.java +0 −6 Original line number Diff line number Diff line Loading @@ -24603,12 +24603,6 @@ public class PackageManagerService extends IPackageManager.Stub @Override public int getPackageUid(String packageName, int flags, int userId) { return PackageManagerService.this .getPackageUid(packageName, flags, userId); } @Override public int getPackageUidInternal(String packageName, int flags, int userId) { return PackageManagerService.this .getPackageUidInternal(packageName, flags, userId, Process.SYSTEM_UID); } services/core/java/com/android/server/pm/ShortcutService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3301,7 +3301,7 @@ public class ShortcutService extends IShortcutService.Stub { final long token = Binder.clearCallingIdentity(); try { int packageUid = mPackageManagerInternal.getPackageUidInternal(packageName, int packageUid = mPackageManagerInternal.getPackageUid(packageName, PackageManager.MATCH_DIRECT_BOOT_AUTO, userId); // Grant read uri permission to the caller on behalf of the shortcut owner. All // granted permissions are revoked when the default launcher changes, or when Loading Loading
services/core/java/android/content/pm/PackageManagerInternal.java +1 −14 Original line number Diff line number Diff line Loading @@ -301,25 +301,12 @@ public abstract class PackageManagerInternal { public abstract @PackageManager.DistractionRestriction int getDistractingPackageRestrictions( String packageName, int userId); /** * Do a straight uid lookup for the given package/application in the given user. This enforces * app visibility rules and permissions. Call {@link #getPackageUidInternal} for the internal * implementation. * @deprecated Use {@link PackageManager#getPackageUid(String, int)} * @return The app's uid, or < 0 if the package was not found in that user */ @Deprecated public abstract int getPackageUid(String packageName, @PackageInfoFlags int flags, int userId); /** * Do a straight uid lookup for the given package/application in the given user. * @see PackageManager#getPackageUidAsUser(String, int, int) * @return The app's uid, or < 0 if the package was not found in that user * TODO(b/148235092): rename this to getPackageUid */ public abstract int getPackageUidInternal(String packageName, @PackageInfoFlags int flags, int userId); public abstract int getPackageUid(String packageName, @PackageInfoFlags int flags, int userId); /** * Retrieve all of the information we know about a particular package/application. Loading
services/core/java/com/android/server/StorageManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -2160,7 +2160,7 @@ class StorageManagerService extends IStorageManager.Stub Slog.i(TAG, "Remounting storage for pid: " + pid); final String[] sharedPackages = mPmInternal.getSharedUserPackagesForPackage(packageName, userId); final int uid = mPmInternal.getPackageUidInternal(packageName, 0, userId); final int uid = mPmInternal.getPackageUid(packageName, 0 /* flags */, userId); final String[] packages = sharedPackages.length != 0 ? sharedPackages : new String[]{packageName}; try { Loading
services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -605,7 +605,7 @@ public class CrossProfileAppsServiceImpl extends ICrossProfileApps.Stub { private boolean isPlatformSignedAppWithAutomaticProfilesPermission( String packageName, int[] profileIds) { for (int userId : profileIds) { final int uid = mInjector.getPackageManagerInternal().getPackageUidInternal( final int uid = mInjector.getPackageManagerInternal().getPackageUid( packageName, /* flags= */ 0, userId); if (uid == -1) { continue; Loading
services/core/java/com/android/server/pm/PackageManagerService.java +0 −6 Original line number Diff line number Diff line Loading @@ -24603,12 +24603,6 @@ public class PackageManagerService extends IPackageManager.Stub @Override public int getPackageUid(String packageName, int flags, int userId) { return PackageManagerService.this .getPackageUid(packageName, flags, userId); } @Override public int getPackageUidInternal(String packageName, int flags, int userId) { return PackageManagerService.this .getPackageUidInternal(packageName, flags, userId, Process.SYSTEM_UID); }
services/core/java/com/android/server/pm/ShortcutService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3301,7 +3301,7 @@ public class ShortcutService extends IShortcutService.Stub { final long token = Binder.clearCallingIdentity(); try { int packageUid = mPackageManagerInternal.getPackageUidInternal(packageName, int packageUid = mPackageManagerInternal.getPackageUid(packageName, PackageManager.MATCH_DIRECT_BOOT_AUTO, userId); // Grant read uri permission to the caller on behalf of the shortcut owner. All // granted permissions are revoked when the default launcher changes, or when Loading