Some overview scrim and status bar color adjustments

- Replace UI_STATE_OVERVIEW with UI_STATE_FULLSCREEN_TASK. Overview no
  longer needs it's own status bar treatment as it's handled by
  ScrimView already. So remove instances of UI_STATE_OVERVIEW and
  replace some with UI_STATE_FULLSCREEN_TASK if a TaskView is behind
  the status bar.
- Add ScrimView to fallback recents activity.
- Remove scrim from Background state, don't fade it in until the
  gesture ends to RECENTS.

Test: watch scrim and status bar colors during the following
- Swipe up to home (no scrim, status bar matches task at first but
  then wallpaper once task isn't overlapping status bar)
- Swipe up to overview (no scrim until let go to overview, status
  bar matches task at first, then wallpaper after not overlapping,
  then scrim once it's 90% opacity)
- Quick switch from home (scrim fades in, status bar matches once
  it reaches 90% opacity)
- Quick switch from app (no scrim, status bar matches center task)
- Repeat above for 3P launcher and 2 button mode

Fixes: 185681676
Fixes: 185286870
Change-Id: I9e5c292cc734e714169b9cc8268e8dad4e868aca
diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java
index f77f7e8..f64ce5c 100644
--- a/src/com/android/launcher3/BaseActivity.java
+++ b/src/com/android/launcher3/BaseActivity.java
@@ -17,7 +17,7 @@
 package com.android.launcher3;
 
 import static com.android.launcher3.model.WidgetsModel.GO_DISABLE_WIDGETS;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
 
 import static java.lang.annotation.RetentionPolicy.SOURCE;
 
@@ -39,6 +39,7 @@
 import com.android.launcher3.util.SystemUiController;
 import com.android.launcher3.util.ViewCache;
 import com.android.launcher3.views.ActivityContext;
+import com.android.launcher3.views.ScrimView;
 
 import java.io.PrintWriter;
 import java.lang.annotation.Retention;
@@ -157,6 +158,10 @@
         return mSystemUiController;
     }
 
+    public ScrimView getScrimView() {
+        return null;
+    }
+
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
@@ -197,7 +202,7 @@
 
         // Reset the overridden sysui flags used for the task-swipe launch animation, this is a
         // catch all for if we do not get resumed (and therefore not paused below)
-        getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
+        getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
     }
 
     @Override
@@ -209,7 +214,7 @@
         // here instead of at the end of the animation because the start of the new activity does
         // not happen immediately, which would cause us to reset to launcher's sysui flags and then
         // back to the new app (causing a flash)
-        getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
+        getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
     }
 
     @Override
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index a54c791..f640118 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1426,6 +1426,7 @@
         return mDropTargetBar;
     }
 
+    @Override
     public ScrimView getScrimView() {
         return mScrimView;
     }
diff --git a/src/com/android/launcher3/util/SystemUiController.java b/src/com/android/launcher3/util/SystemUiController.java
index 50166c3..630df7e 100644
--- a/src/com/android/launcher3/util/SystemUiController.java
+++ b/src/com/android/launcher3/util/SystemUiController.java
@@ -30,7 +30,7 @@
     public static final int UI_STATE_BASE_WINDOW = 0;
     public static final int UI_STATE_SCRIM_VIEW = 1;
     public static final int UI_STATE_WIDGET_BOTTOM_SHEET = 2;
-    public static final int UI_STATE_OVERVIEW = 3;
+    public static final int UI_STATE_FULLSCREEN_TASK = 3;
     public static final int UI_STATE_ALLAPPS = 4;
 
     public static final int FLAG_LIGHT_NAV = 1 << 0;
diff --git a/src/com/android/launcher3/views/ScrimView.java b/src/com/android/launcher3/views/ScrimView.java
index 722f578..5387a3e 100644
--- a/src/com/android/launcher3/views/ScrimView.java
+++ b/src/com/android/launcher3/views/ScrimView.java
@@ -25,8 +25,8 @@
 
 import androidx.core.graphics.ColorUtils;
 
+import com.android.launcher3.BaseActivity;
 import com.android.launcher3.Insettable;
-import com.android.launcher3.Launcher;
 import com.android.launcher3.util.SystemUiController;
 
 /**
@@ -82,7 +82,7 @@
 
     private SystemUiController getSystemUiController() {
         if (mSystemUiController == null) {
-            mSystemUiController = Launcher.getLauncher(getContext()).getSystemUiController();
+            mSystemUiController = BaseActivity.fromContext(getContext()).getSystemUiController();
         }
         return mSystemUiController;
     }