diff options
| author | 2020-09-24 09:06:46 +0000 | |
|---|---|---|
| committer | 2020-09-24 09:06:46 +0000 | |
| commit | 018a02f8980d02b7998feab892e3627addce977d (patch) | |
| tree | 3ea38569f166eb66133453386a1b79608863f4a2 | |
| parent | 8a8efbca8dec9191b4e8c9e691f10be17a0e1d91 (diff) | |
| parent | 6215bfdaba4459b831bd0d930b181efefb835463 (diff) | |
Merge "Restore the behavior of adding a RESUMED activity to stopping list"
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityRecord.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index 740b592fda4c..67924307f009 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -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: |