Loading core/java/android/app/ActivityManagerInternal.java +8 −0 Original line number Diff line number Diff line Loading @@ -1323,4 +1323,12 @@ public abstract class ActivityManagerInternal { */ public abstract void killApplicationSync(String pkgName, int appId, int userId, String reason, int exitInfoReason); /** * Add a creator token for all embedded intents (stored as extra) of the given intent. * * @param intent The given intent * @hide */ public abstract void addCreatorToken(Intent intent); } core/java/android/app/PendingIntent.java +3 −0 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,9 @@ public final class PendingIntent implements Parcelable { @Nullable String requiredPermission, @Nullable Bundle options) throws CanceledException { try { if (intent != null) { intent.collectExtraIntentKeys(); } String resolvedType = intent != null ? intent.resolveTypeIfNeeded(context.getContentResolver()) : null; Loading core/java/android/content/ClipData.java +1 −1 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,7 @@ public class ClipData implements Parcelable { for (int i = 0; i < size; i++) { final Item item = mItems.get(i); if (item.mIntent != null) { item.mIntent.prepareToLeaveProcess(leavingPackage); item.mIntent.prepareToLeaveProcess(leavingPackage, false); } if (item.mUri != null && leavingPackage) { if (StrictMode.vmFileUriExposureEnabled()) { Loading core/java/android/content/Intent.java +16 −3 Original line number Diff line number Diff line Loading @@ -12221,6 +12221,8 @@ public class Intent implements Parcelable, Cloneable { /** * Collects keys in the extra bundle whose value are intents. * With these keys collected on the client side, the system server would only unparcel values * of these keys and create IntentCreatorToken for them. * @hide */ public void collectExtraIntentKeys() { Loading Loading @@ -12583,22 +12585,29 @@ public class Intent implements Parcelable, Cloneable { */ @android.ravenwood.annotation.RavenwoodThrow public void prepareToLeaveProcess(boolean leavingPackage) { prepareToLeaveProcess(leavingPackage, true); } /** * @hide */ void prepareToLeaveProcess(boolean leavingPackage, boolean isTopLevel) { setAllowFds(false); if (mSelector != null) { mSelector.prepareToLeaveProcess(leavingPackage); mSelector.prepareToLeaveProcess(leavingPackage, false); } if (mClipData != null) { mClipData.prepareToLeaveProcess(leavingPackage, getFlags()); } if (mOriginalIntent != null) { mOriginalIntent.prepareToLeaveProcess(leavingPackage); mOriginalIntent.prepareToLeaveProcess(leavingPackage, false); } if (mExtras != null && !mExtras.isParcelled()) { final Object intent = mExtras.get(Intent.EXTRA_INTENT); if (intent instanceof Intent) { ((Intent) intent).prepareToLeaveProcess(leavingPackage); ((Intent) intent).prepareToLeaveProcess(leavingPackage, false); } } Loading Loading @@ -12672,6 +12681,10 @@ public class Intent implements Parcelable, Cloneable { StrictMode.onUnsafeIntentLaunch(this); } } if (isTopLevel) { collectExtraIntentKeys(); } } /** core/java/android/content/IntentSender.java +3 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,9 @@ public class IntentSender implements Parcelable { @Nullable Executor executor, @Nullable OnFinished onFinished) throws SendIntentException { try { if (intent != null) { intent.collectExtraIntentKeys(); } String resolvedType = intent != null ? intent.resolveTypeIfNeeded(context.getContentResolver()) : null; Loading Loading
core/java/android/app/ActivityManagerInternal.java +8 −0 Original line number Diff line number Diff line Loading @@ -1323,4 +1323,12 @@ public abstract class ActivityManagerInternal { */ public abstract void killApplicationSync(String pkgName, int appId, int userId, String reason, int exitInfoReason); /** * Add a creator token for all embedded intents (stored as extra) of the given intent. * * @param intent The given intent * @hide */ public abstract void addCreatorToken(Intent intent); }
core/java/android/app/PendingIntent.java +3 −0 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,9 @@ public final class PendingIntent implements Parcelable { @Nullable String requiredPermission, @Nullable Bundle options) throws CanceledException { try { if (intent != null) { intent.collectExtraIntentKeys(); } String resolvedType = intent != null ? intent.resolveTypeIfNeeded(context.getContentResolver()) : null; Loading
core/java/android/content/ClipData.java +1 −1 Original line number Diff line number Diff line Loading @@ -1149,7 +1149,7 @@ public class ClipData implements Parcelable { for (int i = 0; i < size; i++) { final Item item = mItems.get(i); if (item.mIntent != null) { item.mIntent.prepareToLeaveProcess(leavingPackage); item.mIntent.prepareToLeaveProcess(leavingPackage, false); } if (item.mUri != null && leavingPackage) { if (StrictMode.vmFileUriExposureEnabled()) { Loading
core/java/android/content/Intent.java +16 −3 Original line number Diff line number Diff line Loading @@ -12221,6 +12221,8 @@ public class Intent implements Parcelable, Cloneable { /** * Collects keys in the extra bundle whose value are intents. * With these keys collected on the client side, the system server would only unparcel values * of these keys and create IntentCreatorToken for them. * @hide */ public void collectExtraIntentKeys() { Loading Loading @@ -12583,22 +12585,29 @@ public class Intent implements Parcelable, Cloneable { */ @android.ravenwood.annotation.RavenwoodThrow public void prepareToLeaveProcess(boolean leavingPackage) { prepareToLeaveProcess(leavingPackage, true); } /** * @hide */ void prepareToLeaveProcess(boolean leavingPackage, boolean isTopLevel) { setAllowFds(false); if (mSelector != null) { mSelector.prepareToLeaveProcess(leavingPackage); mSelector.prepareToLeaveProcess(leavingPackage, false); } if (mClipData != null) { mClipData.prepareToLeaveProcess(leavingPackage, getFlags()); } if (mOriginalIntent != null) { mOriginalIntent.prepareToLeaveProcess(leavingPackage); mOriginalIntent.prepareToLeaveProcess(leavingPackage, false); } if (mExtras != null && !mExtras.isParcelled()) { final Object intent = mExtras.get(Intent.EXTRA_INTENT); if (intent instanceof Intent) { ((Intent) intent).prepareToLeaveProcess(leavingPackage); ((Intent) intent).prepareToLeaveProcess(leavingPackage, false); } } Loading Loading @@ -12672,6 +12681,10 @@ public class Intent implements Parcelable, Cloneable { StrictMode.onUnsafeIntentLaunch(this); } } if (isTopLevel) { collectExtraIntentKeys(); } } /**
core/java/android/content/IntentSender.java +3 −0 Original line number Diff line number Diff line Loading @@ -288,6 +288,9 @@ public class IntentSender implements Parcelable { @Nullable Executor executor, @Nullable OnFinished onFinished) throws SendIntentException { try { if (intent != null) { intent.collectExtraIntentKeys(); } String resolvedType = intent != null ? intent.resolveTypeIfNeeded(context.getContentResolver()) : null; Loading