7474import android .graphics .RectF ;
7575import android .graphics .Region ;
7676import android .hardware .display .DisplayManager ;
77- import android .hardware .input .InputManager ;
7877import android .os .Binder ;
7978import android .os .Bundle ;
8079import android .os .Debug ;
@@ -2749,7 +2748,8 @@ public int relayoutWindow(Session session, IWindow client, int seq,
27492748 }
27502749 }
27512750
2752- if (DEBUG_LAYOUT ) Slog .v (TAG , "Relayout " + win + ": " + win .mAttrs );
2751+ if (DEBUG_LAYOUT ) Slog .v (TAG , "Relayout " + win + ": viewVisibility=" + viewVisibility
2752+ + " " + requestedWidth + "x" + requestedHeight + " " + win .mAttrs );
27532753
27542754 win .mEnforceSizeCompat = (win .mAttrs .flags & FLAG_COMPATIBLE_WINDOW ) != 0 ;
27552755
@@ -4036,7 +4036,8 @@ public void setFocusedApp(IBinder token, boolean moveFocusNow) {
40364036 }
40374037 changed = mFocusedApp != newFocus ;
40384038 mFocusedApp = newFocus ;
4039- if (DEBUG_FOCUS ) Slog .v (TAG , "Set focused app to: " + mFocusedApp );
4039+ if (DEBUG_FOCUS ) Slog .v (TAG , "Set focused app to: " + mFocusedApp
4040+ + " moveFocusNow=" + moveFocusNow );
40404041 if (changed ) {
40414042 mInputMonitor .setFocusedAppLw (newFocus );
40424043 }
@@ -8296,7 +8297,8 @@ private final void performLayoutLockedInner(final DisplayContent displayContent,
82968297 if (DEBUG_LAYOUT && !win .mLayoutAttached ) {
82978298 Slog .v (TAG , "1ST PASS " + win
82988299 + ": gone=" + gone + " mHaveFrame=" + win .mHaveFrame
8299- + " mLayoutAttached=" + win .mLayoutAttached );
8300+ + " mLayoutAttached=" + win .mLayoutAttached
8301+ + " screen changed=" + win .isConfigDiff (ActivityInfo .CONFIG_SCREEN_SIZE ));
83008302 final AppWindowToken atoken = win .mAppToken ;
83018303 if (gone ) Slog .v (TAG , " GONE: mViewVisibility="
83028304 + win .mViewVisibility + " mRelayoutCalled="
@@ -8318,6 +8320,7 @@ private final void performLayoutLockedInner(final DisplayContent displayContent,
83188320 // windows, since that means "perform layout as normal,
83198321 // just don't display").
83208322 if (!gone || !win .mHaveFrame || win .mLayoutNeeded
8323+ || win .isConfigDiff (ActivityInfo .CONFIG_SCREEN_SIZE )
83218324 || win .mAttrs .type == TYPE_UNIVERSE_BACKGROUND ) {
83228325 if (!win .mLayoutAttached ) {
83238326 if (initial ) {
@@ -8753,10 +8756,7 @@ private void updateResizingWindows(final WindowState w) {
87538756 !w .mLastContentInsets .equals (w .mContentInsets );
87548757 w .mVisibleInsetsChanged |=
87558758 !w .mLastVisibleInsets .equals (w .mVisibleInsets );
8756- boolean configChanged =
8757- w .mConfiguration != mCurConfiguration
8758- && (w .mConfiguration == null
8759- || mCurConfiguration .diff (w .mConfiguration ) != 0 );
8759+ boolean configChanged = w .isConfigChanged ();
87608760 if (DEBUG_CONFIGURATION && configChanged ) {
87618761 Slog .v (TAG , "Win " + w + " config changed: "
87628762 + mCurConfiguration );
@@ -9254,10 +9254,7 @@ private final void performLayoutAndPlaceSurfacesLockedInner(boolean recoveringMe
92549254 if (DEBUG_RESIZE || DEBUG_ORIENTATION ) Slog .v (TAG ,
92559255 "Reporting new frame to " + win + ": " + win .mCompatFrame );
92569256 int diff = 0 ;
9257- boolean configChanged =
9258- win .mConfiguration != mCurConfiguration
9259- && (win .mConfiguration == null
9260- || (diff =mCurConfiguration .diff (win .mConfiguration )) != 0 );
9257+ boolean configChanged = win .isConfigChanged ();
92619258 if ((DEBUG_RESIZE || DEBUG_ORIENTATION || DEBUG_CONFIGURATION )
92629259 && configChanged ) {
92639260 Slog .i (TAG , "Sending new config to window " + win + ": "
0 commit comments