diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/wm/WindowManagerService.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 26d89cd..607c60a 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -6498,8 +6498,22 @@ public class WindowManagerService extends IWindowManager.Stub } if (mBaseDisplayWidth < mInitialDisplayWidth || mBaseDisplayHeight < mInitialDisplayHeight) { - Rect outer = new Rect(0, 0, mInitialDisplayWidth, mInitialDisplayHeight); - Rect inner = new Rect(0, 0, mBaseDisplayWidth, mBaseDisplayHeight); + int initW, initH, baseW, baseH; + final boolean rotated = (mRotation == Surface.ROTATION_90 + || mRotation == Surface.ROTATION_270); + if (rotated) { + initW = mInitialDisplayHeight; + initH = mInitialDisplayWidth; + baseW = mBaseDisplayHeight; + baseH = mBaseDisplayWidth; + } else { + initW = mInitialDisplayWidth; + initH = mInitialDisplayHeight; + baseW = mBaseDisplayWidth; + baseH = mBaseDisplayHeight; + } + Rect outer = new Rect(0, 0, initW, initH); + Rect inner = new Rect(0, 0, baseW, baseH); try { mBlackFrame = new BlackFrame(mFxSession, outer, inner, MASK_LAYER); } catch (Surface.OutOfResourcesException e) { |