Loading services/core/java/com/android/server/pm/AppsFilter.java +15 −1 Original line number Diff line number Diff line Loading @@ -495,10 +495,15 @@ public class AppsFilter { * Adds a package that should be considered when filtering visibility between apps. * * @param newPkgSetting the new setting being added * @param isReplace if the package is being replaced and may need extra cleanup. */ public void addPackage(PackageSetting newPkgSetting) { public void addPackage(PackageSetting newPkgSetting, boolean isReplace) { Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "filter.addPackage"); try { if (isReplace) { // let's first remove any prior rules for this package removePackage(newPkgSetting); } mStateProvider.runWithState((settings, users) -> { addPackageInternal(newPkgSetting, settings); if (mShouldFilterCache != null) { Loading Loading @@ -776,6 +781,15 @@ public class AppsFilter { return result; } /** * Equivalent to calling {@link #addPackage(PackageSetting, boolean)} with {@code isReplace} * equal to {@code false}. * @see AppsFilter#addPackage(PackageSetting, boolean) */ public void addPackage(PackageSetting newPkgSetting) { addPackage(newPkgSetting, false /* isReplace */); } /** * Removes a package for consideration when filtering visibility between apps. * Loading services/core/java/com/android/server/pm/PackageManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -12368,7 +12368,9 @@ public class PackageManagerService extends IPackageManager.Stub ksms.addScannedPackageLPw(pkg); mComponentResolver.addAllComponents(pkg, chatty); mAppsFilter.addPackage(pkgSetting); final boolean isReplace = reconciledPkg.prepareResult != null && reconciledPkg.prepareResult.replace; mAppsFilter.addPackage(pkgSetting, isReplace); // Don't allow ephemeral applications to define new permissions groups. if ((scanFlags & SCAN_AS_INSTANT_APP) != 0) { Loading
services/core/java/com/android/server/pm/AppsFilter.java +15 −1 Original line number Diff line number Diff line Loading @@ -495,10 +495,15 @@ public class AppsFilter { * Adds a package that should be considered when filtering visibility between apps. * * @param newPkgSetting the new setting being added * @param isReplace if the package is being replaced and may need extra cleanup. */ public void addPackage(PackageSetting newPkgSetting) { public void addPackage(PackageSetting newPkgSetting, boolean isReplace) { Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "filter.addPackage"); try { if (isReplace) { // let's first remove any prior rules for this package removePackage(newPkgSetting); } mStateProvider.runWithState((settings, users) -> { addPackageInternal(newPkgSetting, settings); if (mShouldFilterCache != null) { Loading Loading @@ -776,6 +781,15 @@ public class AppsFilter { return result; } /** * Equivalent to calling {@link #addPackage(PackageSetting, boolean)} with {@code isReplace} * equal to {@code false}. * @see AppsFilter#addPackage(PackageSetting, boolean) */ public void addPackage(PackageSetting newPkgSetting) { addPackage(newPkgSetting, false /* isReplace */); } /** * Removes a package for consideration when filtering visibility between apps. * Loading
services/core/java/com/android/server/pm/PackageManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -12368,7 +12368,9 @@ public class PackageManagerService extends IPackageManager.Stub ksms.addScannedPackageLPw(pkg); mComponentResolver.addAllComponents(pkg, chatty); mAppsFilter.addPackage(pkgSetting); final boolean isReplace = reconciledPkg.prepareResult != null && reconciledPkg.prepareResult.replace; mAppsFilter.addPackage(pkgSetting, isReplace); // Don't allow ephemeral applications to define new permissions groups. if ((scanFlags & SCAN_AS_INSTANT_APP) != 0) {