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