diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar index b343cc2058..f16e4d0df0 100644 Binary files a/quickstep/libs/sysui_shared.jar and b/quickstep/libs/sysui_shared.jar differ diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index a8e38a1ab0..5035721819 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -22,7 +22,6 @@ import static com.android.launcher3.anim.Interpolators.ACCEL_2; import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.LINEAR; import static com.android.quickstep.TaskUtils.checkCurrentOrManagedUserId; -import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW; import android.animation.Animator; import android.animation.AnimatorSet; @@ -107,8 +106,6 @@ public abstract class RecentsView extends PagedView impl }; public static final boolean FLIP_RECENTS = true; private static final int DISMISS_TASK_DURATION = 300; - // The threshold at which we update the SystemUI flags when animating from the task into the app - private static final float UPDATE_SYSUI_FLAGS_THRESHOLD = 0.6f; private static final float[] sTempFloatArray = new float[3]; @@ -1155,21 +1152,12 @@ public abstract class RecentsView extends PagedView impl } tv.setVisibility(INVISIBLE); - int targetSysUiFlags = tv.getThumbnail().getSysUiStatusNavFlags(); TaskViewDrawable drawable = new TaskViewDrawable(tv, this); getOverlay().add(drawable); ObjectAnimator drawableAnim = ObjectAnimator.ofFloat(drawable, TaskViewDrawable.PROGRESS, 1, 0); drawableAnim.setInterpolator(LINEAR); - drawableAnim.addUpdateListener((animator) -> { - // Once we pass a certain threshold, update the sysui flags to match the target tasks' - // flags - mActivity.getSystemUiController().updateUiState(UI_STATE_OVERVIEW, - animator.getAnimatedFraction() > UPDATE_SYSUI_FLAGS_THRESHOLD - ? targetSysUiFlags - : 0); - }); AnimatorSet anim = createAdjacentPageAnimForTaskLaunch(tv, drawable.getClipAnimationHelper()); diff --git a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java index af7a735f55..c724930841 100644 --- a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java +++ b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java @@ -16,7 +16,6 @@ package com.android.quickstep.views; -import static android.view.View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR; import static com.android.systemui.shared.system.WindowManagerWrapper.WINDOWING_MODE_FULLSCREEN; import android.content.Context; @@ -39,7 +38,6 @@ import com.android.launcher3.BaseActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.config.FeatureFlags; -import com.android.launcher3.util.SystemUiController; import com.android.quickstep.TaskOverlayFactory; import com.android.quickstep.TaskOverlayFactory.TaskOverlay; import com.android.systemui.shared.recents.model.Task; @@ -145,20 +143,6 @@ public class TaskThumbnailView extends View { return new Rect(); } - public int getSysUiStatusNavFlags() { - if (mThumbnailData != null) { - int flags = 0; - flags |= (mThumbnailData.systemUiVisibility & SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) != 0 - ? SystemUiController.FLAG_LIGHT_STATUS - : SystemUiController.FLAG_DARK_STATUS; - flags |= (mThumbnailData.systemUiVisibility & SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR) != 0 - ? SystemUiController.FLAG_LIGHT_NAV - : SystemUiController.FLAG_DARK_NAV; - return flags; - } - return 0; - } - @Override protected void onDraw(Canvas canvas) { drawOnCanvas(canvas, 0, 0, getMeasuredWidth(), getMeasuredHeight(), mCornerRadius); @@ -170,23 +154,20 @@ public class TaskThumbnailView extends View { public void drawOnCanvas(Canvas canvas, float x, float y, float width, float height, float cornerRadius) { - // Draw the background in all cases, except when the thumbnail data is opaque - final boolean drawBackgroundOnly = mTask == null || mTask.isLocked || mBitmapShader == null - || mThumbnailData == null; - if (drawBackgroundOnly || mClipBottom > 0 || mThumbnailData.isTranslucent) { - canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mBackgroundPaint); - if (drawBackgroundOnly) { - return; - } + // Always draw the background since the snapshots may be translucent + canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mBackgroundPaint); + if (mTask == null) { + return; } - - if (mClipBottom > 0) { - canvas.save(); - canvas.clipRect(x, y, width, mClipBottom); - canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mPaint); - canvas.restore(); - } else { - canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mPaint); + if (!mTask.isLocked) { + if (mClipBottom > 0) { + canvas.save(); + canvas.clipRect(x, y, width, mClipBottom); + canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mPaint); + canvas.restore(); + } else { + canvas.drawRoundRect(x, y, width, height, cornerRadius, cornerRadius, mPaint); + } } } diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java index 1f70cfaa10..bd38bf00d2 100644 --- a/src/com/android/launcher3/BaseActivity.java +++ b/src/com/android/launcher3/BaseActivity.java @@ -16,7 +16,6 @@ package com.android.launcher3; -import static com.android.launcher3.util.SystemUiController.UI_STATE_OVERVIEW; import static java.lang.annotation.RetentionPolicy.SOURCE; import android.app.Activity; @@ -154,12 +153,6 @@ public abstract class BaseActivity extends Activity { protected void onPause() { mActivityFlags &= ~ACTIVITY_STATE_RESUMED; super.onPause(); - - // Reset the overridden sysui flags used for the task-swipe launch animation, we do this - // 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); } public boolean isStarted() { diff --git a/src/com/android/launcher3/util/SystemUiController.java b/src/com/android/launcher3/util/SystemUiController.java index 7ef53a97d7..edbf05a7cf 100644 --- a/src/com/android/launcher3/util/SystemUiController.java +++ b/src/com/android/launcher3/util/SystemUiController.java @@ -31,7 +31,6 @@ public class SystemUiController { public static final int UI_STATE_ALL_APPS = 1; public static final int UI_STATE_WIDGET_BOTTOM_SHEET = 2; public static final int UI_STATE_ROOT_VIEW = 3; - public static final int UI_STATE_OVERVIEW = 4; public static final int FLAG_LIGHT_NAV = 1 << 0; public static final int FLAG_DARK_NAV = 1 << 1; @@ -39,7 +38,7 @@ public class SystemUiController { public static final int FLAG_DARK_STATUS = 1 << 3; private final Window mWindow; - private final int[] mStates = new int[5]; + private final int[] mStates = new int[4]; public SystemUiController(Window window) { mWindow = window;