Do not call forceLayout if not needed
am: 26952d7 * commit '26952d748eaab23330c660fa0d7f5c0450dc1d06': Do not call forceLayout if not needed Change-Id: I87adfe600252a6bc0c0880b4fff534cf67c027f7
This commit is contained in:
@@ -3415,6 +3415,13 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
updateConfiguration(config, false);
|
updateConfiguration(config, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final boolean framesChanged = !mWinFrame.equals(args.arg1)
|
||||||
|
|| !mPendingOverscanInsets.equals(args.arg5)
|
||||||
|
|| !mPendingContentInsets.equals(args.arg2)
|
||||||
|
|| !mPendingStableInsets.equals(args.arg6)
|
||||||
|
|| !mPendingVisibleInsets.equals(args.arg3)
|
||||||
|
|| !mPendingOutsets.equals(args.arg7);
|
||||||
|
|
||||||
mWinFrame.set((Rect) args.arg1);
|
mWinFrame.set((Rect) args.arg1);
|
||||||
mPendingOverscanInsets.set((Rect) args.arg5);
|
mPendingOverscanInsets.set((Rect) args.arg5);
|
||||||
mPendingContentInsets.set((Rect) args.arg2);
|
mPendingContentInsets.set((Rect) args.arg2);
|
||||||
@@ -3431,7 +3438,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
mReportNextDraw = true;
|
mReportNextDraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mView != null) {
|
if (mView != null && framesChanged) {
|
||||||
forceLayout(mView);
|
forceLayout(mView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user