From 82d5a0681da8cba0e1c1a7a1aabfefe77a41162a Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Fri, 14 May 2021 14:37:12 -0700 Subject: [PATCH] Revert to overview coming from the side instead of bottom Test: Visually checking all of these. As appropriate, repeat in 0, 2, 3 button modes, landscape/portrait/fake landscape, and 3P launcher - Quick switch from home - Home to overview - Overview to home (swipe up) - Overview to home (tap outside) - Overview to home (back invocation) - Quick switch from app - Swipe up and hold from app - Dismiss an app - Empty recents - Split select state to home - Modal state to home Fixes: 185411781 Change-Id: If00a22fee35c832a259bfc62808efbac5990ce2e --- .../launcher3/BaseQuickstepLauncher.java | 4 +- .../BaseRecentsViewStateController.java | 4 - .../states/BackgroundAppState.java | 2 +- .../states/OverviewModalTaskState.java | 2 +- .../uioverrides/states/OverviewState.java | 4 +- .../QuickstepAtomicAnimationFactory.java | 56 ++++++------ .../NoButtonQuickSwitchTouchController.java | 2 - .../QuickSwitchTouchController.java | 2 - .../quickstep/BaseActivityInterface.java | 14 +-- .../FallbackRecentsStateController.java | 3 - .../quickstep/fallback/RecentsState.java | 4 +- .../util/RecentsAtomicAnimationFactory.java | 8 +- .../android/quickstep/views/RecentsView.java | 91 +------------------ .../com/android/quickstep/views/TaskView.java | 5 - src/com/android/launcher3/Launcher.java | 2 +- src/com/android/launcher3/LauncherState.java | 4 +- 16 files changed, 53 insertions(+), 154 deletions(-) diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java index 6966fb65dd..e777ee7354 100644 --- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java @@ -29,10 +29,10 @@ import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SY import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.app.ActivityOptions; +import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.IntentSender; -import android.content.ComponentName; import android.content.ServiceConnection; import android.os.Bundle; import android.os.CancellationSignal; @@ -388,7 +388,7 @@ public abstract class BaseQuickstepLauncher extends Launcher @Override public float[] getNormalOverviewScaleAndOffset() { return SysUINavigationMode.getMode(this).hasGestures - ? new float[] {1, NO_OFFSET, 1} : new float[] {1.1f, NO_OFFSET, NO_OFFSET}; + ? new float[] {1, 1} : new float[] {1.1f, NO_OFFSET}; } @Override diff --git a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java index 814cf93936..1d523151db 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java @@ -25,7 +25,6 @@ import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TR import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_TRANSLATE_Y; import static com.android.launcher3.states.StateAnimationConfig.SKIP_OVERVIEW; import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET; -import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_VERTICAL_OFFSET; import static com.android.quickstep.views.RecentsView.RECENTS_GRID_PROGRESS; import static com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY; import static com.android.quickstep.views.RecentsView.TASK_PRIMARY_SPLIT_TRANSLATION; @@ -65,7 +64,6 @@ public abstract class BaseRecentsViewStateController float[] scaleAndOffset = state.getOverviewScaleAndOffset(mLauncher); RECENTS_SCALE_PROPERTY.set(mRecentsView, scaleAndOffset[0]); ADJACENT_PAGE_HORIZONTAL_OFFSET.set(mRecentsView, scaleAndOffset[1]); - ADJACENT_PAGE_VERTICAL_OFFSET.set(mRecentsView, scaleAndOffset[2]); TASK_SECONDARY_TRANSLATION.set(mRecentsView, 0f); getContentAlphaProperty().set(mRecentsView, state.overviewUi ? 1f : 0); @@ -97,8 +95,6 @@ public abstract class BaseRecentsViewStateController config.getInterpolator(ANIM_OVERVIEW_SCALE, LINEAR)); setter.setFloat(mRecentsView, ADJACENT_PAGE_HORIZONTAL_OFFSET, scaleAndOffset[1], config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_X, LINEAR)); - setter.setFloat(mRecentsView, ADJACENT_PAGE_VERTICAL_OFFSET, scaleAndOffset[2], - config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, LINEAR)); setter.setFloat(mRecentsView, TASK_SECONDARY_TRANSLATION, 0f, config.getInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, LINEAR)); PagedOrientationHandler orientationHandler = diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java index 06ffae449e..77c261154b 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java @@ -96,6 +96,6 @@ public class BackgroundAppState extends OverviewState { BaseDraggingActivity activity) { return new float[] { ((RecentsView) activity.getOverviewPanel()).getMaxScaleForFullScreen(), - NO_OFFSET, NO_OFFSET}; + NO_OFFSET}; } } diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java index 1fc288f7cf..6f084a1f97 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewModalTaskState.java @@ -78,6 +78,6 @@ public class OverviewModalTaskState extends OverviewState { float scale = Math.min((float) modalTaskSize.height() / taskSize.y, (float) modalTaskSize.width() / taskSize.x); - return new float[] {scale, NO_OFFSET, NO_OFFSET}; + return new float[] {scale, NO_OFFSET}; } } diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java index c9cfad3d3f..45791a3136 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java @@ -59,7 +59,7 @@ public class OverviewState extends LauncherState { @Override public int getTransitionDuration(Context context) { - // In gesture modes, overview comes in all the way from the bottom, so give it more time. + // In gesture modes, overview comes in all the way from the side, so give it more time. return SysUINavigationMode.INSTANCE.get(context).getMode().hasGestures ? 380 : 250; } @@ -78,7 +78,7 @@ public class OverviewState extends LauncherState { @Override public float[] getOverviewScaleAndOffset(Launcher launcher) { - return new float[] {NO_SCALE, NO_OFFSET, NO_OFFSET}; + return new float[] {NO_SCALE, NO_OFFSET}; } @Override diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java index adc6b18fed..eb524a9145 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/QuickstepAtomicAnimationFactory.java @@ -23,10 +23,11 @@ import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.WorkspaceStateTransitionAnimation.getSpringScaleAnimator; import static com.android.launcher3.anim.Interpolators.ACCEL; -import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT; +import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL; import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7; import static com.android.launcher3.anim.Interpolators.DEACCEL_3; +import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import static com.android.launcher3.anim.Interpolators.FINAL_FRAME; import static com.android.launcher3.anim.Interpolators.INSTANT; import static com.android.launcher3.anim.Interpolators.LINEAR; @@ -66,11 +67,11 @@ public class QuickstepAtomicAnimationFactory extends // Scale recents takes before animating in private static final float RECENTS_PREPARE_SCALE = 1.33f; // Scale workspace takes before animating in - private static final float WORKSPACE_PREPARE_SCALE_GESTURES = 0.97f; - private static final float WORKSPACE_PREPARE_SCALE_BUTTONS = 0.92f; - // When the overview to home transition reaches this percentage, immediately hide overview and - // start animating away the scrim and animating in workspace. - private static final float OVERVIEW_TO_HOME_HARD_HAND_OFF = 0.4f; + private static final float WORKSPACE_PREPARE_SCALE = 0.92f; + // Constants to specify how to scroll RecentsView to the default page if it's not already there. + private static final int DEFAULT_PAGE = 0; + private static final int PER_PAGE_SCROLL_DURATION = 150; + private static final int MAX_PAGE_SCROLL_DURATION = 750; // Due to use of physics, duration may differ between devices so we need to calculate and // cache the value. @@ -85,33 +86,32 @@ public class QuickstepAtomicAnimationFactory extends StateAnimationConfig config) { RecentsView overview = mActivity.getOverviewPanel(); if (toState == NORMAL && fromState == OVERVIEW) { - final float workspacePrepareScale; + config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, DEACCEL); + config.setInterpolator(ANIM_SCRIM_FADE, LINEAR); + config.setInterpolator(ANIM_WORKSPACE_SCALE, DEACCEL); + config.setInterpolator(ANIM_WORKSPACE_FADE, ACCEL); + if (SysUINavigationMode.getMode(mActivity).hasGestures && overview.getTaskViewCount() > 0) { - workspacePrepareScale = WORKSPACE_PREPARE_SCALE_GESTURES; // Overview is going offscreen, so keep it at its current scale and opacity. config.setInterpolator(ANIM_OVERVIEW_SCALE, FINAL_FRAME); - config.setInterpolator(ANIM_OVERVIEW_FADE, clampToProgress( - FINAL_FRAME, 0f, OVERVIEW_TO_HOME_HARD_HAND_OFF)); - config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, clampToProgress( - DEACCEL, 0f, OVERVIEW_TO_HOME_HARD_HAND_OFF)); - config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, AGGRESSIVE_EASE_IN_OUT); - config.setInterpolator(ANIM_SCRIM_FADE, clampToProgress( - DEACCEL, OVERVIEW_TO_HOME_HARD_HAND_OFF, 1f)); - config.setInterpolator(ANIM_WORKSPACE_SCALE, clampToProgress( - DEACCEL, OVERVIEW_TO_HOME_HARD_HAND_OFF, 1f)); - config.setInterpolator(ANIM_WORKSPACE_FADE, clampToProgress( - INSTANT, OVERVIEW_TO_HOME_HARD_HAND_OFF, 1f)); + config.setInterpolator(ANIM_OVERVIEW_FADE, FINAL_FRAME); + config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, + clampToProgress(FAST_OUT_SLOW_IN, 0, 0.75f)); + config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_Y, FINAL_FRAME); } else { - workspacePrepareScale = WORKSPACE_PREPARE_SCALE_BUTTONS; + config.setInterpolator(ANIM_OVERVIEW_TRANSLATE_X, ACCEL_DEACCEL); config.setInterpolator(ANIM_OVERVIEW_SCALE, clampToProgress(ACCEL, 0, 0.9f)); config.setInterpolator(ANIM_OVERVIEW_FADE, DEACCEL_1_7); - config.setInterpolator(ANIM_OVERVIEW_ACTIONS_FADE, LINEAR); - config.setInterpolator(ANIM_SCRIM_FADE, LINEAR); - config.setInterpolator(ANIM_WORKSPACE_SCALE, DEACCEL); - config.setInterpolator(ANIM_WORKSPACE_FADE, ACCEL); } + // Scroll RecentsView to page 0 as it goes offscreen, if necessary. + int numPagesToScroll = overview.getNextPage() - DEFAULT_PAGE; + long scrollDuration = Math.min(MAX_PAGE_SCROLL_DURATION, + numPagesToScroll * PER_PAGE_SCROLL_DURATION); + config.duration = Math.max(config.duration, scrollDuration); + overview.snapToPage(DEFAULT_PAGE, Math.toIntExact(config.duration)); + Workspace workspace = mActivity.getWorkspace(); // Start from a higher workspace scale, but only if we're invisible so we don't jump. boolean isWorkspaceVisible = workspace.getVisibility() == VISIBLE; @@ -122,14 +122,14 @@ public class QuickstepAtomicAnimationFactory extends && currentChild.getShortcutsAndWidgets().getAlpha() > 0; } if (!isWorkspaceVisible) { - workspace.setScaleX(workspacePrepareScale); - workspace.setScaleY(workspacePrepareScale); + workspace.setScaleX(WORKSPACE_PREPARE_SCALE); + workspace.setScaleY(WORKSPACE_PREPARE_SCALE); } Hotseat hotseat = mActivity.getHotseat(); boolean isHotseatVisible = hotseat.getVisibility() == VISIBLE && hotseat.getAlpha() > 0; if (!isHotseatVisible) { - hotseat.setScaleX(workspacePrepareScale); - hotseat.setScaleY(workspacePrepareScale); + hotseat.setScaleX(WORKSPACE_PREPARE_SCALE); + hotseat.setScaleY(WORKSPACE_PREPARE_SCALE); } } else if ((fromState == NORMAL || fromState == HINT_STATE || fromState == HINT_STATE_TWO_BUTTON) && toState == OVERVIEW) { diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java index 62687c5f35..5837a707ca 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/NoButtonQuickSwitchTouchController.java @@ -43,7 +43,6 @@ import static com.android.launcher3.touch.BothAxesSwipeDetector.DIRECTION_UP; import static com.android.launcher3.util.DisplayController.getSingleFrameMs; import static com.android.launcher3.util.VibratorWrapper.OVERVIEW_HAPTIC; import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET; -import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_VERTICAL_OFFSET; import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA; import static com.android.quickstep.views.RecentsView.FULLSCREEN_PROGRESS; import static com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY; @@ -224,7 +223,6 @@ public class NoButtonQuickSwitchTouchController implements TouchController, // Set RecentView's initial properties. RECENTS_SCALE_PROPERTY.set(mRecentsView, fromState.getOverviewScaleAndOffset(mLauncher)[0]); ADJACENT_PAGE_HORIZONTAL_OFFSET.set(mRecentsView, 1f); - ADJACENT_PAGE_VERTICAL_OFFSET.set(mRecentsView, 0f); mRecentsView.setContentAlpha(1); mRecentsView.setFullscreenProgress(fromState.getOverviewFullscreenProgress()); mLauncher.getActionsView().getVisibilityAlpha().setValue( diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java index 5891d5f16a..f0ef9cc2d7 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java @@ -31,7 +31,6 @@ import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_F import static com.android.launcher3.states.StateAnimationConfig.ANIM_WORKSPACE_TRANSLATE; import static com.android.launcher3.util.SystemUiController.UI_STATE_FULLSCREEN_TASK; import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET; -import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_VERTICAL_OFFSET; import static com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY; import static com.android.quickstep.views.RecentsView.UPDATE_SYSUI_FLAGS_THRESHOLD; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS; @@ -113,7 +112,6 @@ public class QuickSwitchTouchController extends AbstractStateChangeTouchControll RECENTS_SCALE_PROPERTY.set(mOverviewPanel, QUICK_SWITCH.getOverviewScaleAndOffset(mLauncher)[0] * 0.85f); ADJACENT_PAGE_HORIZONTAL_OFFSET.set(mOverviewPanel, 1f); - ADJACENT_PAGE_VERTICAL_OFFSET.set(mOverviewPanel, 0f); mOverviewPanel.setContentAlpha(1); mCurrentAnimation = mLauncher.getStateManager() diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index c8865c4b3b..f5ddd0e52f 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -23,8 +23,8 @@ import static com.android.quickstep.AbsSwipeUpHandler.RECENTS_ATTACH_DURATION; import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS; import static com.android.quickstep.SysUINavigationMode.getMode; import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_FADE_ANIM; -import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_TRANSLATE_Y_ANIM; -import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_VERTICAL_OFFSET; +import static com.android.quickstep.util.RecentsAtomicAnimationFactory.INDEX_RECENTS_TRANSLATE_X_ANIM; +import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET; import static com.android.quickstep.views.RecentsView.FULLSCREEN_PROGRESS; import static com.android.quickstep.views.RecentsView.RECENTS_SCALE_PROPERTY; import static com.android.quickstep.views.RecentsView.TASK_SECONDARY_TRANSLATION; @@ -461,17 +461,17 @@ public abstract class BaseActivityInterface { } public float[] getOverviewScaleAndOffset(RecentsActivity activity) { - return new float[] { NO_SCALE, NO_OFFSET, NO_OFFSET }; + return new float[] { NO_SCALE, NO_OFFSET }; } /** @@ -170,7 +170,7 @@ public class RecentsState implements BaseState { @Override public float[] getOverviewScaleAndOffset(RecentsActivity activity) { - return new float[] { NO_SCALE, NO_OFFSET, 1 }; + return new float[] { NO_SCALE, 1 }; } } } diff --git a/quickstep/src/com/android/quickstep/util/RecentsAtomicAnimationFactory.java b/quickstep/src/com/android/quickstep/util/RecentsAtomicAnimationFactory.java index c1ca060a60..5c72c8fe26 100644 --- a/quickstep/src/com/android/quickstep/util/RecentsAtomicAnimationFactory.java +++ b/quickstep/src/com/android/quickstep/util/RecentsAtomicAnimationFactory.java @@ -15,7 +15,7 @@ */ package com.android.quickstep.util; -import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_VERTICAL_OFFSET; +import static com.android.quickstep.views.RecentsView.ADJACENT_PAGE_HORIZONTAL_OFFSET; import android.animation.Animator; import android.animation.ObjectAnimator; @@ -31,7 +31,7 @@ public class RecentsAtomicAnimationFactory { public static final int INDEX_RECENTS_FADE_ANIM = AtomicAnimationFactory.NEXT_INDEX + 0; - public static final int INDEX_RECENTS_TRANSLATE_Y_ANIM = AtomicAnimationFactory.NEXT_INDEX + 1; + public static final int INDEX_RECENTS_TRANSLATE_X_ANIM = AtomicAnimationFactory.NEXT_INDEX + 1; private static final int MY_ANIM_COUNT = 2; @@ -48,14 +48,14 @@ public class RecentsAtomicAnimationFactory ADJACENT_PAGE_VERTICAL_OFFSET = - new FloatProperty("adjacentPageVerticalOffset") { - @Override - public void setValue(RecentsView recentsView, float v) { - if (recentsView.mAdjacentPageVerticalOffset != v) { - recentsView.mAdjacentPageVerticalOffset = v; - recentsView.updateVerticalPageOffsets(); - } - } - - @Override - public Float get(RecentsView recentsView) { - return recentsView.mAdjacentPageVerticalOffset; - } - }; - /** * Can be used to tint the color of the RecentsView to simulate a scrim that can views * excluded from. Really should be a proper scrim. @@ -276,8 +260,6 @@ public abstract class RecentsView= 0 - ? -getHorizontalOffsetSize(midpoint - 1, midpoint, offset) + ? getHorizontalOffsetSize(midpoint - 1, midpoint, offset) : 0; float rightOffsetSize = midpoint + 1 < count ? getHorizontalOffsetSize(midpoint + 1, midpoint, offset) @@ -2889,64 +2864,6 @@ public abstract class RecentsView 0) { + if (mAdjacentPageHorizontalOffset > 0) { // Don't dampen the scroll (due to overscroll) if the adjacent tasks are offscreen, so // that the page can move freely given there's no visual indication why it shouldn't. - overScrollShift = (int) Utilities.mapRange(mAdjacentPageVerticalOffset, overScrollShift, - getUndampedOverScrollShift()); + overScrollShift = (int) Utilities.mapRange(mAdjacentPageHorizontalOffset, + overScrollShift, getUndampedOverScrollShift()); } return getScrollForPage(pageIndex) - mOrientationHandler.getPrimaryScroll(this) + overScrollShift; diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index f8be5b63c3..cfac32cb09 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -1133,11 +1133,6 @@ public class TaskView extends FrameLayout implements Reusable { TASK_OFFSET_TRANSLATION_X, TASK_OFFSET_TRANSLATION_Y); } - public FloatProperty getSecondaryTaskOffsetTranslationProperty() { - return getPagedOrientationHandler().getSecondaryValue( - TASK_OFFSET_TRANSLATION_X, TASK_OFFSET_TRANSLATION_Y); - } - public FloatProperty getTaskResistanceTranslationProperty() { return getPagedOrientationHandler().getSecondaryValue( TASK_RESISTANCE_TRANSLATION_X, TASK_RESISTANCE_TRANSLATION_Y); diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 7b67807697..dda2a6fb63 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -2801,7 +2801,7 @@ public class Launcher extends StatefulActivity implements Launche * @see LauncherState#getOverviewScaleAndOffset(Launcher) */ public float[] getNormalOverviewScaleAndOffset() { - return new float[] {NO_SCALE, NO_OFFSET, NO_OFFSET}; + return new float[] {NO_SCALE, NO_OFFSET}; } /** diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java index 8432f4be29..3399ce9cd6 100644 --- a/src/com/android/launcher3/LauncherState.java +++ b/src/com/android/launcher3/LauncherState.java @@ -172,12 +172,10 @@ public abstract class LauncherState implements BaseState { } /** - * Returns an array of three elements. + * Returns an array of two elements. * The first specifies the scale for the overview * The second is the factor ([0, 1], 0 => center-screen; 1 => offscreen) by which overview * should be shifted horizontally. - * The third is the factor ([0, 1], 0 => center-screen; 1 => offscreen) by which overview - * should be shifted vertically. */ public float[] getOverviewScaleAndOffset(Launcher launcher) { return launcher.getNormalOverviewScaleAndOffset();