Loading core/java/android/content/pm/PackageManagerInternal.java +1 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,7 @@ public abstract class PackageManagerInternal { public abstract void grantEphemeralAccess(int userId, Intent intent, int targetAppId, int ephemeralAppId); public abstract boolean isInstantAppInstallerComponent(ComponentName component); /** * Prunes instant apps and state associated with uninstalled * instant apps according to the current platform policy. Loading services/core/java/com/android/server/am/ActivityStarter.java +12 −0 Original line number Diff line number Diff line Loading @@ -640,6 +640,18 @@ class ActivityStarter { final Intent ephemeralIntent = new Intent(intent); // Don't modify the client's object! intent = new Intent(intent); if (componentSpecified && intent.getData() != null && Intent.ACTION_VIEW.equals(intent.getAction()) && intent.hasCategory(Intent.CATEGORY_BROWSABLE) && mService.getPackageManagerInternalLocked() .isInstantAppInstallerComponent(intent.getComponent())) { // intercept intents targeted directly to the ephemeral installer the // ephemeral installer should never be started with a raw URL; instead // adjust the intent so it looks like a "normal" instant app launch intent.setComponent(null /*component*/); componentSpecified = false; } ResolveInfo rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId); if (rInfo == null) { Loading services/core/java/com/android/server/pm/PackageManagerService.java +12 −2 Original line number Diff line number Diff line Loading @@ -5788,6 +5788,10 @@ public class PackageManagerService extends IPackageManager.Stub { return false; } if (ps.getInstantApp(userId)) { if (DEBUG_EPHEMERAL) { Slog.v(TAG, "DENY instant app installed;" + " pkg: " + packageName); } return false; } } Loading Loading @@ -6267,7 +6271,6 @@ public class PackageManagerService extends IPackageManager.Stub { intent, resolvedType, flags, userId), userId); addEphemeral = !ephemeralDisabled && isEphemeralAllowed(intent, result, userId, false /*skipPackageCheck*/); // Check for cross profile results. boolean hasNonNegativePriorityResult = hasNonNegativePriority(result); xpResolveInfo = queryCrossProfileIntents( Loading Loading @@ -23072,6 +23075,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); } } @Override public boolean isInstantAppInstallerComponent(ComponentName component) { synchronized (mPackages) { return component != null && component.equals(mInstantAppInstallerComponent); } } @Override public void pruneInstantApps() { synchronized (mPackages) { Loading
core/java/android/content/pm/PackageManagerInternal.java +1 −0 Original line number Diff line number Diff line Loading @@ -241,6 +241,7 @@ public abstract class PackageManagerInternal { public abstract void grantEphemeralAccess(int userId, Intent intent, int targetAppId, int ephemeralAppId); public abstract boolean isInstantAppInstallerComponent(ComponentName component); /** * Prunes instant apps and state associated with uninstalled * instant apps according to the current platform policy. Loading
services/core/java/com/android/server/am/ActivityStarter.java +12 −0 Original line number Diff line number Diff line Loading @@ -640,6 +640,18 @@ class ActivityStarter { final Intent ephemeralIntent = new Intent(intent); // Don't modify the client's object! intent = new Intent(intent); if (componentSpecified && intent.getData() != null && Intent.ACTION_VIEW.equals(intent.getAction()) && intent.hasCategory(Intent.CATEGORY_BROWSABLE) && mService.getPackageManagerInternalLocked() .isInstantAppInstallerComponent(intent.getComponent())) { // intercept intents targeted directly to the ephemeral installer the // ephemeral installer should never be started with a raw URL; instead // adjust the intent so it looks like a "normal" instant app launch intent.setComponent(null /*component*/); componentSpecified = false; } ResolveInfo rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId); if (rInfo == null) { Loading
services/core/java/com/android/server/pm/PackageManagerService.java +12 −2 Original line number Diff line number Diff line Loading @@ -5788,6 +5788,10 @@ public class PackageManagerService extends IPackageManager.Stub { return false; } if (ps.getInstantApp(userId)) { if (DEBUG_EPHEMERAL) { Slog.v(TAG, "DENY instant app installed;" + " pkg: " + packageName); } return false; } } Loading Loading @@ -6267,7 +6271,6 @@ public class PackageManagerService extends IPackageManager.Stub { intent, resolvedType, flags, userId), userId); addEphemeral = !ephemeralDisabled && isEphemeralAllowed(intent, result, userId, false /*skipPackageCheck*/); // Check for cross profile results. boolean hasNonNegativePriorityResult = hasNonNegativePriority(result); xpResolveInfo = queryCrossProfileIntents( Loading Loading @@ -23072,6 +23075,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); } } @Override public boolean isInstantAppInstallerComponent(ComponentName component) { synchronized (mPackages) { return component != null && component.equals(mInstantAppInstallerComponent); } } @Override public void pruneInstantApps() { synchronized (mPackages) {