diff options
| author | 2020-10-21 09:20:16 +0000 | |
|---|---|---|
| committer | 2020-10-21 09:20:16 +0000 | |
| commit | e71f6765b6d9625f5be957c6b63940fb90d37b29 (patch) | |
| tree | ccc0e8e77b503b2006255dda0904a7f41decc788 | |
| parent | 224c843af039935077802fe72d845641d10c6979 (diff) | |
| parent | fc2507c74e8613f9c7a5db994bc7c7a76f4ae38a (diff) | |
Merge "Revert "Pausing the resumed activity when making it invisible""
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityRecord.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index aea944cd52d3..4e07d8e1f5a8 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -4761,15 +4761,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 (task.mInResumeTopActivity - && task.topRunningActivity(true /* focusableOnly */) == this) { + // 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: |