From f86dc0d69752e713fd172b1c451eb4960a78761f Mon Sep 17 00:00:00 2001 From: Louis Chang Date: Wed, 3 Jun 2020 15:48:14 +0800 Subject: [PATCH] Deliver latest intent extras to recents Activity was destroyed when moved to background if don't-keep-activities dev options had set. Swiping up gesture would start recents behind top activity for recents animation. However, the recents activity was restarted With the intent which the activity was originally created, not the latest intent came along with #startRecentsActivity(). Bug: 156772625 Test: swipe up with don't-keep-activities dev options set Change-Id: I7a60a36e64b390099caa26500161f707330dab35 --- services/core/java/com/android/server/wm/RecentsAnimation.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/wm/RecentsAnimation.java b/services/core/java/com/android/server/wm/RecentsAnimation.java index bded65141a3a7..178082016bbbf 100644 --- a/services/core/java/com/android/server/wm/RecentsAnimation.java +++ b/services/core/java/com/android/server/wm/RecentsAnimation.java @@ -233,6 +233,8 @@ class RecentsAnimation implements RecentsAnimationCallbacks, // duration of the gesture that is driven by the recents component targetActivity.mLaunchTaskBehind = true; mLaunchedTargetActivity = targetActivity; + // TODO(b/156772625): Evaluate to send new intents vs. replacing the intent extras. + targetActivity.intent.replaceExtras(mTargetIntent); // Fetch all the surface controls and pass them to the client to get the animation // started. Cancel any existing recents animation running synchronously (do not hold the