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