From e1fec4215e08d7402387c690a339eccb7ccc8c0d Mon Sep 17 00:00:00 2001 From: chaviw Date: Tue, 20 Mar 2018 16:47:43 -0700 Subject: [PATCH] Don't add stopping apps in relaunch based on stopped flag. The activity was getting added to the list of activities that should be moved to stopped. This was causing the window to get removed and then re-added, which is where the flicker was coming from. The check to add stopping apps when the flag r.stopped is set was a fix for a lifecycle issue with relaunch. However, this issue is now fixed without this. The stopped flag is not set appropriately because activities that are paused can still be considered stopped if they never went through completeResumeLocked, like in multi-window. Change-Id: I2e49bfa031caa189cc1e440749d0a22b30b76792 Fixes: 75276931 Test: Tested original issue to make sure it still works from b/30060825 Test: Split screen no longer flickers when moving divider --- services/core/java/com/android/server/am/ActivityRecord.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java index 68c47d58f92d2..e64af268ff0e6 100644 --- a/services/core/java/com/android/server/am/ActivityRecord.java +++ b/services/core/java/com/android/server/am/ActivityRecord.java @@ -2728,11 +2728,6 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo } else { service.mHandler.removeMessages(PAUSE_TIMEOUT_MSG, this); setState(PAUSED, "relaunchActivityLocked"); - // if the app is relaunched when it's stopped, and we're not resuming, - // put it back into stopped state. - if (stopped) { - getStack().addToStopping(this, true /* scheduleIdle */, false /* idleDelayed */); - } } configChangeFlags = 0;