Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd12316b authored by Bill Lin's avatar Bill Lin
Browse files

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
parent e59b568a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);