@@ -100,6 +100,8 @@ final class WindowState implements WindowManagerPolicy.WindowState,
100100 */
101101 int mRequestedWidth ;
102102 int mRequestedHeight ;
103+ int mLastRequestedWidth ;
104+ int mLastRequestedHeight ;
103105
104106 int mLayer ;
105107 int mAnimLayer ;
@@ -391,6 +393,8 @@ final class WindowState implements WindowManagerPolicy.WindowState,
391393 mSurface = null ;
392394 mRequestedWidth = 0 ;
393395 mRequestedHeight = 0 ;
396+ mLastRequestedWidth = 0 ;
397+ mLastRequestedHeight = 0 ;
394398 mXOffset = 0 ;
395399 mYOffset = 0 ;
396400 mLayer = 0 ;
@@ -458,6 +462,11 @@ public void computeFrameLw(Rect pf, Rect df, Rect cf, Rect vf) {
458462 mParentFrame .set (pf );
459463 mContentChanged = true ;
460464 }
465+ if (mRequestedWidth != mLastRequestedWidth || mRequestedHeight != mLastRequestedHeight ) {
466+ mLastRequestedWidth = mRequestedWidth ;
467+ mLastRequestedHeight = mRequestedHeight ;
468+ mContentChanged = true ;
469+ }
461470
462471 final Rect content = mContentFrame ;
463472 content .set (cf );
@@ -1701,6 +1710,10 @@ void dump(PrintWriter pw, String prefix, boolean dumpAll) {
17011710 pw .print (prefix ); pw .print ("Requested w=" ); pw .print (mRequestedWidth );
17021711 pw .print (" h=" ); pw .print (mRequestedHeight );
17031712 pw .print (" mLayoutSeq=" ); pw .println (mLayoutSeq );
1713+ if (mRequestedWidth != mLastRequestedWidth || mRequestedHeight != mLastRequestedHeight ) {
1714+ pw .print (prefix ); pw .print ("LastRequested w=" ); pw .print (mLastRequestedWidth );
1715+ pw .print (" h=" ); pw .println (mLastRequestedHeight );
1716+ }
17041717 if (mAttachedWindow != null || mLayoutAttached ) {
17051718 pw .print (prefix ); pw .print ("mAttachedWindow=" ); pw .print (mAttachedWindow );
17061719 pw .print (" mLayoutAttached=" ); pw .println (mLayoutAttached );
0 commit comments