@@ -169,6 +169,7 @@ public class WindowManagerService extends IWindowManager.Stub
169169 static final boolean DEBUG_SCREENSHOT = false ;
170170 static final boolean SHOW_SURFACE_ALLOC = false ;
171171 static final boolean SHOW_TRANSACTIONS = false ;
172+ static final boolean SHOW_LIGHT_TRANSACTIONS = false || SHOW_TRANSACTIONS ;
172173 static final boolean HIDE_STACK_CRAWLS = true ;
173174
174175 static final boolean PROFILE_ORIENTATION = false ;
@@ -2369,7 +2370,7 @@ void setTransparentRegionWindow(Session session, IWindow client, Region region)
23692370 synchronized (mWindowMap ) {
23702371 WindowState w = windowForClientLocked (session , client , false );
23712372 if ((w != null ) && (w .mSurface != null )) {
2372- if (SHOW_TRANSACTIONS ) Slog .i (TAG ,
2373+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
23732374 ">>> OPEN TRANSACTION setTransparentRegion" );
23742375 Surface .openTransaction ();
23752376 try {
@@ -2378,7 +2379,7 @@ void setTransparentRegionWindow(Session session, IWindow client, Region region)
23782379 w .mSurface .setTransparentRegionHint (region );
23792380 } finally {
23802381 Surface .closeTransaction ();
2381- if (SHOW_TRANSACTIONS ) Slog .i (TAG ,
2382+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
23822383 "<<< CLOSE TRANSACTION setTransparentRegion" );
23832384 }
23842385 }
@@ -4905,7 +4906,8 @@ public void showStrictModeViolation(boolean on) {
49054906 }
49064907 }
49074908
4908- if (SHOW_TRANSACTIONS ) Slog .i (TAG , ">>> OPEN TRANSACTION showStrictModeViolation" );
4909+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
4910+ ">>> OPEN TRANSACTION showStrictModeViolation" );
49094911 Surface .openTransaction ();
49104912 try {
49114913 if (mStrictModeFlash == null ) {
@@ -4914,7 +4916,8 @@ public void showStrictModeViolation(boolean on) {
49144916 mStrictModeFlash .setVisibility (on );
49154917 } finally {
49164918 Surface .closeTransaction ();
4917- if (SHOW_TRANSACTIONS ) Slog .i (TAG , "<<< CLOSE TRANSACTION showStrictModeViolation" );
4919+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
4920+ "<<< CLOSE TRANSACTION showStrictModeViolation" );
49184921 }
49194922 }
49204923 }
@@ -5231,7 +5234,7 @@ public boolean updateRotationUncheckedLocked(boolean inTransaction) {
52315234 mInputManager .setDisplayOrientation (0 , rotation );
52325235
52335236 if (!inTransaction ) {
5234- if (SHOW_TRANSACTIONS ) Slog .i (TAG ,
5237+ if (SHOW_TRANSACTIONS ) Slog .i (TAG ,
52355238 ">>> OPEN TRANSACTION setRotationUnchecked" );
52365239 Surface .openTransaction ();
52375240 }
@@ -5246,7 +5249,7 @@ public boolean updateRotationUncheckedLocked(boolean inTransaction) {
52465249 } finally {
52475250 if (!inTransaction ) {
52485251 Surface .closeTransaction ();
5249- if (SHOW_TRANSACTIONS ) Slog .i (TAG ,
5252+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
52505253 "<<< CLOSE TRANSACTION setRotationUnchecked" );
52515254 }
52525255 }
@@ -5843,6 +5846,10 @@ boolean computeNewConfigurationLocked(Configuration config) {
58435846 final DisplayMetrics dm = mDisplayMetrics ;
58445847 mAppDisplayWidth = mPolicy .getNonDecorDisplayWidth (dw , dh , mRotation );
58455848 mAppDisplayHeight = mPolicy .getNonDecorDisplayHeight (dw , dh , mRotation );
5849+ if (false ) {
5850+ Slog .i (TAG , "Set app display size: " + mAppDisplayWidth
5851+ + " x " + mAppDisplayHeight );
5852+ }
58465853 mDisplay .getMetricsWithSize (dm , mAppDisplayWidth , mAppDisplayHeight );
58475854
58485855 mCompatibleScreenScale = CompatibilityInfo .computeCompatibleScaling (dm ,
@@ -5860,8 +5867,8 @@ boolean computeNewConfigurationLocked(Configuration config) {
58605867
58615868 // Compute the screen layout size class.
58625869 int screenLayout ;
5863- int longSize = dw ;
5864- int shortSize = dh ;
5870+ int longSize = mAppDisplayWidth ;
5871+ int shortSize = mAppDisplayHeight ;
58655872 if (longSize < shortSize ) {
58665873 int tmp = longSize ;
58675874 longSize = shortSize ;
@@ -6847,7 +6854,7 @@ public void setForcedDisplaySize(int longDimen, int shortDimen) {
68476854
68486855 private void rebuildBlackFrame (boolean inTransaction ) {
68496856 if (!inTransaction ) {
6850- if (SHOW_TRANSACTIONS ) Slog .i (TAG ,
6857+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
68516858 ">>> OPEN TRANSACTION rebuildBlackFrame" );
68526859 Surface .openTransaction ();
68536860 }
@@ -6882,7 +6889,7 @@ private void rebuildBlackFrame(boolean inTransaction) {
68826889 } finally {
68836890 if (!inTransaction ) {
68846891 Surface .closeTransaction ();
6885- if (SHOW_TRANSACTIONS ) Slog .i (TAG ,
6892+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
68866893 "<<< CLOSE TRANSACTION rebuildBlackFrame" );
68876894 }
68886895 }
@@ -7354,7 +7361,8 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
73547361 createWatermark = true ;
73557362 }
73567363
7357- if (SHOW_TRANSACTIONS ) Slog .i (TAG , ">>> OPEN TRANSACTION performLayoutAndPlaceSurfaces" );
7364+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
7365+ ">>> OPEN TRANSACTION performLayoutAndPlaceSurfaces" );
73587366
73597367 Surface .openTransaction ();
73607368
@@ -8463,7 +8471,8 @@ private final void performLayoutAndPlaceSurfacesLockedInner(
84638471
84648472 Surface .closeTransaction ();
84658473
8466- if (SHOW_TRANSACTIONS ) Slog .i (TAG , "<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces" );
8474+ if (SHOW_LIGHT_TRANSACTIONS ) Slog .i (TAG ,
8475+ "<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces" );
84678476
84688477 if (mWatermark != null ) {
84698478 mWatermark .drawIfNeeded ();
0 commit comments