Loading services/core/java/com/android/server/pm/AppsFilter.java +29 −0 Original line number Diff line number Diff line Loading @@ -445,8 +445,31 @@ public class AppsFilter { private boolean shouldFilterApplicationInternal( PackageSetting callingPkgSetting, PackageSetting targetPkgSetting, int userId) { return shouldFilterApplicationInternal(callingPkgSetting, targetPkgSetting, userId, true /*expandSharedUser*/); } /** * @param expandSharedUser true if all members of the shared user a target may belong to should * be considered */ private boolean shouldFilterApplicationInternal( PackageSetting callingPkgSetting, PackageSetting targetPkgSetting, int userId, boolean expandSharedUser) { Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "shouldFilterApplicationInternal"); try { // special case shared user targets if (expandSharedUser && targetPkgSetting.sharedUser != null) { for (PackageSetting sharedMemberSetting : targetPkgSetting.sharedUser.packages) { if (!shouldFilterApplicationInternal( callingPkgSetting, sharedMemberSetting, userId, false /*expandSharedUser*/)) { return false; } } return true; } final String callingName = callingPkgSetting.pkg.packageName; final PackageParser.Package targetPkg = targetPkgSetting.pkg; Loading @@ -471,6 +494,12 @@ public class AppsFilter { } return false; } if (callingPkgSetting.appId == targetPkgSetting.appId) { if (DEBUG_LOGGING) { log(callingPkgSetting, targetPkgSetting, "same app id"); } return false; } if (isImplicitlyQueryableSystemApp(targetPkgSetting)) { if (DEBUG_LOGGING) { log(callingPkgSetting, targetPkgSetting, "implicitly queryable sys"); Loading Loading
services/core/java/com/android/server/pm/AppsFilter.java +29 −0 Original line number Diff line number Diff line Loading @@ -445,8 +445,31 @@ public class AppsFilter { private boolean shouldFilterApplicationInternal( PackageSetting callingPkgSetting, PackageSetting targetPkgSetting, int userId) { return shouldFilterApplicationInternal(callingPkgSetting, targetPkgSetting, userId, true /*expandSharedUser*/); } /** * @param expandSharedUser true if all members of the shared user a target may belong to should * be considered */ private boolean shouldFilterApplicationInternal( PackageSetting callingPkgSetting, PackageSetting targetPkgSetting, int userId, boolean expandSharedUser) { Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "shouldFilterApplicationInternal"); try { // special case shared user targets if (expandSharedUser && targetPkgSetting.sharedUser != null) { for (PackageSetting sharedMemberSetting : targetPkgSetting.sharedUser.packages) { if (!shouldFilterApplicationInternal( callingPkgSetting, sharedMemberSetting, userId, false /*expandSharedUser*/)) { return false; } } return true; } final String callingName = callingPkgSetting.pkg.packageName; final PackageParser.Package targetPkg = targetPkgSetting.pkg; Loading @@ -471,6 +494,12 @@ public class AppsFilter { } return false; } if (callingPkgSetting.appId == targetPkgSetting.appId) { if (DEBUG_LOGGING) { log(callingPkgSetting, targetPkgSetting, "same app id"); } return false; } if (isImplicitlyQueryableSystemApp(targetPkgSetting)) { if (DEBUG_LOGGING) { log(callingPkgSetting, targetPkgSetting, "implicitly queryable sys"); Loading