Loading core/java/android/content/Intent.java +13 −0 Original line number Diff line number Diff line Loading @@ -5123,6 +5123,8 @@ public class Intent implements Parcelable, Cloneable { private Intent mSelector; private ClipData mClipData; private int mContentUserHint = UserHandle.USER_CURRENT; /** Token to track instant app launches. Local only; do not copy cross-process. */ private String mLaunchToken; // --------------------------------------------------------------------- Loading @@ -5143,6 +5145,7 @@ public class Intent implements Parcelable, Cloneable { this.mComponent = o.mComponent; this.mFlags = o.mFlags; this.mContentUserHint = o.mContentUserHint; this.mLaunchToken = o.mLaunchToken; if (o.mCategories != null) { this.mCategories = new ArraySet<String>(o.mCategories); } Loading Loading @@ -6379,6 +6382,16 @@ public class Intent implements Parcelable, Cloneable { return mContentUserHint; } /** @hide */ public String getLaunchToken() { return mLaunchToken; } /** @hide */ public void setLaunchToken(String launchToken) { mLaunchToken = launchToken; } /** * Sets the ClassLoader that will be used when unmarshalling * any Parcelable values from the extras of this Intent. Loading services/core/java/com/android/server/am/ActivityMetricsLogger.java +1 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,7 @@ class ActivityMetricsLogger { if (info.launchedActivity.info.launchToken != null) { builder.addTaggedData(FIELD_INSTANT_APP_LAUNCH_TOKEN, info.launchedActivity.info.launchToken); info.launchedActivity.info.launchToken = null; } builder.addTaggedData(APP_TRANSITION_IS_EPHEMERAL, info.launchedActivity.info.applicationInfo.isInstantApp() ? 1 : 0); Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +4 −0 Original line number Diff line number Diff line Loading @@ -1227,6 +1227,10 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mService.setProfileApp(aInfo.applicationInfo, aInfo.processName, profilerInfo); } } final String intentLaunchToken = intent.getLaunchToken(); if (aInfo.launchToken == null && intentLaunchToken != null) { aInfo.launchToken = intentLaunchToken; } } return aInfo; } Loading services/core/java/com/android/server/pm/InstantAppResolver.java +2 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,7 @@ public abstract class InstantAppResolver { // Intent that is launched if the package couldn't be installed for any reason. final Intent failureIntent = new Intent(origIntent); failureIntent.setFlags(failureIntent.getFlags() | Intent.FLAG_IGNORE_EPHEMERAL); failureIntent.setLaunchToken(token); try { final IIntentSender failureIntentTarget = ActivityManager.getService() .getIntentSender( Loading @@ -216,6 +217,7 @@ public abstract class InstantAppResolver { // Intent that is launched if the package was installed successfully. final Intent successIntent = new Intent(origIntent); successIntent.setLaunchToken(token); try { final IIntentSender successIntentTarget = ActivityManager.getService() .getIntentSender( Loading Loading
core/java/android/content/Intent.java +13 −0 Original line number Diff line number Diff line Loading @@ -5123,6 +5123,8 @@ public class Intent implements Parcelable, Cloneable { private Intent mSelector; private ClipData mClipData; private int mContentUserHint = UserHandle.USER_CURRENT; /** Token to track instant app launches. Local only; do not copy cross-process. */ private String mLaunchToken; // --------------------------------------------------------------------- Loading @@ -5143,6 +5145,7 @@ public class Intent implements Parcelable, Cloneable { this.mComponent = o.mComponent; this.mFlags = o.mFlags; this.mContentUserHint = o.mContentUserHint; this.mLaunchToken = o.mLaunchToken; if (o.mCategories != null) { this.mCategories = new ArraySet<String>(o.mCategories); } Loading Loading @@ -6379,6 +6382,16 @@ public class Intent implements Parcelable, Cloneable { return mContentUserHint; } /** @hide */ public String getLaunchToken() { return mLaunchToken; } /** @hide */ public void setLaunchToken(String launchToken) { mLaunchToken = launchToken; } /** * Sets the ClassLoader that will be used when unmarshalling * any Parcelable values from the extras of this Intent. Loading
services/core/java/com/android/server/am/ActivityMetricsLogger.java +1 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,7 @@ class ActivityMetricsLogger { if (info.launchedActivity.info.launchToken != null) { builder.addTaggedData(FIELD_INSTANT_APP_LAUNCH_TOKEN, info.launchedActivity.info.launchToken); info.launchedActivity.info.launchToken = null; } builder.addTaggedData(APP_TRANSITION_IS_EPHEMERAL, info.launchedActivity.info.applicationInfo.isInstantApp() ? 1 : 0); Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +4 −0 Original line number Diff line number Diff line Loading @@ -1227,6 +1227,10 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D mService.setProfileApp(aInfo.applicationInfo, aInfo.processName, profilerInfo); } } final String intentLaunchToken = intent.getLaunchToken(); if (aInfo.launchToken == null && intentLaunchToken != null) { aInfo.launchToken = intentLaunchToken; } } return aInfo; } Loading
services/core/java/com/android/server/pm/InstantAppResolver.java +2 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,7 @@ public abstract class InstantAppResolver { // Intent that is launched if the package couldn't be installed for any reason. final Intent failureIntent = new Intent(origIntent); failureIntent.setFlags(failureIntent.getFlags() | Intent.FLAG_IGNORE_EPHEMERAL); failureIntent.setLaunchToken(token); try { final IIntentSender failureIntentTarget = ActivityManager.getService() .getIntentSender( Loading @@ -216,6 +217,7 @@ public abstract class InstantAppResolver { // Intent that is launched if the package was installed successfully. final Intent successIntent = new Intent(origIntent); successIntent.setLaunchToken(token); try { final IIntentSender successIntentTarget = ActivityManager.getService() .getIntentSender( Loading