Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +6 −15 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.graphics.RectF; import android.os.Build; import android.util.Pair; import android.view.MotionEvent; import android.view.View; import android.view.animation.Interpolator; import androidx.annotation.NonNull; Loading Loading @@ -131,6 +130,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten protected boolean mCanceled; protected int mLastStartedTaskId = -1; private boolean mRecentsViewScrollLinked = false; protected BaseSwipeUpHandler(Context context, RecentsAnimationDeviceState deviceState, GestureState gestureState, InputConsumerController inputConsumer, WindowSizeStrategy windowSizeStrategy) { Loading Loading @@ -203,6 +204,7 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten runOnRecentsAnimationStart(() -> mRecentsView.setRecentsAnimationTargets(mRecentsAnimationController, mRecentsAnimationTargets)); mRecentsViewScrollLinked = true; } protected void startNewTask(Consumer<Boolean> resultCallback) { Loading Loading @@ -329,19 +331,6 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten : mRecentsView.getRunningTaskIndex(); } private Rect getStackBounds(DeviceProfile dp) { if (mActivity != null) { int loc[] = new int[2]; View rootView = mActivity.getRootView(); rootView.getLocationOnScreen(loc); return new Rect(loc[0], loc[1], loc[0] + rootView.getWidth(), loc[1] + rootView.getHeight()); } else { return new Rect(dp.windowX, dp.windowY, dp.windowX + dp.widthPx, dp.windowY + dp.heightPx); } } protected void initTransitionEndpoints(DeviceProfile dp) { mDp = dp; Loading Loading @@ -440,7 +429,9 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten mWindowTransitionController.setPlayFraction(progress); mTransformParams.setTargetSet(mRecentsAnimationTargets); mTaskViewSimulator.setScroll(mRecentsView == null ? 0 : mRecentsView.getScrollOffset()); if (mRecentsViewScrollLinked) { mTaskViewSimulator.setScroll(mRecentsView.getScrollOffset()); } mTaskViewSimulator.apply(mTransformParams); } } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,6 @@ public class LauncherSwipeHandler extends BaseSwipeUpHandler<Launcher, RecentsVi mRecentsView = activity.getOverviewPanel(); mRecentsView.setOnPageTransitionEndCallback(null); linkRecentsViewScroll(); addLiveTileOverlay(); mStateCallback.setState(STATE_LAUNCHER_PRESENT); Loading @@ -312,6 +311,8 @@ public class LauncherSwipeHandler extends BaseSwipeUpHandler<Launcher, RecentsVi // so we need to kick off switching to the overview predictions as soon as possible mActivityInterface.updateOverviewPredictionState(); } linkRecentsViewScroll(); return true; } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +3 −10 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.quickstep.views; import static android.view.Surface.ROTATION_0; import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS; import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; Loading Loading @@ -132,7 +133,6 @@ import com.android.systemui.shared.recents.IPinnedStackAnimationListener; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.ConfigurationCompat; import com.android.systemui.shared.system.LauncherEventUtil; import com.android.systemui.shared.system.PackageManagerWrapper; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat; Loading Loading @@ -1689,7 +1689,8 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl } int count = getChildCount(); TaskView runningTask = mRunningTaskId == -1 ? null : getTaskView(mRunningTaskId); TaskView runningTask = mRunningTaskId == -1 || !mRunningTaskTileHidden ? null : getTaskView(mRunningTaskId); int midPoint = runningTask == null ? -1 : indexOfChild(runningTask); int currentPage = getCurrentPage(); Loading Loading @@ -2066,14 +2067,6 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl return getScrollForPage(getRunningTaskIndex()) - mOrientationHandler.getPrimaryScroll(this); } /** * @return How many pixels the running task is offset on the x-axis due to the current scrollX * and parent scale. */ public float getScrollOffsetScaled() { return getScrollOffset() * mOrientationHandler.getPrimaryScale(this); } public Consumer<MotionEvent> getEventDispatcher(float navbarRotation) { float degreesRotated; if (navbarRotation == 0) { Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +6 −15 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ import android.graphics.RectF; import android.os.Build; import android.util.Pair; import android.view.MotionEvent; import android.view.View; import android.view.animation.Interpolator; import androidx.annotation.NonNull; Loading Loading @@ -131,6 +130,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten protected boolean mCanceled; protected int mLastStartedTaskId = -1; private boolean mRecentsViewScrollLinked = false; protected BaseSwipeUpHandler(Context context, RecentsAnimationDeviceState deviceState, GestureState gestureState, InputConsumerController inputConsumer, WindowSizeStrategy windowSizeStrategy) { Loading Loading @@ -203,6 +204,7 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten runOnRecentsAnimationStart(() -> mRecentsView.setRecentsAnimationTargets(mRecentsAnimationController, mRecentsAnimationTargets)); mRecentsViewScrollLinked = true; } protected void startNewTask(Consumer<Boolean> resultCallback) { Loading Loading @@ -329,19 +331,6 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten : mRecentsView.getRunningTaskIndex(); } private Rect getStackBounds(DeviceProfile dp) { if (mActivity != null) { int loc[] = new int[2]; View rootView = mActivity.getRootView(); rootView.getLocationOnScreen(loc); return new Rect(loc[0], loc[1], loc[0] + rootView.getWidth(), loc[1] + rootView.getHeight()); } else { return new Rect(dp.windowX, dp.windowY, dp.windowX + dp.widthPx, dp.windowY + dp.heightPx); } } protected void initTransitionEndpoints(DeviceProfile dp) { mDp = dp; Loading Loading @@ -440,7 +429,9 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten mWindowTransitionController.setPlayFraction(progress); mTransformParams.setTargetSet(mRecentsAnimationTargets); mTaskViewSimulator.setScroll(mRecentsView == null ? 0 : mRecentsView.getScrollOffset()); if (mRecentsViewScrollLinked) { mTaskViewSimulator.setScroll(mRecentsView.getScrollOffset()); } mTaskViewSimulator.apply(mTransformParams); } } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherSwipeHandler.java +2 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,6 @@ public class LauncherSwipeHandler extends BaseSwipeUpHandler<Launcher, RecentsVi mRecentsView = activity.getOverviewPanel(); mRecentsView.setOnPageTransitionEndCallback(null); linkRecentsViewScroll(); addLiveTileOverlay(); mStateCallback.setState(STATE_LAUNCHER_PRESENT); Loading @@ -312,6 +311,8 @@ public class LauncherSwipeHandler extends BaseSwipeUpHandler<Launcher, RecentsVi // so we need to kick off switching to the overview predictions as soon as possible mActivityInterface.updateOverviewPredictionState(); } linkRecentsViewScroll(); return true; } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +3 −10 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.quickstep.views; import static android.view.Surface.ROTATION_0; import static com.android.launcher3.BaseActivity.STATE_HANDLER_INVISIBILITY_FLAGS; import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS; import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY; Loading Loading @@ -132,7 +133,6 @@ import com.android.systemui.shared.recents.IPinnedStackAnimationListener; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.model.ThumbnailData; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.ConfigurationCompat; import com.android.systemui.shared.system.LauncherEventUtil; import com.android.systemui.shared.system.PackageManagerWrapper; import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat; Loading Loading @@ -1689,7 +1689,8 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl } int count = getChildCount(); TaskView runningTask = mRunningTaskId == -1 ? null : getTaskView(mRunningTaskId); TaskView runningTask = mRunningTaskId == -1 || !mRunningTaskTileHidden ? null : getTaskView(mRunningTaskId); int midPoint = runningTask == null ? -1 : indexOfChild(runningTask); int currentPage = getCurrentPage(); Loading Loading @@ -2066,14 +2067,6 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl return getScrollForPage(getRunningTaskIndex()) - mOrientationHandler.getPrimaryScroll(this); } /** * @return How many pixels the running task is offset on the x-axis due to the current scrollX * and parent scale. */ public float getScrollOffsetScaled() { return getScrollOffset() * mOrientationHandler.getPrimaryScale(this); } public Consumer<MotionEvent> getEventDispatcher(float navbarRotation) { float degreesRotated; if (navbarRotation == 0) { Loading