Loading services/core/java/com/android/server/pm/PackageManagerService.java +15 −2 Original line number Diff line number Diff line Loading @@ -4420,6 +4420,11 @@ public class PackageManagerService extends IPackageManager.Stub if (getInstantAppPackageName(callingUid) != null) { throw new SecurityException("Instant applications don't have access to this method"); } if (!mUserManager.exists(userId)) { throw new SecurityException("User doesn't exist"); } mPermissionManager.enforceCrossUserPermission( callingUid, userId, false, false, "checkPackageStartable"); final boolean userKeyUnlocked = StorageManager.isUserKeyUnlocked(userId); synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(packageName); Loading Loading @@ -5777,9 +5782,15 @@ public class PackageManagerService extends IPackageManager.Stub @Override public ChangedPackages getChangedPackages(int sequenceNumber, int userId) { if (getInstantAppPackageName(Binder.getCallingUid()) != null) { final int callingUid = Binder.getCallingUid(); if (getInstantAppPackageName(callingUid) != null) { return null; } if (!mUserManager.exists(userId)) { return null; } mPermissionManager.enforceCrossUserPermission( callingUid, userId, false, false, "getChangedPackages"); synchronized (mLock) { if (sequenceNumber >= mChangedPackagesSequenceNumber) { return null; Loading Loading @@ -8772,8 +8783,10 @@ public class PackageManagerService extends IPackageManager.Stub private ProviderInfo resolveContentProviderInternal(String name, int flags, int userId) { if (!mUserManager.exists(userId)) return null; flags = updateFlagsForComponent(flags, userId); final int callingUid = Binder.getCallingUid(); mPermissionManager.enforceCrossUserPermission( callingUid, userId, false, false, "resolveContentProvider"); flags = updateFlagsForComponent(flags, userId); final ProviderInfo providerInfo = mComponentResolver.queryProvider(name, flags, userId); if (providerInfo == null) { return null; Loading
services/core/java/com/android/server/pm/PackageManagerService.java +15 −2 Original line number Diff line number Diff line Loading @@ -4420,6 +4420,11 @@ public class PackageManagerService extends IPackageManager.Stub if (getInstantAppPackageName(callingUid) != null) { throw new SecurityException("Instant applications don't have access to this method"); } if (!mUserManager.exists(userId)) { throw new SecurityException("User doesn't exist"); } mPermissionManager.enforceCrossUserPermission( callingUid, userId, false, false, "checkPackageStartable"); final boolean userKeyUnlocked = StorageManager.isUserKeyUnlocked(userId); synchronized (mLock) { final PackageSetting ps = mSettings.mPackages.get(packageName); Loading Loading @@ -5777,9 +5782,15 @@ public class PackageManagerService extends IPackageManager.Stub @Override public ChangedPackages getChangedPackages(int sequenceNumber, int userId) { if (getInstantAppPackageName(Binder.getCallingUid()) != null) { final int callingUid = Binder.getCallingUid(); if (getInstantAppPackageName(callingUid) != null) { return null; } if (!mUserManager.exists(userId)) { return null; } mPermissionManager.enforceCrossUserPermission( callingUid, userId, false, false, "getChangedPackages"); synchronized (mLock) { if (sequenceNumber >= mChangedPackagesSequenceNumber) { return null; Loading Loading @@ -8772,8 +8783,10 @@ public class PackageManagerService extends IPackageManager.Stub private ProviderInfo resolveContentProviderInternal(String name, int flags, int userId) { if (!mUserManager.exists(userId)) return null; flags = updateFlagsForComponent(flags, userId); final int callingUid = Binder.getCallingUid(); mPermissionManager.enforceCrossUserPermission( callingUid, userId, false, false, "resolveContentProvider"); flags = updateFlagsForComponent(flags, userId); final ProviderInfo providerInfo = mComponentResolver.queryProvider(name, flags, userId); if (providerInfo == null) { return null;