diff options
-rw-r--r-- | services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java b/services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java index 62f2b48..5e4bd8b 100644 --- a/services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java +++ b/services/core/java/com/android/server/wm/EmulatorDisplayOverlay.java @@ -93,7 +93,9 @@ class EmulatorDisplayOverlay { } c.drawColor(Color.TRANSPARENT, PorterDuff.Mode.SRC); mSurfaceControl.setPosition(0, 0); - mOverlay.setBounds(0, 0, mScreenSize.x, mScreenSize.y); + // Always draw the overlay with square dimensions + int size = Math.max(mScreenSize.x, mScreenSize.y); + mOverlay.setBounds(0, 0, size, size); mOverlay.draw(c); mSurface.unlockCanvasAndPost(c); } |