Removing scrim overdraw
> Moving all the scrims to draglayer to avoid creating multiple layers during
various animations
> Removing sys-ui scrim in various states which alread have a background scrim
Bug: 74556464
Bug: 78585335
Change-Id: I8a3fd34ed440f3c7d2e19b3cdb4b72723c535602
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 4e10ab6..5052674 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -61,6 +61,7 @@
protected static final int FLAG_DISABLE_INTERACTION = 1 << 6;
protected static final int FLAG_OVERVIEW_UI = 1 << 7;
protected static final int FLAG_HIDE_BACK_BUTTON = 1 << 8;
+ protected static final int FLAG_HAS_SYS_UI_SCRIM = 1 << 9;
protected static final PageAlphaProvider DEFAULT_ALPHA_PROVIDER =
new PageAlphaProvider(ACCEL_2) {
@@ -75,8 +76,9 @@
/**
* TODO: Create a separate class for NORMAL state.
*/
- public static final LauncherState NORMAL = new LauncherState(0, ContainerType.WORKSPACE,
- 0, FLAG_DISABLE_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED | FLAG_HIDE_BACK_BUTTON);
+ public static final LauncherState NORMAL = new LauncherState(0, ContainerType.WORKSPACE, 0,
+ FLAG_DISABLE_RESTORE | FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED | FLAG_HIDE_BACK_BUTTON |
+ FLAG_HAS_SYS_UI_SCRIM);
/**
* Various Launcher states arranged in the increasing order of UI layers
@@ -147,6 +149,8 @@
*/
public final boolean hideBackButton;
+ public final boolean hasSysUiScrim;
+
public LauncherState(int id, int containerType, int transitionDuration, int flags) {
this.containerType = containerType;
this.transitionDuration = transitionDuration;
@@ -162,6 +166,7 @@
this.disableInteraction = (flags & FLAG_DISABLE_INTERACTION) != 0;
this.overviewUi = (flags & FLAG_OVERVIEW_UI) != 0;
this.hideBackButton = (flags & FLAG_HIDE_BACK_BUTTON) != 0;
+ this.hasSysUiScrim = (flags & FLAG_HAS_SYS_UI_SCRIM) != 0;
this.ordinal = id;
sAllStates[id] = this;