Make sure the relayoutWindow is called when Activity restarted
The host visibility was always invisible while making an Activity window active because the host visibility was updated afterward (in ActivityThread#handleStartActivity). Therefore, #relayoutWindow could be skipped and not recreating Surface if the view visibility is not changed since last traversal. Bug: 226324982 Test: repro steps on the bug Change-Id: Id677a375bc2f75b055a9d35c8b8488e97c24eae9
This commit is contained in:
@@ -2019,13 +2019,10 @@ public final class ViewRootImpl implements ViewParent,
|
||||
renderer.setStopped(mStopped);
|
||||
}
|
||||
if (!mStopped) {
|
||||
// Unnecessary to traverse if the window is not yet visible.
|
||||
if (getHostVisibility() == View.VISIBLE) {
|
||||
// Make sure that relayoutWindow will be called to get valid surface because
|
||||
// the previous surface may have been released.
|
||||
mAppVisibilityChanged = true;
|
||||
scheduleTraversals();
|
||||
}
|
||||
// Make sure that relayoutWindow will be called to get valid surface because
|
||||
// the previous surface may have been released.
|
||||
mAppVisibilityChanged = true;
|
||||
scheduleTraversals();
|
||||
} else {
|
||||
if (renderer != null) {
|
||||
renderer.destroyHardwareResources(mView);
|
||||
|
||||
Reference in New Issue
Block a user