WindowState: Update mLastSurfaceInsets at creation time.

Otherwise the first call to updateSurfacePosition may think the surface
insets are changing and defer a transaction, but the client may
not necessarily render another frame as the insets were not actually
changing.

Bug: 74084094
Test: Manual. go/wm-smoke.
Change-Id: I917dff05c4ac0b578d3ccc48c95a10cad8d6d0f9
This commit is contained in:
Robert Carr
2018-03-12 15:49:08 -07:00
parent 228f8f877a
commit b08ed04b8d

View File

@@ -693,6 +693,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mOwnerCanAddInternalSystemWindow = ownerCanAddInternalSystemWindow;
mWindowId = new WindowId(this);
mAttrs.copyFrom(a);
mLastSurfaceInsets.set(mAttrs.surfaceInsets);
mViewVisibility = viewVisibility;
mPolicy = mService.mPolicy;
mContext = mService.mContext;