Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +10 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.Launcher; import com.android.launcher3.Utilities; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.util.LayoutUtils; Loading Loading @@ -69,8 +68,16 @@ public class BackgroundAppState extends OverviewState { if (taskCount == 0) { return super.getOverviewScaleAndTranslation(launcher); } TaskView dummyTask = recentsView.getTaskViewAt(Utilities.boundToRange( recentsView.getCurrentPage(), 0, taskCount - 1)); TaskView dummyTask; if (recentsView.getCurrentPage() >= 0) { if (recentsView.getCurrentPage() <= taskCount - 1) { dummyTask = recentsView.getCurrentPageTaskView(); } else { dummyTask = recentsView.getTaskViewAt(taskCount - 1); } } else { dummyTask = recentsView.getTaskViewAt(0); } return recentsView.getTempClipAnimationHelper().updateForFullscreenOverview(dummyTask) .getScaleAndTranslation(); } Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -47,9 +47,9 @@ public final class PortraitOverviewStateTouchHelper { * @return true if we should intercept the motion event */ boolean canInterceptTouch(MotionEvent ev) { if (mRecentsView.getChildCount() > 0) { if (mRecentsView.getTaskViewCount() > 0) { // Allow swiping up in the gap between the hotseat and overview. return ev.getY() >= mRecentsView.getChildAt(0).getBottom(); return ev.getY() >= mRecentsView.getTaskViewAt(0).getBottom(); } else { // If there are no tasks, we only intercept if we're below the hotseat height. return isTouchOverHotseat(mLauncher, ev); Loading @@ -63,7 +63,7 @@ public final class PortraitOverviewStateTouchHelper { * @return true if going back should take the user to the currently running task */ boolean shouldSwipeDownReturnToApp() { TaskView taskView = mRecentsView.getTaskViewAt(mRecentsView.getNextPage()); TaskView taskView = mRecentsView.getNextPageTaskView(); return taskView != null && mRecentsView.shouldSwipeDownLaunchApp(); } Loading @@ -76,7 +76,7 @@ public final class PortraitOverviewStateTouchHelper { */ PendingAnimation createSwipeDownToTaskAppAnimation(long duration) { mRecentsView.setCurrentPage(mRecentsView.getPageNearestToCenterOfScreen()); TaskView taskView = mRecentsView.getTaskViewAt(mRecentsView.getCurrentPage()); TaskView taskView = mRecentsView.getCurrentPageTaskView(); if (taskView == null) { throw new IllegalStateException("There is no task view to animate to."); } Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +0 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.SysUINavigationMode.Mode; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import com.android.systemui.shared.system.QuickStepContract; /** * Handles quick switching to a recent task from the home screen. Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -227,10 +227,10 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten // Launch the task user scrolled to (mRecentsView.getNextPage()). if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { // We finish recents animation inside launchTask() when live tile is enabled. mRecentsView.getTaskViewAt(mRecentsView.getNextPage()).launchTask(false /* animate */, mRecentsView.getNextPageTaskView().launchTask(false /* animate */, true /* freezeTaskList */); } else { int taskId = mRecentsView.getTaskViewAt(mRecentsView.getNextPage()).getTask().key.id; int taskId = mRecentsView.getNextPageTaskView().getTask().key.id; mFinishingRecentsAnimationForNewTaskId = taskId; mRecentsAnimationWrapper.finish(true /* toRecents */, () -> { if (!mCanceled) { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +3 −4 Original line number Diff line number Diff line Loading @@ -268,7 +268,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe INDEX_RECENTS_FADE_ANIM, attached ? 1 : 0); int runningTaskIndex = recentsView.getRunningTaskIndex(); if (runningTaskIndex == 0) { if (runningTaskIndex == recentsView.getTaskViewStartIndex()) { // If we are on the first task (we haven't quick switched), translate recents in // from the side. Calculate the start translation based on current scale/scroll. float currScale = recentsView.getScaleX(); Loading Loading @@ -351,8 +351,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe private void playScaleDownAnim(AnimatorSet anim, Launcher launcher, LauncherState fromState, LauncherState endState) { RecentsView recentsView = launcher.getOverviewPanel(); TaskView v = recentsView.getTaskViewAt(recentsView.getCurrentPage()); if (v == null) { if (recentsView.getCurrentPageTaskView() == null) { return; } Loading Loading @@ -380,7 +379,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe // recents as a whole needs to translate further to keep up with the app window. TaskView runningTaskView = recentsView.getRunningTaskView(); if (runningTaskView == null) { runningTaskView = recentsView.getTaskViewAt(recentsView.getCurrentPage()); runningTaskView = recentsView.getCurrentPageTaskView(); } TimeInterpolator oldInterpolator = translateY.getInterpolator(); Rect fallbackInsets = launcher.getDeviceProfile().getInsets(); Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/states/BackgroundAppState.java +10 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS; import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.Launcher; import com.android.launcher3.Utilities; import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.userevent.nano.LauncherLogProto; import com.android.quickstep.util.LayoutUtils; Loading Loading @@ -69,8 +68,16 @@ public class BackgroundAppState extends OverviewState { if (taskCount == 0) { return super.getOverviewScaleAndTranslation(launcher); } TaskView dummyTask = recentsView.getTaskViewAt(Utilities.boundToRange( recentsView.getCurrentPage(), 0, taskCount - 1)); TaskView dummyTask; if (recentsView.getCurrentPage() >= 0) { if (recentsView.getCurrentPage() <= taskCount - 1) { dummyTask = recentsView.getCurrentPageTaskView(); } else { dummyTask = recentsView.getTaskViewAt(taskCount - 1); } } else { dummyTask = recentsView.getTaskViewAt(0); } return recentsView.getTempClipAnimationHelper().updateForFullscreenOverview(dummyTask) .getScaleAndTranslation(); } Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/PortraitOverviewStateTouchHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -47,9 +47,9 @@ public final class PortraitOverviewStateTouchHelper { * @return true if we should intercept the motion event */ boolean canInterceptTouch(MotionEvent ev) { if (mRecentsView.getChildCount() > 0) { if (mRecentsView.getTaskViewCount() > 0) { // Allow swiping up in the gap between the hotseat and overview. return ev.getY() >= mRecentsView.getChildAt(0).getBottom(); return ev.getY() >= mRecentsView.getTaskViewAt(0).getBottom(); } else { // If there are no tasks, we only intercept if we're below the hotseat height. return isTouchOverHotseat(mLauncher, ev); Loading @@ -63,7 +63,7 @@ public final class PortraitOverviewStateTouchHelper { * @return true if going back should take the user to the currently running task */ boolean shouldSwipeDownReturnToApp() { TaskView taskView = mRecentsView.getTaskViewAt(mRecentsView.getNextPage()); TaskView taskView = mRecentsView.getNextPageTaskView(); return taskView != null && mRecentsView.shouldSwipeDownLaunchApp(); } Loading @@ -76,7 +76,7 @@ public final class PortraitOverviewStateTouchHelper { */ PendingAnimation createSwipeDownToTaskAppAnimation(long duration) { mRecentsView.setCurrentPage(mRecentsView.getPageNearestToCenterOfScreen()); TaskView taskView = mRecentsView.getTaskViewAt(mRecentsView.getCurrentPage()); TaskView taskView = mRecentsView.getCurrentPageTaskView(); if (taskView == null) { throw new IllegalStateException("There is no task view to animate to."); } Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/touchcontrollers/QuickSwitchTouchController.java +0 −1 Original line number Diff line number Diff line Loading @@ -50,7 +50,6 @@ import com.android.quickstep.SysUINavigationMode; import com.android.quickstep.SysUINavigationMode.Mode; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import com.android.systemui.shared.system.QuickStepContract; /** * Handles quick switching to a recent task from the home screen. Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -227,10 +227,10 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten // Launch the task user scrolled to (mRecentsView.getNextPage()). if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { // We finish recents animation inside launchTask() when live tile is enabled. mRecentsView.getTaskViewAt(mRecentsView.getNextPage()).launchTask(false /* animate */, mRecentsView.getNextPageTaskView().launchTask(false /* animate */, true /* freezeTaskList */); } else { int taskId = mRecentsView.getTaskViewAt(mRecentsView.getNextPage()).getTask().key.id; int taskId = mRecentsView.getNextPageTaskView().getTask().key.id; mFinishingRecentsAnimationForNewTaskId = taskId; mRecentsAnimationWrapper.finish(true /* toRecents */, () -> { if (!mCanceled) { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +3 −4 Original line number Diff line number Diff line Loading @@ -268,7 +268,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe INDEX_RECENTS_FADE_ANIM, attached ? 1 : 0); int runningTaskIndex = recentsView.getRunningTaskIndex(); if (runningTaskIndex == 0) { if (runningTaskIndex == recentsView.getTaskViewStartIndex()) { // If we are on the first task (we haven't quick switched), translate recents in // from the side. Calculate the start translation based on current scale/scroll. float currScale = recentsView.getScaleX(); Loading Loading @@ -351,8 +351,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe private void playScaleDownAnim(AnimatorSet anim, Launcher launcher, LauncherState fromState, LauncherState endState) { RecentsView recentsView = launcher.getOverviewPanel(); TaskView v = recentsView.getTaskViewAt(recentsView.getCurrentPage()); if (v == null) { if (recentsView.getCurrentPageTaskView() == null) { return; } Loading Loading @@ -380,7 +379,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe // recents as a whole needs to translate further to keep up with the app window. TaskView runningTaskView = recentsView.getRunningTaskView(); if (runningTaskView == null) { runningTaskView = recentsView.getTaskViewAt(recentsView.getCurrentPage()); runningTaskView = recentsView.getCurrentPageTaskView(); } TimeInterpolator oldInterpolator = translateY.getInterpolator(); Rect fallbackInsets = launcher.getDeviceProfile().getInsets(); Loading