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

Commit 66bac181 authored by Alex Chau's avatar Alex Chau Committed by Android (Google) Code Review
Browse files

Merge "Revert "Move BaseActivityInterface task size methods to DevicePr..."" into tm-qpr-dev

parents bbfbe60f 62572c04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ public abstract class BaseQuickstepLauncher extends Launcher {
                new SplitSelectStateController(this, mHandler, getStateManager(),
                        getDepthController());
        overviewPanel.init(mActionsView, controller);
        mActionsView.updateDimension(getDeviceProfile());
        mActionsView.updateDimension(getDeviceProfile(), overviewPanel.getLastComputedTaskSize());
        mActionsView.updateVerticalMargin(DisplayController.getNavigationMode(this));

        mAppTransitionManager = new QuickstepTransitionManager(this);
+1 −1
Original line number Diff line number Diff line
@@ -839,6 +839,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
        pw.println(String.format(
                "%s\tmBindInProgress=%b", prefix, mBindingItems));
        mControllers.dumpLogs(prefix + "\t", pw);
        mDeviceProfile.dump(this, prefix, pw);
        mDeviceProfile.dump(prefix, pw);
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -50,7 +50,8 @@ public class BackgroundAppState extends OverviewState {
            return super.getVerticalProgress(launcher);
        }
        RecentsView recentsView = launcher.getOverviewPanel();
        int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher.getDeviceProfile(),
        int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher,
                launcher.getDeviceProfile(),
                recentsView.getPagedOrientationHandler());
        AllAppsTransitionController controller = launcher.getAllAppsController();
        float scrollRange = Math.max(controller.getShiftRange(), 1);
+10 −1
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.launcher3.uioverrides.states;
import static com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_OVERVIEW;

import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;

import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.Launcher;
@@ -69,6 +71,13 @@ public class OverviewModalTaskState extends OverviewState {
    }

    public static float[] getOverviewScaleAndOffsetForModalState(BaseDraggingActivity activity) {
        return new float[] {activity.getDeviceProfile().overviewModalTaskScale, NO_OFFSET};
        Point taskSize = activity.<RecentsView>getOverviewPanel().getSelectedTaskSize();
        Rect modalTaskSize = new Rect();
        activity.<RecentsView>getOverviewPanel().getModalTaskSize(modalTaskSize);

        float scale = Math.min((float) modalTaskSize.height() / taskSize.y,
                (float) modalTaskSize.width() / taskSize.x);

        return new float[] {scale, NO_OFFSET};
    }
}
+5 −2
Original line number Diff line number Diff line
@@ -65,9 +65,12 @@ public class OverviewState extends LauncherState {

    @Override
    public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) {
        RecentsView recentsView = launcher.getOverviewPanel();
        float workspacePageHeight = launcher.getDeviceProfile().getCellLayoutHeight();
        recentsView.getTaskSize(sTempRect);
        float scale = (float) sTempRect.height() / workspacePageHeight;
        float parallaxFactor = 0.5f;
        return new ScaleAndTranslation(launcher.getDeviceProfile().overviewTaskWorkspaceScale, 0,
                -getDefaultSwipeHeight(launcher) * parallaxFactor);
        return new ScaleAndTranslation(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor);
    }

    @Override
Loading