From dd12316b0d6795f4d952110a04890c231dfa6da3 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 Change-Id: I87f04b50945e1500babdf9fa7ba9cdb37010fde8 Merged-In: 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 f38b4f259c88c..6f597e83bda8e 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -105,6 +105,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 DisplayManager.DisplayListener mDisplayListener; @@ -457,6 +458,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); ((ImageView) mOverlay.findViewById(R.id.left)).setImageTintList(tintList); ((ImageView) mOverlay.findViewById(R.id.right)).setImageTintList(tintList);