Loading core/java/android/app/ApplicationStartInfo.java +24 −1 Original line number Diff line number Diff line Loading @@ -416,11 +416,34 @@ public final class ApplicationStartInfo implements Parcelable { /** * @see #getStartIntent * * <p class="note"> Note: This method will clone the provided intent and ensure that the cloned * intent doesn't contain any large objects like bitmaps in its extras by stripping it in the * least aggressive acceptable way for the individual intent.</p> * * @hide */ public void setIntent(Intent startIntent) { if (startIntent != null) { if (startIntent.canStripForHistory()) { // If maybeStripForHistory will return a lightened version, do that. mStartIntent = startIntent.maybeStripForHistory(); } else if (startIntent.getExtras() != null) { // If maybeStripForHistory would not return a lightened version and extras is // non-null then extras contains un-parcelled data. Use cloneFilter to strip data // more aggressively. mStartIntent = startIntent.cloneFilter(); } else { // Finally, if maybeStripForHistory would not return a lightened version and extras // is null then do a regular clone so we don't leak the intent. mStartIntent = new Intent(startIntent); } // If the newly cloned intent has an original intent, clear that as we don't need it and // can't guarantee it doesn't need to be stripped as well. if (mStartIntent.getOriginalIntent() != null) { mStartIntent.setOriginalIntent(null); } } } Loading Loading
core/java/android/app/ApplicationStartInfo.java +24 −1 Original line number Diff line number Diff line Loading @@ -416,11 +416,34 @@ public final class ApplicationStartInfo implements Parcelable { /** * @see #getStartIntent * * <p class="note"> Note: This method will clone the provided intent and ensure that the cloned * intent doesn't contain any large objects like bitmaps in its extras by stripping it in the * least aggressive acceptable way for the individual intent.</p> * * @hide */ public void setIntent(Intent startIntent) { if (startIntent != null) { if (startIntent.canStripForHistory()) { // If maybeStripForHistory will return a lightened version, do that. mStartIntent = startIntent.maybeStripForHistory(); } else if (startIntent.getExtras() != null) { // If maybeStripForHistory would not return a lightened version and extras is // non-null then extras contains un-parcelled data. Use cloneFilter to strip data // more aggressively. mStartIntent = startIntent.cloneFilter(); } else { // Finally, if maybeStripForHistory would not return a lightened version and extras // is null then do a regular clone so we don't leak the intent. mStartIntent = new Intent(startIntent); } // If the newly cloned intent has an original intent, clear that as we don't need it and // can't guarantee it doesn't need to be stripped as well. if (mStartIntent.getOriginalIntent() != null) { mStartIntent.setOriginalIntent(null); } } } Loading