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

Skip to content
Commit 4dabf239 authored by Winson Chung's avatar Winson Chung
Browse files

Preventing cases where an app can be stopped while entering PiP.



- Ensure that we clear the timeouts on the old stack and reschedule
  them on the new stack when moving an activity to a new stack,
  otherwise the pause timeout from the old stack will cause onStop()
  to be called.
- When adding an activity to the stopping list for processing, prevent
  scheduling an idle immediately in case an activity tries to enter
  picture-in-picture when handling onUserLeaveHint().  In that case,
  schedule an idle after the default idle delay instead.
- In addition, when resuming a resumeWhilePausing activity, prevent the
  activity idle to trigger pausing activities to be immediately put into
  a stopped state.  This was a race between the handling of pause/resume
  that would cause a pip activity to get onStop() even if it called enter
  pip on pause. Instead, when processing an idle from the activity or
  from an immediate idle scheduled by the system, we defer processing
  pausing activities until a later idle (that it reschedules).

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testEnterPipWithResumeWhilePausingActivityNoStop

Change-Id: I375369a800b7fadaa57d6e00e0564bc3ee338979
Signed-off-by: default avatarWinson Chung <winsonc@google.com>
parent 4a0ae490
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment