Adding debug mode for scrims

This makes every scrim to have very distinct color, helpful when trying to determine which scrim is shown right now.
It's not perfect as in some cases colors are overriden in ScrimController but it should be 90% accurate.

Bug: 213304101
Test: manual
Change-Id: Id24165a06caac453f7a4f1d6749dd2d271a63060
This commit is contained in:
Michal Brzezinski
2022-01-21 15:07:48 +00:00
parent 0eebf348e4
commit a25e30e935

View File

@@ -153,7 +153,7 @@ public enum ScrimState {
// to make sure correct color is returned before "prepare" is called
@Override
public int getBehindTint() {
return Color.BLACK;
return DEBUG_MODE ? DEBUG_BEHIND_TINT : Color.BLACK;
}
},
@@ -264,6 +264,12 @@ public enum ScrimState {
}
};
private static final boolean DEBUG_MODE = false;
private static final int DEBUG_NOTIFICATIONS_TINT = Color.RED;
private static final int DEBUG_FRONT_TINT = Color.GREEN;
private static final int DEBUG_BEHIND_TINT = Color.BLUE;
boolean mBlankScreen = false;
long mAnimationDuration = ScrimController.ANIMATION_DURATION;
int mFrontTint = Color.TRANSPARENT;
@@ -323,15 +329,15 @@ public enum ScrimState {
}
public int getFrontTint() {
return mFrontTint;
return DEBUG_MODE ? DEBUG_FRONT_TINT : mFrontTint;
}
public int getBehindTint() {
return mBehindTint;
return DEBUG_MODE ? DEBUG_BEHIND_TINT : mBehindTint;
}
public int getNotifTint() {
return mNotifTint;
return DEBUG_MODE ? DEBUG_NOTIFICATIONS_TINT : mNotifTint;
}
public long getAnimationDuration() {