Merge "ViewRootImpl: Ensure layout when configuration changes." into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6397ab05f9
@@ -4453,6 +4453,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
final int displayId = args.argi3;
|
||||
MergedConfiguration mergedConfiguration = (MergedConfiguration) args.arg4;
|
||||
final boolean displayChanged = mDisplay.getDisplayId() != displayId;
|
||||
boolean configChanged = false;
|
||||
|
||||
if (!mLastReportedMergedConfiguration.equals(mergedConfiguration)) {
|
||||
// If configuration changed - notify about that and, maybe,
|
||||
@@ -4460,6 +4461,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
performConfigurationChange(mergedConfiguration, false /* force */,
|
||||
displayChanged
|
||||
? displayId : INVALID_DISPLAY /* same display */);
|
||||
configChanged = true;
|
||||
} else if (displayChanged) {
|
||||
// Moved to display without config change - report last applied one.
|
||||
onMovedToDisplay(displayId, mLastConfigurationFromResources);
|
||||
@@ -4490,7 +4492,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
reportNextDraw();
|
||||
}
|
||||
|
||||
if (mView != null && framesChanged) {
|
||||
if (mView != null && (framesChanged || configChanged)) {
|
||||
forceLayout(mView);
|
||||
}
|
||||
requestLayout();
|
||||
|
||||
Reference in New Issue
Block a user