@@ -262,7 +262,6 @@ public final class ViewRootImpl implements ViewParent,
262262
263263 final Rect mPendingVisibleInsets = new Rect ();
264264 final Rect mPendingContentInsets = new Rect ();
265- final Rect mPendingSystemInsets = new Rect ();
266265 final ViewTreeObserver .InternalInsetsInfo mLastGivenInsets
267266 = new ViewTreeObserver .InternalInsetsInfo ();
268267
@@ -272,7 +271,6 @@ public final class ViewRootImpl implements ViewParent,
272271 final Configuration mPendingConfiguration = new Configuration ();
273272
274273 class ResizedInfo {
275- Rect systemInsets ;
276274 Rect contentInsets ;
277275 Rect visibleInsets ;
278276 Configuration newConfig ;
@@ -568,7 +566,6 @@ public void setView(View view, WindowManager.LayoutParams attrs, View panelParen
568566 if (mTranslator != null ) {
569567 mTranslator .translateRectInScreenToAppWindow (mAttachInfo .mContentInsets );
570568 }
571- mPendingSystemInsets .set (0 , 0 , 0 , 0 );
572569 mPendingContentInsets .set (mAttachInfo .mContentInsets );
573570 mPendingVisibleInsets .set (0 , 0 , 0 , 0 );
574571 if (DEBUG_LAYOUT ) Log .v (TAG , "Added window " + mWindow );
@@ -1235,7 +1232,6 @@ private void performTraversals() {
12351232 getRunQueue ().executeActions (attachInfo .mHandler );
12361233
12371234 boolean insetsChanged = false ;
1238- boolean activeRectChanged = false ;
12391235
12401236 boolean layoutRequested = mLayoutRequested && !mStopped ;
12411237 if (layoutRequested ) {
@@ -1247,12 +1243,7 @@ private void performTraversals() {
12471243 // to opposite of the added touch mode.
12481244 mAttachInfo .mInTouchMode = !mAddedTouchMode ;
12491245 ensureTouchModeLocally (mAddedTouchMode );
1250- activeRectChanged = true ;
12511246 } else {
1252- if (!mPendingSystemInsets .equals (mAttachInfo .mSystemInsets )) {
1253- mAttachInfo .mSystemInsets .set (mPendingSystemInsets );
1254- activeRectChanged = true ;
1255- }
12561247 if (!mPendingContentInsets .equals (mAttachInfo .mContentInsets )) {
12571248 insetsChanged = true ;
12581249 }
@@ -1406,10 +1397,6 @@ private void performTraversals() {
14061397 mPendingConfiguration .seq = 0 ;
14071398 }
14081399
1409- if (!mPendingSystemInsets .equals (mAttachInfo .mSystemInsets )) {
1410- activeRectChanged = true ;
1411- mAttachInfo .mSystemInsets .set (mPendingSystemInsets );
1412- }
14131400 contentInsetsChanged = !mPendingContentInsets .equals (
14141401 mAttachInfo .mContentInsets );
14151402 visibleInsetsChanged = !mPendingVisibleInsets .equals (
@@ -1512,7 +1499,6 @@ private void performTraversals() {
15121499 // before actually drawing them, so it can display then
15131500 // all at once.
15141501 newSurface = true ;
1515- activeRectChanged = true ;
15161502 mFullRedrawNeeded = true ;
15171503 mPreviousTransparentRegion .setEmpty ();
15181504
@@ -1578,7 +1564,6 @@ private void performTraversals() {
15781564 // window size we asked for. We should avoid this by getting a maximum size from
15791565 // the window session beforehand.
15801566 if (mWidth != frame .width () || mHeight != frame .height ()) {
1581- activeRectChanged = true ;
15821567 mWidth = frame .width ();
15831568 mHeight = frame .height ();
15841569 }
@@ -2814,7 +2799,6 @@ public void handleMessage(Message msg) {
28142799 ResizedInfo ri = (ResizedInfo )msg .obj ;
28152800
28162801 if (mWinFrame .width () == msg .arg1 && mWinFrame .height () == msg .arg2
2817- && mPendingSystemInsets .equals (ri .systemInsets )
28182802 && mPendingContentInsets .equals (ri .contentInsets )
28192803 && mPendingVisibleInsets .equals (ri .visibleInsets )
28202804 && ((ResizedInfo )msg .obj ).newConfig == null ) {
@@ -2831,7 +2815,6 @@ public void handleMessage(Message msg) {
28312815 mWinFrame .right = msg .arg1 ;
28322816 mWinFrame .top = 0 ;
28332817 mWinFrame .bottom = msg .arg2 ;
2834- mPendingSystemInsets .set (((ResizedInfo )msg .obj ).systemInsets );
28352818 mPendingContentInsets .set (((ResizedInfo )msg .obj ).contentInsets );
28362819 mPendingVisibleInsets .set (((ResizedInfo )msg .obj ).visibleInsets );
28372820 if (msg .what == MSG_RESIZED_REPORT ) {
@@ -3866,7 +3849,7 @@ private int relayoutWindow(WindowManager.LayoutParams params, int viewVisibility
38663849 (int ) (mView .getMeasuredWidth () * appScale + 0.5f ),
38673850 (int ) (mView .getMeasuredHeight () * appScale + 0.5f ),
38683851 viewVisibility , insetsPending ? WindowManagerImpl .RELAYOUT_INSETS_PENDING : 0 ,
3869- mWinFrame , mPendingSystemInsets , mPendingContentInsets , mPendingVisibleInsets ,
3852+ mWinFrame , mPendingContentInsets , mPendingVisibleInsets ,
38703853 mPendingConfiguration , mSurface );
38713854 //Log.d(TAG, "<<<<<< BACK FROM relayout");
38723855 if (restore ) {
@@ -4062,11 +4045,10 @@ public void dispatchFinishInputConnection(InputConnection connection) {
40624045 mHandler .sendMessage (msg );
40634046 }
40644047
4065- public void dispatchResized (int w , int h , Rect systemInsets , Rect contentInsets ,
4048+ public void dispatchResized (int w , int h , Rect contentInsets ,
40664049 Rect visibleInsets , boolean reportDraw , Configuration newConfig ) {
40674050 if (DEBUG_LAYOUT ) Log .v (TAG , "Resizing " + this + ": w=" + w
4068- + " h=" + h + " systemInsets=" + systemInsets .toShortString ()
4069- + " contentInsets=" + contentInsets .toShortString ()
4051+ + " h=" + h + " contentInsets=" + contentInsets .toShortString ()
40704052 + " visibleInsets=" + visibleInsets .toShortString ()
40714053 + " reportDraw=" + reportDraw );
40724054 Message msg = mHandler .obtainMessage (reportDraw ? MSG_RESIZED_REPORT :MSG_RESIZED );
@@ -4079,7 +4061,6 @@ public void dispatchResized(int w, int h, Rect systemInsets, Rect contentInsets,
40794061 msg .arg1 = w ;
40804062 msg .arg2 = h ;
40814063 ResizedInfo ri = new ResizedInfo ();
4082- ri .systemInsets = new Rect (systemInsets );
40834064 ri .contentInsets = new Rect (contentInsets );
40844065 ri .visibleInsets = new Rect (visibleInsets );
40854066 ri .newConfig = newConfig ;
@@ -4735,11 +4716,11 @@ static class W extends IWindow.Stub {
47354716 mViewAncestor = new WeakReference <ViewRootImpl >(viewAncestor );
47364717 }
47374718
4738- public void resized (int w , int h , Rect systemInsets , Rect contentInsets ,
4719+ public void resized (int w , int h , Rect contentInsets ,
47394720 Rect visibleInsets , boolean reportDraw , Configuration newConfig ) {
47404721 final ViewRootImpl viewAncestor = mViewAncestor .get ();
47414722 if (viewAncestor != null ) {
4742- viewAncestor .dispatchResized (w , h , systemInsets , contentInsets ,
4723+ viewAncestor .dispatchResized (w , h , contentInsets ,
47434724 visibleInsets , reportDraw , newConfig );
47444725 }
47454726 }
0 commit comments