Make sure updateSurface is called for rotation change
The condition to call updateSurface requires relayout request.
And keep the previous requested force-next-relayout to avoid
the value set from performConfigurationChange being replaced,
or before performing traversal, there is another resize event
that erases the pending relayout request.
Bug: 231282871
Test: Set allow home rotation.
No flickering when rotating 180 degree.
Change-Id: I0fd6701ebe0c17e0e319b1360d48132e0c256358
This commit is contained in:
@@ -1772,7 +1772,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
}
|
||||
}
|
||||
|
||||
mForceNextWindowRelayout = forceNextWindowRelayout;
|
||||
mForceNextWindowRelayout |= forceNextWindowRelayout;
|
||||
mPendingAlwaysConsumeSystemBars = args.argi2 != 0;
|
||||
mSyncSeqId = args.argi4 > mSyncSeqId ? args.argi4 : mSyncSeqId;
|
||||
|
||||
@@ -5233,6 +5233,9 @@ public final class ViewRootImpl implements ViewParent,
|
||||
// the buffers may still have content in previous rotation. And the next draw may
|
||||
// not update all regions, that causes some afterimages to flicker.
|
||||
mUpdateSurfaceNeeded = true;
|
||||
if (!mIsInTraversal) {
|
||||
mForceNextWindowRelayout = true;
|
||||
}
|
||||
}
|
||||
|
||||
Configuration globalConfig = mergedConfiguration.getGlobalConfiguration();
|
||||
|
||||
Reference in New Issue
Block a user