Merge changes Ibc2f40dd,I37fb8ffc into tm-qpr-dev am: dea70726f6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19963144

Change-Id: I56d9cf4a11f38a8a574b7d5ab6c82ff770b7bdf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Tiger Huang
2022-09-16 14:50:00 +00:00
committed by Automerger Merge Worker

View File

@@ -3066,7 +3066,8 @@ public final class ViewRootImpl implements ViewParent,
// WindowManagerService has reported back a frame from a configuration not yet
// handled by the client. In this case, we need to accept the configuration so we
// do not lay out and draw with the wrong configuration.
if (!mPendingMergedConfiguration.equals(mLastReportedMergedConfiguration)) {
if (mRelayoutRequested
&& !mPendingMergedConfiguration.equals(mLastReportedMergedConfiguration)) {
if (DEBUG_CONFIGURATION) Log.v(mTag, "Visible with new config: "
+ mPendingMergedConfiguration.getMergedConfiguration());
performConfigurationChange(new MergedConfiguration(mPendingMergedConfiguration),
@@ -8087,7 +8088,8 @@ public final class ViewRootImpl implements ViewParent,
final int measuredWidth = mView.getMeasuredWidth();
final int measuredHeight = mView.getMeasuredHeight();
final boolean relayoutAsync;
if (LOCAL_LAYOUT && !mFirst && viewVisibility == mViewVisibility
if (LOCAL_LAYOUT
&& (mViewFrameInfo.flags & FrameInfo.FLAG_WINDOW_VISIBILITY_CHANGED) == 0
&& mWindowAttributes.type != TYPE_APPLICATION_STARTING
&& mSyncSeqId <= mLastSyncSeqId
&& winConfigFromAm.diff(winConfigFromWm, false /* compareUndefined */) == 0) {