Allow Workspace Scrim to be colored per state
Make it possible to set the color of workspace scrim to a different color
per state. Motivated by making Overview Scrim and All Apps scrims different
colors.
Bug: 186253733
Test: Local build and flash
Change-Id: Id7c38ce3c9173308eedfcb7592ececa7bd6bf220
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 58df9c8..4c11725 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -30,6 +30,7 @@
import static com.android.launcher3.testing.TestProtocol.SPRING_LOADED_STATE_ORDINAL;
import android.content.Context;
+import android.graphics.Color;
import android.view.animation.Interpolator;
import com.android.launcher3.statemanager.BaseState;
@@ -217,8 +218,12 @@
return 0;
}
- public float getWorkspaceScrimAlpha(Launcher launcher) {
- return 0;
+ /**
+ * What color should the workspace scrim be in when at rest in this state.
+ * Return {@link Color#TRANSPARENT} for no scrim.
+ */
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Color.TRANSPARENT;
}
/**