From 3bf9ca2727265e7b607d78d5d70ef54d5a0fdbc8 Mon Sep 17 00:00:00 2001 From: Bill Lin Date: Tue, 18 Feb 2020 15:00:39 +0800 Subject: [PATCH] Add DEBUG flag for rounded corner and display cutout path There wasn't a good approach for engineers to distignlish bounds between H/W display component and S/W anti-aliasing. Allow enable color to review the anti-aliasing effect. Test: adb root; adb shell setprop debug.screenshot_rounded_corners true; Test: adb shell pidof com.android.systemui|xargs -i adb shell kill -9 {} Test: check visual following above steps Test: atest SystemUITests Test: atest ScreenDecorationsTest Bug: 149721168 Change-Id: I87f04b50945e1500babdf9fa7ba9cdb37010fde8 --- .../SystemUI/src/com/android/systemui/ScreenDecorations.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index c9104dccce80f..6ce6353147fb3 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -96,6 +96,7 @@ public class ScreenDecorations extends SystemUI implements Tunable { private static final boolean DEBUG_SCREENSHOT_ROUNDED_CORNERS = SystemProperties.getBoolean("debug.screenshot_rounded_corners", false); private static final boolean VERBOSE = false; + private static final boolean DEBUG_COLOR = DEBUG_SCREENSHOT_ROUNDED_CORNERS; private DisplayManager mDisplayManager; private boolean mIsRegistered; @@ -454,6 +455,9 @@ public class ScreenDecorations extends SystemUI implements Tunable { private void updateColorInversion(int colorsInvertedValue) { int tint = colorsInvertedValue != 0 ? Color.WHITE : Color.BLACK; + if (DEBUG_COLOR) { + tint = Color.RED; + } ColorStateList tintList = ColorStateList.valueOf(tint); if (mOverlays == null) {