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

Commit 08619f86 authored by Vinit Nayak's avatar Vinit Nayak Committed by Android (Google) Code Review
Browse files

Merge "Hide shelf in 2-Button Landscape" into ub-launcher3-rvc-dev

parents 04f476dc 23681083
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -217,7 +217,9 @@ public class QuickstepLauncher extends BaseQuickstepLauncher {
                break;
            }
            case OVERVIEW_STATE_ORDINAL: {
                DiscoveryBounce.showForOverviewIfNeeded(this);
                RecentsView recentsView = getOverviewPanel();
                DiscoveryBounce.showForOverviewIfNeeded(this,
                        recentsView.getPagedOrientationHandler());
                RecentsView rv = getOverviewPanel();
                sendCustomAccessibilityEvent(
                        rv.getPageAt(rv.getCurrentPage()), TYPE_VIEW_FOCUSED, null);
+7 −1
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ import static com.android.launcher3.anim.Interpolators.DEACCEL_2;
import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS;
import static com.android.launcher3.logging.LoggerUtils.newContainerTarget;
import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON;
import static com.android.quickstep.SysUINavigationMode.Mode.TWO_BUTTONS;
import static com.android.quickstep.SysUINavigationMode.getMode;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;

import android.content.Context;
@@ -127,7 +129,11 @@ public class OverviewState extends LauncherState {

    @Override
    public int getVisibleElements(Launcher launcher) {
        if (ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(launcher)) {
        RecentsView recentsView = launcher.getOverviewPanel();
        boolean hideShelfTwoButtonLandscape = getMode(launcher) == TWO_BUTTONS &&
                !recentsView.getPagedOrientationHandler().isLayoutNaturalToLauncher();
        if (ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(launcher) ||
                hideShelfTwoButtonLandscape) {
            return OVERVIEW_BUTTONS;
        } else if (launcher.getDeviceProfile().isVerticalBarLayout()) {
            return VERTICAL_SWIPE_INDICATOR | OVERVIEW_BUTTONS;
+12 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Build;
import android.util.Log;
import android.view.MotionEvent;
import android.view.animation.Interpolator;

@@ -50,12 +51,14 @@ import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.statemanager.StatefulActivity;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.VibratorWrapper;
import com.android.launcher3.views.FloatingIconView;
import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener;
import com.android.quickstep.util.ActiveGestureLog;
import com.android.quickstep.util.ActivityInitListener;
import com.android.quickstep.util.AppWindowAnimationHelper;
import com.android.quickstep.util.RectFSpringAnim;
import com.android.quickstep.util.TaskViewSimulator;
import com.android.quickstep.util.TransformParams;
@@ -398,7 +401,16 @@ public abstract class BaseSwipeUpHandler<T extends StatefulActivity<?>, Q extend

    protected boolean onActivityInit(Boolean alreadyOnHome) {
        T createdActivity = mActivityInterface.getCreatedActivity();
        if (TestProtocol.sDebugTracing) {
            Log.d(TestProtocol.PAUSE_NOT_DETECTED, "BaseSwipeUpHandler.1");
        }
        if (createdActivity != null) {
            if (TestProtocol.sDebugTracing) {
                Log.d(TestProtocol.PAUSE_NOT_DETECTED, "BaseSwipeUpHandler.2");
            }
            ((RecentsView) createdActivity.getOverviewPanel())
                    .setLayoutRotation(mDeviceState.getCurrentActiveRotation(),
                            mDeviceState.getDisplayRotation());
            initTransitionEndpoints(InvariantDeviceProfile.INSTANCE.get(mContext)
                .getDeviceProfile(mContext));
        }
+3 −1
Original line number Diff line number Diff line
@@ -100,7 +100,9 @@ public final class LauncherActivityInterface extends
        super.onSwipeUpToRecentsComplete();
        Launcher launcher = getCreatedActivity();
        if (launcher != null) {
            DiscoveryBounce.showForOverviewIfNeeded(launcher);
            RecentsView recentsView = launcher.getOverviewPanel();
            DiscoveryBounce.showForOverviewIfNeeded(launcher,
                    recentsView.getPagedOrientationHandler());
        }
    }

+2 −0
Original line number Diff line number Diff line
@@ -276,6 +276,8 @@ public class LauncherSwipeHandler extends BaseSwipeUpHandler<Launcher, RecentsVi
        if (mActivity == activity) {
            return true;
        }
        mTaskViewSimulator.setLayoutRotation(mDeviceState.getCurrentActiveRotation(),
                mDeviceState.getDisplayRotation());
        if (mActivity != null) {
            // The launcher may have been recreated as a result of device rotation.
            int oldState = mStateCallback.getState() & ~LAUNCHER_UI_STATES;
Loading