Merge "ViewRootImpl: Ensure layout when configuration changes." into qt-dev am: 6397ab05f9
am: 641d4f27e3
Change-Id: Ic3bfad9182f677251742ade7c430b8f1205a9e65
This commit is contained in:
@@ -4620,6 +4620,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,
|
||||
@@ -4627,6 +4628,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);
|
||||
@@ -4657,7 +4659,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