Merge "Fix issue #5445966: WindowManager reporting -long on prime when it shouldn't be." into ics-mr0
This commit is contained in:
committed by
Android (Google) Code Review
commit
f4b40de684
@ -117,6 +117,11 @@ public class Display {
|
||||
outSize.x = getRawWidth();
|
||||
outSize.y = getRawHeight();
|
||||
}
|
||||
if (false) {
|
||||
RuntimeException here = new RuntimeException("here");
|
||||
here.fillInStackTrace();
|
||||
Slog.v(TAG, "Returning display size: " + outSize, here);
|
||||
}
|
||||
if (DEBUG_DISPLAY_SIZE && doCompat) Slog.v(
|
||||
TAG, "Returning display size: " + outSize);
|
||||
} catch (RemoteException e) {
|
||||
|
@ -274,7 +274,8 @@ class DragState {
|
||||
final int myPid = Process.myPid();
|
||||
|
||||
// Move the surface to the given touch
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, ">>> OPEN TRANSACTION notifyMoveLw");
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(
|
||||
WindowManagerService.TAG, ">>> OPEN TRANSACTION notifyMoveLw");
|
||||
Surface.openTransaction();
|
||||
try {
|
||||
mSurface.setPosition(x - mThumbOffsetX, y - mThumbOffsetY);
|
||||
@ -283,7 +284,8 @@ class DragState {
|
||||
(int)(x - mThumbOffsetX) + "," + (int)(y - mThumbOffsetY) + ")");
|
||||
} finally {
|
||||
Surface.closeTransaction();
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "<<< CLOSE TRANSACTION notifyMoveLw");
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(
|
||||
WindowManagerService.TAG, "<<< CLOSE TRANSACTION notifyMoveLw");
|
||||
}
|
||||
|
||||
// Tell the affected window
|
||||
|
@ -81,7 +81,7 @@ class ScreenRotationAnimation {
|
||||
mOriginalHeight = originalHeight;
|
||||
|
||||
if (!inTransaction) {
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
">>> OPEN TRANSACTION ScreenRotationAnimation");
|
||||
Surface.openTransaction();
|
||||
}
|
||||
@ -117,7 +117,7 @@ class ScreenRotationAnimation {
|
||||
mSurface = null;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Paint paint = new Paint(0);
|
||||
paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
|
||||
c.drawBitmap(screenshot, 0, 0, paint);
|
||||
@ -127,7 +127,7 @@ class ScreenRotationAnimation {
|
||||
} finally {
|
||||
if (!inTransaction) {
|
||||
Surface.closeTransaction();
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
"<<< CLOSE TRANSACTION ScreenRotationAnimation");
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ class ScreenRotationAnimation {
|
||||
mEnterAnimation.restrictDuration(maxAnimationDuration);
|
||||
mEnterAnimation.scaleCurrentDuration(animationScale);
|
||||
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
">>> OPEN TRANSACTION ScreenRotationAnimation.dismiss");
|
||||
Surface.openTransaction();
|
||||
|
||||
@ -266,7 +266,7 @@ class ScreenRotationAnimation {
|
||||
Slog.w(TAG, "Unable to allocate black surface", e);
|
||||
} finally {
|
||||
Surface.closeTransaction();
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
"<<< CLOSE TRANSACTION ScreenRotationAnimation.dismiss");
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,8 @@ final class Session extends IWindowSession.Stub
|
||||
|
||||
// Make the surface visible at the proper location
|
||||
final Surface surface = mService.mDragState.mSurface;
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, ">>> OPEN TRANSACTION performDrag");
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(
|
||||
WindowManagerService.TAG, ">>> OPEN TRANSACTION performDrag");
|
||||
Surface.openTransaction();
|
||||
try {
|
||||
surface.setPosition(touchX - thumbCenterX,
|
||||
@ -288,7 +289,8 @@ final class Session extends IWindowSession.Stub
|
||||
surface.show();
|
||||
} finally {
|
||||
Surface.closeTransaction();
|
||||
if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "<<< CLOSE TRANSACTION performDrag");
|
||||
if (WindowManagerService.SHOW_LIGHT_TRANSACTIONS) Slog.i(
|
||||
WindowManagerService.TAG, "<<< CLOSE TRANSACTION performDrag");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -169,6 +169,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
static final boolean DEBUG_SCREENSHOT = false;
|
||||
static final boolean SHOW_SURFACE_ALLOC = false;
|
||||
static final boolean SHOW_TRANSACTIONS = false;
|
||||
static final boolean SHOW_LIGHT_TRANSACTIONS = false || SHOW_TRANSACTIONS;
|
||||
static final boolean HIDE_STACK_CRAWLS = true;
|
||||
|
||||
static final boolean PROFILE_ORIENTATION = false;
|
||||
@ -2369,7 +2370,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
synchronized (mWindowMap) {
|
||||
WindowState w = windowForClientLocked(session, client, false);
|
||||
if ((w != null) && (w.mSurface != null)) {
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG,
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
">>> OPEN TRANSACTION setTransparentRegion");
|
||||
Surface.openTransaction();
|
||||
try {
|
||||
@ -2378,7 +2379,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
w.mSurface.setTransparentRegionHint(region);
|
||||
} finally {
|
||||
Surface.closeTransaction();
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG,
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
"<<< CLOSE TRANSACTION setTransparentRegion");
|
||||
}
|
||||
}
|
||||
@ -4905,7 +4906,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION showStrictModeViolation");
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
">>> OPEN TRANSACTION showStrictModeViolation");
|
||||
Surface.openTransaction();
|
||||
try {
|
||||
if (mStrictModeFlash == null) {
|
||||
@ -4914,7 +4916,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
mStrictModeFlash.setVisibility(on);
|
||||
} finally {
|
||||
Surface.closeTransaction();
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION showStrictModeViolation");
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
"<<< CLOSE TRANSACTION showStrictModeViolation");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5231,7 +5234,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
mInputManager.setDisplayOrientation(0, rotation);
|
||||
|
||||
if (!inTransaction) {
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG,
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG,
|
||||
">>> OPEN TRANSACTION setRotationUnchecked");
|
||||
Surface.openTransaction();
|
||||
}
|
||||
@ -5246,7 +5249,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
} finally {
|
||||
if (!inTransaction) {
|
||||
Surface.closeTransaction();
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG,
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
"<<< CLOSE TRANSACTION setRotationUnchecked");
|
||||
}
|
||||
}
|
||||
@ -5843,6 +5846,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
final DisplayMetrics dm = mDisplayMetrics;
|
||||
mAppDisplayWidth = mPolicy.getNonDecorDisplayWidth(dw, dh, mRotation);
|
||||
mAppDisplayHeight = mPolicy.getNonDecorDisplayHeight(dw, dh, mRotation);
|
||||
if (false) {
|
||||
Slog.i(TAG, "Set app display size: " + mAppDisplayWidth
|
||||
+ " x " + mAppDisplayHeight);
|
||||
}
|
||||
mDisplay.getMetricsWithSize(dm, mAppDisplayWidth, mAppDisplayHeight);
|
||||
|
||||
mCompatibleScreenScale = CompatibilityInfo.computeCompatibleScaling(dm,
|
||||
@ -5860,8 +5867,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
|
||||
// Compute the screen layout size class.
|
||||
int screenLayout;
|
||||
int longSize = dw;
|
||||
int shortSize = dh;
|
||||
int longSize = mAppDisplayWidth;
|
||||
int shortSize = mAppDisplayHeight;
|
||||
if (longSize < shortSize) {
|
||||
int tmp = longSize;
|
||||
longSize = shortSize;
|
||||
@ -6847,7 +6854,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
|
||||
private void rebuildBlackFrame(boolean inTransaction) {
|
||||
if (!inTransaction) {
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG,
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
">>> OPEN TRANSACTION rebuildBlackFrame");
|
||||
Surface.openTransaction();
|
||||
}
|
||||
@ -6882,7 +6889,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
} finally {
|
||||
if (!inTransaction) {
|
||||
Surface.closeTransaction();
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG,
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
"<<< CLOSE TRANSACTION rebuildBlackFrame");
|
||||
}
|
||||
}
|
||||
@ -7354,7 +7361,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
createWatermark = true;
|
||||
}
|
||||
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG, ">>> OPEN TRANSACTION performLayoutAndPlaceSurfaces");
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
">>> OPEN TRANSACTION performLayoutAndPlaceSurfaces");
|
||||
|
||||
Surface.openTransaction();
|
||||
|
||||
@ -8463,7 +8471,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
|
||||
Surface.closeTransaction();
|
||||
|
||||
if (SHOW_TRANSACTIONS) Slog.i(TAG, "<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces");
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
|
||||
"<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces");
|
||||
|
||||
if (mWatermark != null) {
|
||||
mWatermark.drawIfNeeded();
|
||||
|
@ -57,6 +57,7 @@ import java.util.ArrayList;
|
||||
final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
static final boolean DEBUG_VISIBILITY = WindowManagerService.DEBUG_VISIBILITY;
|
||||
static final boolean SHOW_TRANSACTIONS = WindowManagerService.SHOW_TRANSACTIONS;
|
||||
static final boolean SHOW_LIGHT_TRANSACTIONS = WindowManagerService.SHOW_LIGHT_TRANSACTIONS;
|
||||
static final boolean SHOW_SURFACE_ALLOC = WindowManagerService.SHOW_SURFACE_ALLOC;
|
||||
|
||||
final WindowManagerService mService;
|
||||
@ -671,7 +672,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
WindowManagerService.TAG, "Got surface: " + mSurface
|
||||
+ ", set left=" + mFrame.left + " top=" + mFrame.top
|
||||
+ ", animLayer=" + mAnimLayer);
|
||||
if (SHOW_TRANSACTIONS) {
|
||||
if (SHOW_LIGHT_TRANSACTIONS) {
|
||||
Slog.i(WindowManagerService.TAG, ">>> OPEN TRANSACTION createSurfaceLocked");
|
||||
WindowManagerService.logSurface(this, "CREATE pos=(" + mFrame.left
|
||||
+ "," + mFrame.top + ") (" +
|
||||
@ -700,7 +701,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
mLastHidden = true;
|
||||
} finally {
|
||||
Surface.closeTransaction();
|
||||
if (SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "<<< CLOSE TRANSACTION createSurfaceLocked");
|
||||
if (SHOW_LIGHT_TRANSACTIONS) Slog.i(WindowManagerService.TAG,
|
||||
"<<< CLOSE TRANSACTION createSurfaceLocked");
|
||||
}
|
||||
if (WindowManagerService.localLOGV) Slog.v(
|
||||
WindowManagerService.TAG, "Created surface " + this);
|
||||
|
Reference in New Issue
Block a user