Skip to content
Commit edc42940 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Handle stopping and finishing activities on drawn

If the non idle activity is started in a new task, there may have
a starting window. So the transition animation can be done with
the starting window but the main window of the activity may not
finish drawing if it is slow during startup. That causes the
allResumedActivitiesVisible to return false and the stopping
activities are still pending.

By scheduling to process stopping and finishing when the activity
windows are actually drawn (though its name is onWindowsVisible,
it is only called if the windows are drawn, see numVisible), the
pending stopping activities no longer need to wait until idle timeout
to be stopped or destroyed.

Also avoid sending duplicated idle message.

Bug: 169740664
Test: atest ActivityVisibilityTests# \
      testActivityStoppedWhileNextActivityNotIdle
Change-Id: I7317bf577a1b98601b6ec027a5d7bf66090aecde
parent 5683fda3
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