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

Commit fcaded71 authored by Louis Chang's avatar Louis Chang
Browse files

Ensure the top-resume-loss is called

The top-resume-loss could be called when top-resumed activity paused
or the top-resume-loss timed out. It is possible that the
top-resume-timeout happens earlier that the activity paused, the
state report will be skipped in that case (activity is still pausing).
If the activity also failed-to-pause, the system be forever waiting
for the top-resume-loss event.

Ensure the top-resume-loss is called if it from time-out.

Bug: 443993038
Test: PinnedStackTests
Flag: EXEMPT BUGFIX
Change-Id: Ice762e0ad2018867ad1d49c2e499885b3a533b38
parent c9a9dc62
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2541,7 +2541,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
                return;
            }

            if (r.isState(PAUSING)) {
            if (!timeout && r.isState(PAUSING)) {
                // Do not handle the top-resumed-state-lost if the activity is currently pausing to
                // prevent rapid top-resumed activity switch.
                return;