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

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

Merge "Increase overview thumbnail size for 2 button landscape." into ub-launcher3-rvc-dev

parents 6bf68489 88830c06
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -45,8 +45,10 @@ public class BackgroundAppState extends OverviewState {
        if (launcher.getDeviceProfile().isVerticalBarLayout()) {
            return super.getVerticalProgress(launcher);
        }
        RecentsView recentsView = launcher.getOverviewPanel();
        int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher,
                launcher.getDeviceProfile());
                launcher.getDeviceProfile(),
                recentsView.getPagedOrientationHandler());
        AllAppsTransitionController controller = launcher.getAllAppsController();
        float scrollRange = Math.max(controller.getShiftRange(), 1);
        float progressDelta = (transitionLength / scrollRange);
@@ -73,9 +75,11 @@ public class BackgroundAppState extends OverviewState {
    public ScaleAndTranslation getHotseatScaleAndTranslation(Launcher launcher) {
        if ((getVisibleElements(launcher) & HOTSEAT_ICONS) != 0) {
            // Translate hotseat offscreen if we show it in overview.
            RecentsView recentsView = launcher.getOverviewPanel();
            ScaleAndTranslation scaleAndTranslation = super.getHotseatScaleAndTranslation(launcher);
            scaleAndTranslation.translationY += LayoutUtils.getShelfTrackingDistance(launcher,
                    launcher.getDeviceProfile());
                    launcher.getDeviceProfile(),
                    recentsView.getPagedOrientationHandler());
            return scaleAndTranslation;
        }
        return super.getHotseatScaleAndTranslation(launcher);
+2 −5
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@ 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.hideShelfInTwoButtonLandscape;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;

import android.content.Context;
@@ -130,10 +129,8 @@ public class OverviewState extends LauncherState {
    @Override
    public int getVisibleElements(Launcher launcher) {
        RecentsView recentsView = launcher.getOverviewPanel();
        boolean hideShelfTwoButtonLandscape = getMode(launcher) == TWO_BUTTONS &&
                !recentsView.getPagedOrientationHandler().isLayoutNaturalToLauncher();
        if (ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(launcher) ||
                hideShelfTwoButtonLandscape) {
                hideShelfInTwoButtonLandscape(launcher, recentsView.getPagedOrientationHandler())) {
            return OVERVIEW_BUTTONS;
        } else if (launcher.getDeviceProfile().isVerticalBarLayout()) {
            return VERTICAL_SWIPE_INDICATOR | OVERVIEW_BUTTONS;
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public class NoButtonQuickSwitchTouchController implements TouchController,
        mRecentsView = mLauncher.getOverviewPanel();
        mXRange = mLauncher.getDeviceProfile().widthPx / 2f;
        mYRange = LayoutUtils.getShelfTrackingDistance(
            mLauncher, mLauncher.getDeviceProfile());
            mLauncher, mLauncher.getDeviceProfile(), mRecentsView.getPagedOrientationHandler());
        mMotionPauseDetector = new MotionPauseDetector(mLauncher);
        mMotionPauseMinDisplacement = mLauncher.getResources().getDimension(
                R.dimen.motion_pause_detector_min_displacement_from_app);
+3 −2
Original line number Diff line number Diff line
@@ -357,12 +357,13 @@ public abstract class BaseSwipeUpHandler<T extends StatefulActivity<?>, Q extend
    protected void initTransitionEndpoints(DeviceProfile dp) {
        mDp = dp;

        mTransitionDragLength = mActivityInterface.getSwipeUpDestinationAndLength(
                dp, mContext, TEMP_RECT);
        mTaskViewSimulator.setDp(dp);
        mTaskViewSimulator.setLayoutRotation(
                mDeviceState.getCurrentActiveRotation(),
                mDeviceState.getDisplayRotation());
        mTransitionDragLength = mActivityInterface.getSwipeUpDestinationAndLength(
                dp, mContext, TEMP_RECT,
                mTaskViewSimulator.getOrientationState().getOrientationHandler());

        if (mDeviceState.isFullyGesturalNavMode()) {
            // We can drag all the way to the top of the screen.
+8 −4
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.fallback.FallbackRecentsView;
import com.android.quickstep.fallback.RecentsState;
@@ -58,8 +59,9 @@ public final class FallbackActivityInterface extends
    }

    @Override
    public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect) {
        calculateTaskSize(context, dp, outRect);
    public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context, Rect outRect,
            PagedOrientationHandler orientationHandler) {
        calculateTaskSize(context, dp, outRect, orientationHandler);
        if (dp.isVerticalBarLayout()
                && SysUINavigationMode.INSTANCE.get(context).getMode() != NO_BUTTON) {
            Rect targetInsets = dp.getInsets();
@@ -100,7 +102,8 @@ public final class FallbackActivityInterface extends
                    rv.setContentAlpha(1);
                }
                createActivityInterface(getSwipeUpDestinationAndLength(
                        activity.getDeviceProfile(), activity, new Rect()));
                        activity.getDeviceProfile(), activity, new Rect(),
                        rv.getPagedOrientationHandler()));
            }

            @Override
@@ -193,7 +196,8 @@ public final class FallbackActivityInterface extends
    }

    @Override
    protected float getExtraSpace(Context context, DeviceProfile dp) {
    protected float getExtraSpace(Context context, DeviceProfile dp,
            PagedOrientationHandler orientationHandler) {
        return showOverviewActions(context)
                ? context.getResources().getDimensionPixelSize(R.dimen.overview_actions_height)
                : 0;
Loading