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/quickstep/res/layout/fallback_recents_activity.xml b/quickstep/res/layout/fallback_recents_activity.xml
index 55400a7..a43296f 100644
--- a/quickstep/res/layout/fallback_recents_activity.xml
+++ b/quickstep/res/layout/fallback_recents_activity.xml
@@ -33,6 +33,12 @@
android:layout_height="match_parent"
android:clipChildren="false">
+ <com.android.launcher3.views.ScrimView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/scrim_view"
+ android:background="@android:color/transparent" />
+
<com.android.quickstep.fallback.FallbackRecentsView
android:id="@id/overview_panel"
android:layout_width="match_parent"
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
index aa770d2..77c2611 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java
@@ -18,6 +18,7 @@
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND;
import android.content.Context;
+import android.graphics.Color;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
@@ -86,6 +87,11 @@
return 1f;
}
+ @Override
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Color.TRANSPARENT;
+ }
+
public static float[] getOverviewScaleAndOffsetForBackgroundState(
BaseDraggingActivity activity) {
return new float[] {
diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
index 53afd21..d36e76b 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickSwitchState.java
@@ -18,6 +18,8 @@
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND;
import com.android.launcher3.Launcher;
+import com.android.launcher3.R;
+import com.android.launcher3.util.Themes;
/**
* State to indicate we are about to launch a recent task. Note that this state is only used when
@@ -39,6 +41,11 @@
}
@Override
+ public int getWorkspaceScrimColor(Launcher launcher) {
+ return Themes.getAttrColor(launcher, R.attr.overviewScrimColor);
+ }
+
+ @Override
public float getVerticalProgress(Launcher launcher) {
// Don't move all apps shelf while quick-switching (just let it fade).
return 1f;
diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java
index 94a7442..3953e42 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java
@@ -29,7 +29,7 @@
import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_FADE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_TRANSLATE;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_OVERVIEW_DISABLED;
@@ -143,10 +143,9 @@
if (tv != null) {
sysuiFlags = tv.getThumbnail().getSysUiStatusNavFlags();
}
- mLauncher.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, sysuiFlags);
+ mLauncher.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, sysuiFlags);
} else {
- mLauncher.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, mOverviewPanel.hasLightBackground());
+ mLauncher.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
}
}
diff --git a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
index 53f1fd0..9c79c32 100644
--- a/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
+++ b/quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java
@@ -34,7 +34,7 @@
import static com.android.launcher3.util.DisplayController.getSingleFrameMs;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC;
import static com.android.quickstep.GestureState.GestureEndTarget.HOME;
import static com.android.quickstep.GestureState.GestureEndTarget.LAST_TASK;
@@ -664,11 +664,10 @@
mRecentsAnimationController.setSplitScreenMinimized(swipeUpThresholdPassed);
if (swipeUpThresholdPassed) {
- mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, mRecentsView.hasLightBackground());
+ mActivity.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
} else {
mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, centermostTaskFlags);
+ UI_STATE_FULLSCREEN_TASK, centermostTaskFlags);
}
}
}
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index 147297a..7aa81d4 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -15,10 +15,12 @@
*/
package com.android.quickstep;
+import static com.android.launcher3.LauncherAnimUtils.VIEW_BACKGROUND_COLOR;
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
import static com.android.launcher3.anim.Interpolators.INSTANT;
import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.quickstep.AbsSwipeUpHandler.RECENTS_ATTACH_DURATION;
+import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS;
import static com.android.quickstep.SysUINavigationMode.getMode;
import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_FADE_ANIM;
import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_TRANSLATE_X_ANIM;
@@ -28,9 +30,11 @@
import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION;
import android.animation.Animator;
+import android.animation.ObjectAnimator;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Resources;
+import android.graphics.Color;
import android.graphics.PointF;
import android.graphics.Rect;
import android.os.Build;
@@ -51,6 +55,7 @@
import com.android.launcher3.taskbar.TaskbarController;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.WindowBounds;
+import com.android.launcher3.views.ScrimView;
import com.android.quickstep.SysUINavigationMode.Mode;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.AnimatorControllerWithResistance;
@@ -344,15 +349,33 @@
}
/**
- * Called when the gesture ends and the animation starts towards the given target. No-op by
- * default, but subclasses can override to add an additional animation with the same duration.
+ * Called when the gesture ends and the animation starts towards the given target. Used to add
+ * an optional additional animation with the same duration.
*/
public @Nullable Animator getParallelAnimationToLauncher(
GestureState.GestureEndTarget endTarget, long duration) {
+ if (endTarget == RECENTS) {
+ ACTIVITY_TYPE activity = getCreatedActivity();
+ if (activity == null) {
+ return null;
+ }
+ STATE_TYPE state = stateFromGestureEndTarget(endTarget);
+ ScrimView scrimView = activity.getScrimView();
+ ObjectAnimator anim = ObjectAnimator.ofArgb(scrimView, VIEW_BACKGROUND_COLOR,
+ getOverviewScrimColorForState(activity, state));
+ anim.setDuration(duration);
+ return anim;
+ }
return null;
}
/**
+ * Returns the color of the scrim behind overview when at rest in this state.
+ * Return {@link Color#TRANSPARENT} for no scrim.
+ */
+ protected abstract int getOverviewScrimColorForState(ACTIVITY_TYPE activity, STATE_TYPE state);
+
+ /**
* See {@link com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags}
* @param systemUiStateFlags The latest SystemUiStateFlags
*/
diff --git a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
index 8168e88..9fa65d9 100644
--- a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
@@ -196,4 +196,9 @@
recentsView.setLayoutRotation(rotationTouchHelper.getCurrentActiveRotation(),
rotationTouchHelper.getDisplayRotation());
}
+
+ @Override
+ protected int getOverviewScrimColorForState(RecentsActivity activity, RecentsState state) {
+ return state.getScrimColor(activity);
+ }
}
diff --git a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
index 878f5c9..dffee7f 100644
--- a/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/LauncherActivityInterface.java
@@ -23,6 +23,7 @@
import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_IME_SHOWING;
import android.animation.Animator;
+import android.animation.AnimatorSet;
import android.content.Context;
import android.graphics.Rect;
import android.view.MotionEvent;
@@ -271,11 +272,25 @@
public @Nullable Animator getParallelAnimationToLauncher(GestureEndTarget endTarget,
long duration) {
TaskbarController taskbarController = getTaskbarController();
+ Animator superAnimator = super.getParallelAnimationToLauncher(endTarget, duration);
if (taskbarController == null) {
- return null;
+ return superAnimator;
}
LauncherState toState = stateFromGestureEndTarget(endTarget);
- return taskbarController.createAnimToLauncher(toState, duration);
+ Animator taskbarAnimator = taskbarController.createAnimToLauncher(toState, duration);
+ if (superAnimator == null) {
+ return taskbarAnimator;
+ } else {
+ AnimatorSet animatorSet = new AnimatorSet();
+ animatorSet.playTogether(superAnimator, taskbarAnimator);
+ return animatorSet;
+ }
+ }
+
+ @Override
+ protected int getOverviewScrimColorForState(BaseQuickstepLauncher launcher,
+ LauncherState state) {
+ return state.getWorkspaceScrimColor(launcher);
}
@Override
diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java
index ec224ed..3b92779 100644
--- a/quickstep/src/com/android/quickstep/RecentsActivity.java
+++ b/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -59,7 +59,9 @@
import com.android.launcher3.util.ActivityTracker;
import com.android.launcher3.util.RunnableList;
import com.android.launcher3.util.SystemUiController;
+import com.android.launcher3.util.Themes;
import com.android.launcher3.views.BaseDragLayer;
+import com.android.launcher3.views.ScrimView;
import com.android.quickstep.fallback.FallbackRecentsStateController;
import com.android.quickstep.fallback.FallbackRecentsView;
import com.android.quickstep.fallback.RecentsDragLayer;
@@ -89,6 +91,7 @@
private Handler mUiHandler = new Handler(Looper.getMainLooper());
private RecentsDragLayer mDragLayer;
+ private ScrimView mScrimView;
private FallbackRecentsView mFallbackRecentsView;
private OverviewActionsView mActionsView;
@@ -106,6 +109,7 @@
inflateRootView(R.layout.fallback_recents_activity);
setContentView(getRootView());
mDragLayer = findViewById(R.id.drag_layer);
+ mScrimView = findViewById(R.id.scrim_view);
mFallbackRecentsView = findViewById(R.id.overview_panel);
mActionsView = findViewById(R.id.overview_actions_view);
@@ -164,6 +168,10 @@
return mDragLayer;
}
+ public ScrimView getScrimView() {
+ return mScrimView;
+ }
+
@Override
public <T extends View> T getOverviewPanel() {
return (T) mFallbackRecentsView;
@@ -269,7 +277,7 @@
setupViews();
getSystemUiController().updateUiState(SystemUiController.UI_STATE_BASE_WINDOW,
- mFallbackRecentsView.hasLightBackground());
+ Themes.getAttrBoolean(this, R.attr.isWorkspaceDarkText));
ACTIVITY_TRACKER.handleCreate(this);
}
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
index 8962ec9..7067dbc 100644
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
@@ -20,6 +20,7 @@
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_X;
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_Y;
+import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_SCRIM_FADE;
import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW;
import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_OFFSET;
import static com.android.quickstep.views.RecentsView.FULLSCREEN_PROGRESS;
@@ -95,5 +96,8 @@
setter.setFloat(mRecentsView, FULLSCREEN_PROGRESS, state.isFullScreen() ? 1 : 0, LINEAR);
setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS,
state.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()) ? 1f : 0f, LINEAR);
+
+ setter.setViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity),
+ config.getInterpolator(ANIM_WORKSPACE_SCRIM_FADE, LINEAR));
}
}
diff --git a/quickstep/src/com/android/quickstep/fallback/RecentsState.java b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
index bbe279e..b3d6cfa 100644
--- a/quickstep/src/com/android/quickstep/fallback/RecentsState.java
+++ b/quickstep/src/com/android/quickstep/fallback/RecentsState.java
@@ -19,10 +19,13 @@
import static com.android.launcher3.uioverrides.states.OverviewModalTaskState.getOverviewScaleAndOffsetForModalState;
import android.content.Context;
+import android.graphics.Color;
import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.R;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.statemanager.BaseState;
+import com.android.launcher3.util.Themes;
import com.android.quickstep.RecentsActivity;
/**
@@ -35,12 +38,13 @@
private static final int FLAG_FULL_SCREEN = BaseState.getFlag(2);
private static final int FLAG_OVERVIEW_ACTIONS = BaseState.getFlag(3);
private static final int FLAG_SHOW_AS_GRID = BaseState.getFlag(4);
+ private static final int FLAG_SCRIM = BaseState.getFlag(5);
public static final RecentsState DEFAULT = new RecentsState(0,
- FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID);
+ FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_SHOW_AS_GRID | FLAG_SCRIM);
public static final RecentsState MODAL_TASK = new ModalState(1,
FLAG_DISABLE_RESTORE | FLAG_CLEAR_ALL_BUTTON | FLAG_OVERVIEW_ACTIONS | FLAG_MODAL
- | FLAG_SHOW_AS_GRID);
+ | FLAG_SHOW_AS_GRID | FLAG_SCRIM);
public static final RecentsState BACKGROUND_APP = new BackgroundAppState(2,
FLAG_DISABLE_RESTORE | FLAG_NON_INTERACTIVE | FLAG_FULL_SCREEN);
public static final RecentsState HOME = new RecentsState(3, 0);
@@ -103,6 +107,14 @@
return hasFlag(FLAG_OVERVIEW_ACTIONS);
}
+ /**
+ * For this state, what color scrim should be drawn behind overview.
+ */
+ public int getScrimColor(RecentsActivity activity) {
+ return hasFlag(FLAG_SCRIM) ? Themes.getAttrColor(activity, R.attr.overviewScrimColor)
+ : Color.TRANSPARENT;
+ }
+
public float[] getOverviewScaleAndOffset(RecentsActivity activity) {
return new float[] { NO_SCALE, NO_OFFSET };
}
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 596f746..79dc6a9 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -45,7 +45,7 @@
import static com.android.launcher3.touch.PagedOrientationHandler.CANVAS_TRANSLATE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
-import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW;
+import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK;
import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId;
import static com.android.quickstep.util.NavigationModeFeatureFlag.LIVE_TILE;
import static com.android.quickstep.views.OverviewActionsView.HIDDEN_NON_ZERO_ROTATION;
@@ -450,7 +450,6 @@
private boolean mRunningTaskIconScaledDown = false;
- private final boolean mHasLightBackground;
private boolean mOverviewStateEnabled;
private boolean mHandleTaskStackChanges;
private boolean mSwipeDownShouldLaunchApp;
@@ -584,8 +583,6 @@
mLiveTileTaskViewSimulator.recentsViewScale.value = 1;
mLiveTileTaskViewSimulator.setOrientationState(mOrientationState);
mLiveTileTaskViewSimulator.setDrawsBelowRecents(true);
-
- mHasLightBackground = Themes.getAttrBoolean(mActivity, android.R.attr.isLightTheme);
}
public OverScroller getScroller() {
@@ -908,13 +905,6 @@
cancelSplitSelect(false);
}
}
-
- if (enabled) {
- mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, hasLightBackground());
- } else {
- mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
- }
}
/**
@@ -1523,7 +1513,6 @@
unloadVisibleTaskData(TaskView.FLAG_UPDATE_ALL);
setCurrentPage(0);
- mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, 0);
LayoutUtils.setViewEnabled(mActionsView, true);
if (mOrientationState.setGestureActive(false)) {
updateOrientationHandler();
@@ -2801,14 +2790,6 @@
}
}
- /**
- * True if the background scrim of the recents view is light colored and the foreground elements
- * should use dark colors.
- */
- public boolean hasLightBackground() {
- return mHasLightBackground;
- }
-
public void initiateSplitSelect(TaskView taskView, SplitPositionOption splitPositionOption) {
mSplitHiddenTaskView = taskView;
SplitSelectStateController splitController = mSplitPlaceholderView.getSplitController();
@@ -3059,10 +3040,9 @@
// tasks' flags
if (animator.getAnimatedFraction() > UPDATE_SYSUI_FLAGS_THRESHOLD) {
mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, targetSysUiFlags);
+ UI_STATE_FULLSCREEN_TASK, targetSysUiFlags);
} else {
- mActivity.getSystemUiController().updateUiState(
- UI_STATE_OVERVIEW, hasLightBackground());
+ mActivity.getSystemUiController().updateUiState(UI_STATE_FULLSCREEN_TASK, 0);
}
// Passing the threshold from taskview to fullscreen app will vibrate
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;
}