From 63d2e41d1b25cbbde242d315d7cfc2cbc1678957 Mon Sep 17 00:00:00 2001 From: Alain Vongsouvanh Date: Wed, 26 Oct 2016 13:01:49 -0700 Subject: [PATCH] Properly set the center of the circular mask. The new circular mask did not take into account devices with a chin, setting the center of the circular mask higher than it should be. BUG: 32418552 Change-Id: Ia45e197492a57341ad7db620b1d3fcc4820eabf0 --- services/core/java/com/android/server/wm/CircularDisplayMask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/CircularDisplayMask.java b/services/core/java/com/android/server/wm/CircularDisplayMask.java index 0a9b33404b37..c57dfb676a7e 100644 --- a/services/core/java/com/android/server/wm/CircularDisplayMask.java +++ b/services/core/java/com/android/server/wm/CircularDisplayMask.java @@ -242,7 +242,7 @@ class CircularDisplayMask { } double cx = (maskWidth - 1.0) / 2.0; - double cy = (maskHeight - 1.0) / 2.0; + double cy = (maskHeight - 1.0 + mScreenOffset) / 2.0; double radius = maskWidth / 2.0; int[] pixels = new int[maskWidth * maskHeight]; -- 2.11.0