Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04e888d6 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Moving some more stuff behind the live tile feature flag" into ub-launcher3-master

parents 4aa8862b 5e35040c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.launcher3.uioverrides;
import static com.android.launcher3.AbstractFloatingView.TYPE_QUICKSTEP_PREVIEW;
import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.states.RotationHelper.REQUEST_ROTATE;

import android.graphics.Rect;
@@ -75,8 +76,12 @@ public class OverviewState extends LauncherState {
    public void onStateEnabled(Launcher launcher) {
        RecentsView rv = launcher.getOverviewPanel();
        rv.setOverviewStateEnabled(true);
        if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            AbstractFloatingView.closeAllOpenViews(launcher);
        } else {
            AbstractFloatingView.closeAllOpenViewsExcept(launcher, TYPE_QUICKSTEP_PREVIEW);
        }
    }

    @Override
    public void onStateDisabled(Launcher launcher) {
+5 −5
Original line number Diff line number Diff line
@@ -660,14 +660,14 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
    }

    private void updateFinalShiftUi() {
        if (mRecentsAnimationWrapper.getController() != null && mLayoutListener != null) {
        if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            if (mRecentsAnimationWrapper.getController() != null && mLayoutListener != null) {
                mLayoutListener.open();
            }
                mLayoutListener.update(mCurrentShift.value > 1, mUiLongSwipeMode,
                        mClipAnimationHelper.getCurrentRectWithInsets(),
                        mClipAnimationHelper.getCurrentCornerRadius());
            }
        }

        final boolean passed = mCurrentShift.value >= MIN_PROGRESS_FOR_OVERVIEW;
        if (passed != mPassedOverviewThreshold) {
+3 −3
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.quickstep.util;

import static com.android.launcher3.anim.Interpolators.LINEAR;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.quickstep.QuickScrubController.QUICK_SCRUB_TRANSLATION_Y_FACTOR;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
@@ -188,7 +189,7 @@ public class ClipAnimationHelper {
            mTmpMatrix.setTranslate(app.position.x, app.position.y);
            Rect crop = app.sourceContainerBounds;
            float alpha = 1f;
            int layer;
            int layer = RemoteAnimationProvider.getLayer(app, mBoostModeTargetLayers);
            float cornerRadius = 0f;
            float scale = params.currentRect.width() / crop.width();
            if (app.mode == targetSet.targetMode) {
@@ -201,8 +202,7 @@ public class ClipAnimationHelper {
                    mCurrentCornerRadius = cornerRadius;
                }
                alpha = mTaskAlphaCallback.apply(app, params.targetAlpha);
                layer = RemoteAnimationProvider.getLayer(app, mBoostModeTargetLayers);
            } else {
            } else if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
                crop = null;
                layer = Integer.MAX_VALUE;
            }
+4 −2
Original line number Diff line number Diff line
@@ -74,8 +74,10 @@ public class LauncherLayoutListener extends AbstractFloatingView
    @Override
    public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect,
                  float cornerRadius) {
        if (!ENABLE_QUICKSTEP_LIVE_TILE.get() && shouldFinish) {
        if (!ENABLE_QUICKSTEP_LIVE_TILE.get()) {
            if (shouldFinish) {
                finish();
            }
            return;
        }