summaryrefslogtreecommitdiffstats
path: root/services/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'services/core/java')
-rw-r--r--services/core/java/com/android/server/wm/CircularDisplayMask.java8
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java4
2 files changed, 8 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/CircularDisplayMask.java b/services/core/java/com/android/server/wm/CircularDisplayMask.java
index 9fdfc47..7c2da2d 100644
--- a/services/core/java/com/android/server/wm/CircularDisplayMask.java
+++ b/services/core/java/com/android/server/wm/CircularDisplayMask.java
@@ -50,9 +50,10 @@ class CircularDisplayMask {
private int mRotation;
private boolean mVisible;
private boolean mDimensionsUnequal = false;
+ private int mMaskThickness;
public CircularDisplayMask(Display display, SurfaceSession session, int zOrder,
- int screenOffset) {
+ int screenOffset, int maskThickness) {
mScreenSize = new Point();
display.getSize(mScreenSize);
if (mScreenSize.x != mScreenSize.y) {
@@ -84,6 +85,7 @@ class CircularDisplayMask {
mPaint.setAntiAlias(true);
mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
mScreenOffset = screenOffset;
+ mMaskThickness = maskThickness;
}
private void drawIfNeeded() {
@@ -121,8 +123,8 @@ class CircularDisplayMask {
int circleRadius = mScreenSize.x / 2;
c.drawColor(Color.BLACK);
- // The radius is reduced by 1 to provide an anti aliasing effect on the display edges.
- c.drawCircle(circleRadius, circleRadius, circleRadius - 1, mPaint);
+ // The radius is reduced by mMaskThickness to provide an anti aliasing effect on the display edges.
+ c.drawCircle(circleRadius, circleRadius, circleRadius - mMaskThickness, mPaint);
mSurface.unlockCanvasAndPost(c);
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 5ca9ef7..0cda6fd 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -5944,13 +5944,15 @@ public class WindowManagerService extends IWindowManager.Stub
if (mCircularDisplayMask == null) {
int screenOffset = mContext.getResources().getDimensionPixelSize(
com.android.internal.R.dimen.circular_display_mask_offset);
+ int maskThickness = mContext.getResources().getDimensionPixelSize(
+ com.android.internal.R.dimen.circular_display_mask_thickness);
mCircularDisplayMask = new CircularDisplayMask(
getDefaultDisplayContentLocked().getDisplay(),
mFxSession,
mPolicy.windowTypeToLayerLw(
WindowManager.LayoutParams.TYPE_POINTER)
- * TYPE_LAYER_MULTIPLIER + 10, screenOffset);
+ * TYPE_LAYER_MULTIPLIER + 10, screenOffset, maskThickness);
}
mCircularDisplayMask.setVisibility(true);
} else if (mCircularDisplayMask != null) {