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

Commit 01a7bcc6 authored by Pat Manning's avatar Pat Manning Committed by Android (Google) Code Review
Browse files

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

parents 7dcc9831 4e73e5e3
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(), overviewPanel.getLastComputedTaskSize());
        mActionsView.updateDimension(getDeviceProfile());
        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(prefix, pw);
        mDeviceProfile.dump(this, prefix, pw);
    }
}
+1 −2
Original line number Diff line number Diff line
@@ -50,8 +50,7 @@ public class BackgroundAppState extends OverviewState {
            return super.getVerticalProgress(launcher);
        }
        RecentsView recentsView = launcher.getOverviewPanel();
        int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher,
                launcher.getDeviceProfile(),
        int transitionLength = LayoutUtils.getShelfTrackingDistance(launcher.getDeviceProfile(),
                recentsView.getPagedOrientationHandler());
        AllAppsTransitionController controller = launcher.getAllAppsController();
        float scrollRange = Math.max(controller.getShiftRange(), 1);
+1 −10
Original line number Diff line number Diff line
@@ -18,8 +18,6 @@ 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;
@@ -71,13 +69,6 @@ public class OverviewModalTaskState extends OverviewState {
    }

    public static float[] getOverviewScaleAndOffsetForModalState(BaseDraggingActivity activity) {
        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};
        return new float[] {activity.getDeviceProfile().overviewModalTaskScale, NO_OFFSET};
    }
}
+2 −5
Original line number Diff line number Diff line
@@ -65,12 +65,9 @@ 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(scale, 0, -getDefaultSwipeHeight(launcher) * parallaxFactor);
        return new ScaleAndTranslation(launcher.getDeviceProfile().overviewTaskWorkspaceScale, 0,
                -getDefaultSwipeHeight(launcher) * parallaxFactor);
    }

    @Override
Loading