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
Loading
Please register or sign in to comment