Resume stopped preserved window when relaunching visible activity
The ViewRoot will be stopped with activity onStop. And unstop when resuming activity, but it is only called when resuming an existing activity (from performRestart). So if a ViewRoot is preserved during relaunching while the activity was stopped, the ViewRoot is also stopped. And because the activity is a new instance, performRestart won't be called, then the RootView keeps the stopped state. The case happens more frequently since wm shell is introduced, which by default use "preserveWindow=true" for ActivityRecord#ensureActivityConfiguration via WindowOrganizer#applyTransaction. Bug: 269179932 Test: WMShellFlickerTests:CopyContentInSplit Test: Simple simulation: Modify code to force "preserveWindow" to always be enabled. Launch an activity without handling config change in landscape. Return to home and launch the activity again in portrait. The activity should be able to response for input event. Change-Id: Iee780c12535217a5a9726f9f4d6b21952ce56d70
Loading
Please register or sign in to comment