Loading services/core/java/com/android/server/pm/PackageManagerService.java +9 −10 Original line number Diff line number Diff line Loading @@ -4407,12 +4407,12 @@ public class PackageManagerService extends IPackageManager.Stub // reader final AndroidPackage p = mPackages.get(packageName); if (p != null && AndroidPackageUtils.isMatchForSystemOnly(p, flags)) { PackageSetting ps = getPackageSettingInternal(p.getPackageName(), callingUid); if (shouldFilterApplicationLocked(ps, callingUid, userId)) { return -1; } final PackageSetting ps = getPackageSettingInternal(p.getPackageName(), callingUid); if (ps != null && ps.getInstalled(userId) && !shouldFilterApplicationLocked(ps, callingUid, userId)) { return UserHandle.getUid(userId, p.getUid()); } } if ((flags & MATCH_KNOWN_PACKAGES) != 0) { final PackageSetting ps = mSettings.getPackageLPr(packageName); if (ps != null && ps.isMatch(flags) Loading Loading @@ -8799,14 +8799,12 @@ public class PackageManagerService extends IPackageManager.Stub synchronized (mLock) { final AndroidPackage p = mPackages.get(packageName); if (p != null && AndroidPackageUtils.isMatchForSystemOnly(p, flags)) { PackageSetting ps = getPackageSetting(p.getPackageName()); if (shouldFilterApplicationLocked(ps, callingUid, userId)) { return null; } // TODO: Shouldn't this be checking for package installed state for userId and // return null? final PackageSetting ps = getPackageSetting(p.getPackageName()); if (ps != null && ps.getInstalled(userId) && !shouldFilterApplicationLocked(ps, callingUid, userId)) { return mPermissionManager.getGidsForUid(UserHandle.getUid(userId, ps.appId)); } } if ((flags & MATCH_KNOWN_PACKAGES) != 0) { final PackageSetting ps = mSettings.getPackageLPr(packageName); if (ps != null && ps.isMatch(flags) Loading Loading @@ -12488,6 +12486,7 @@ public class PackageManagerService extends IPackageManager.Stub } } builder.append(" to access user "); builder.append(userId); builder.append("."); return builder.toString(); } Loading
services/core/java/com/android/server/pm/PackageManagerService.java +9 −10 Original line number Diff line number Diff line Loading @@ -4407,12 +4407,12 @@ public class PackageManagerService extends IPackageManager.Stub // reader final AndroidPackage p = mPackages.get(packageName); if (p != null && AndroidPackageUtils.isMatchForSystemOnly(p, flags)) { PackageSetting ps = getPackageSettingInternal(p.getPackageName(), callingUid); if (shouldFilterApplicationLocked(ps, callingUid, userId)) { return -1; } final PackageSetting ps = getPackageSettingInternal(p.getPackageName(), callingUid); if (ps != null && ps.getInstalled(userId) && !shouldFilterApplicationLocked(ps, callingUid, userId)) { return UserHandle.getUid(userId, p.getUid()); } } if ((flags & MATCH_KNOWN_PACKAGES) != 0) { final PackageSetting ps = mSettings.getPackageLPr(packageName); if (ps != null && ps.isMatch(flags) Loading Loading @@ -8799,14 +8799,12 @@ public class PackageManagerService extends IPackageManager.Stub synchronized (mLock) { final AndroidPackage p = mPackages.get(packageName); if (p != null && AndroidPackageUtils.isMatchForSystemOnly(p, flags)) { PackageSetting ps = getPackageSetting(p.getPackageName()); if (shouldFilterApplicationLocked(ps, callingUid, userId)) { return null; } // TODO: Shouldn't this be checking for package installed state for userId and // return null? final PackageSetting ps = getPackageSetting(p.getPackageName()); if (ps != null && ps.getInstalled(userId) && !shouldFilterApplicationLocked(ps, callingUid, userId)) { return mPermissionManager.getGidsForUid(UserHandle.getUid(userId, ps.appId)); } } if ((flags & MATCH_KNOWN_PACKAGES) != 0) { final PackageSetting ps = mSettings.getPackageLPr(packageName); if (ps != null && ps.isMatch(flags) Loading Loading @@ -12488,6 +12486,7 @@ public class PackageManagerService extends IPackageManager.Stub } } builder.append(" to access user "); builder.append(userId); builder.append("."); return builder.toString(); }