Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6215bfda authored by Louis Chang's avatar Louis Chang
Browse files

Restore the behavior of adding a RESUMED activity to stopping list

Revert part of 9b8ece20 because of b/169190153.

Also this makes the activity starting pausing while resuming it
if the activity is started while screen off, see
Task#resumeTopActivityInnerLocked where the RWC#ensureVisibilityAndConfig
was called after activity state set to RESUMED.

Bug: 169190153
Bug: 160435184
Test: existing tests
Change-Id: I4afdac6a60f6ad9b1c652eefcce44367109a2a37
parent a2268f99
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -4770,14 +4770,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    supportsEnterPipOnTaskSwitch = false;
                    break;
                case RESUMED:
                    // Do nothing if currently in the process of resuming the activity. Otherwise,
                    // starting to pause it since it is not visible.
                    if (!mSetToSleep) {
                    // If the app is capable of entering PIP, we should try pausing it now
                    // so it can PIP correctly.
                    if (deferHidingClient) {
                        getRootTask().startPausingLocked(
                                mStackSupervisor.mUserLeaving /* userLeaving */,
                                false /* uiSleeping */, null /* resuming */, "makeInvisible");
                        break;
                    }
                    getRootTask().startPausingLocked(mStackSupervisor.mUserLeaving,
                            false /* uiSleeping */, null /* resuming */, "makeInvisible");
                    // fall through
                case INITIALIZING:
                case PAUSING:
                case PAUSED: