Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +23 −5 Original line number Diff line number Diff line Loading @@ -60,6 +60,8 @@ import static com.android.launcher3.testing.shared.TestProtocol.QUICK_SWITCH_STA import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN; import static com.android.launcher3.util.DisplayController.CHANGE_NAVIGATION_MODE; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.QUICK_SWITCH_FROM_HOME_FAILED; import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.QUICK_SWITCH_FROM_HOME_FALLBACK; import static com.android.quickstep.util.AnimUtils.completeRunnableListCallback; import static com.android.quickstep.util.SplitAnimationTimings.TABLET_HOME_TO_SPLIT; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY; Loading Loading @@ -172,6 +174,7 @@ import com.android.quickstep.RecentsModel; import com.android.quickstep.SystemUiProxy; import com.android.quickstep.TaskUtils; import com.android.quickstep.TouchInteractionService.TISBinder; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.AsyncClockEventDelegate; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.LauncherUnfoldAnimationController; Loading @@ -198,8 +201,6 @@ import com.android.systemui.unfold.dagger.UnfoldMain; import com.android.systemui.unfold.progress.RemoteUnfoldTransitionReceiver; import com.android.systemui.unfold.updates.RotationChangeProvider; import kotlin.Unit; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; Loading @@ -212,6 +213,8 @@ import java.util.function.BiConsumer; import java.util.function.Predicate; import java.util.stream.Stream; import kotlin.Unit; public class QuickstepLauncher extends Launcher implements RecentsViewContainer { private static final boolean TRACE_LAYOUTS = SystemProperties.getBoolean("persist.debug.trace_layouts", false); Loading Loading @@ -581,9 +584,19 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer } case QUICK_SWITCH_STATE_ORDINAL: { RecentsView rv = getOverviewPanel(); TaskView tasktolaunch = rv.getCurrentPageTaskView(); if (tasktolaunch != null) { tasktolaunch.launchTask(success -> { TaskView currentPageTask = rv.getCurrentPageTaskView(); TaskView fallbackTask = rv.getTaskViewAt(0); if (currentPageTask != null || fallbackTask != null) { TaskView taskToLaunch = currentPageTask; if (currentPageTask == null) { taskToLaunch = fallbackTask; ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( "Quick switch from home fallback case: The TaskView at index ") .append(rv.getCurrentPage()) .append(" is missing."), QUICK_SWITCH_FROM_HOME_FALLBACK); } taskToLaunch.launchTask(success -> { if (!success) { getStateManager().goToState(OVERVIEW); } else { Loading @@ -592,6 +605,11 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer return Unit.INSTANCE; }); } else { ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( "Quick switch from home failed: TaskViews at indices ") .append(rv.getCurrentPage()) .append(" and 0 are missing."), QUICK_SWITCH_FROM_HOME_FAILED); getStateManager().goToState(NORMAL); } break; Loading quickstep/src/com/android/quickstep/util/ActiveGestureErrorDetector.java +17 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class ActiveGestureErrorDetector { SCROLLER_ANIMATION_ABORTED, TASK_APPEARED, EXPECTING_TASK_APPEARED, FLAG_USING_OTHER_ACTIVITY_INPUT_CONSUMER, LAUNCHER_DESTROYED, RECENT_TASKS_MISSING, INVALID_VELOCITY_ON_SWIPE_UP, RECENTS_ANIMATION_START_PENDING, QUICK_SWITCH_FROM_HOME_FALLBACK, QUICK_SWITCH_FROM_HOME_FAILED, /** * These GestureEvents are specifically associated to state flags that get set in Loading Loading @@ -282,6 +283,22 @@ public class ActiveGestureErrorDetector { + " animation is still pending.", writer); break; case QUICK_SWITCH_FROM_HOME_FALLBACK: errorDetected |= printErrorIfTrue( true, prefix, /* errorMessage= */ "Quick switch from home fallback case: the " + "TaskView at the current page index was missing.", writer); break; case QUICK_SWITCH_FROM_HOME_FAILED: errorDetected |= printErrorIfTrue( true, prefix, /* errorMessage= */ "Quick switch from home failed: the TaskViews at " + "the current page index and index 0 were missing.", writer); break; case EXPECTING_TASK_APPEARED: case MOTION_DOWN: case SET_END_TARGET: Loading Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +23 −5 Original line number Diff line number Diff line Loading @@ -60,6 +60,8 @@ import static com.android.launcher3.testing.shared.TestProtocol.QUICK_SWITCH_STA import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN; import static com.android.launcher3.util.DisplayController.CHANGE_NAVIGATION_MODE; import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR; import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.QUICK_SWITCH_FROM_HOME_FAILED; import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.QUICK_SWITCH_FROM_HOME_FALLBACK; import static com.android.quickstep.util.AnimUtils.completeRunnableListCallback; import static com.android.quickstep.util.SplitAnimationTimings.TABLET_HOME_TO_SPLIT; import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY; Loading Loading @@ -172,6 +174,7 @@ import com.android.quickstep.RecentsModel; import com.android.quickstep.SystemUiProxy; import com.android.quickstep.TaskUtils; import com.android.quickstep.TouchInteractionService.TISBinder; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.AsyncClockEventDelegate; import com.android.quickstep.util.GroupTask; import com.android.quickstep.util.LauncherUnfoldAnimationController; Loading @@ -198,8 +201,6 @@ import com.android.systemui.unfold.dagger.UnfoldMain; import com.android.systemui.unfold.progress.RemoteUnfoldTransitionReceiver; import com.android.systemui.unfold.updates.RotationChangeProvider; import kotlin.Unit; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; Loading @@ -212,6 +213,8 @@ import java.util.function.BiConsumer; import java.util.function.Predicate; import java.util.stream.Stream; import kotlin.Unit; public class QuickstepLauncher extends Launcher implements RecentsViewContainer { private static final boolean TRACE_LAYOUTS = SystemProperties.getBoolean("persist.debug.trace_layouts", false); Loading Loading @@ -581,9 +584,19 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer } case QUICK_SWITCH_STATE_ORDINAL: { RecentsView rv = getOverviewPanel(); TaskView tasktolaunch = rv.getCurrentPageTaskView(); if (tasktolaunch != null) { tasktolaunch.launchTask(success -> { TaskView currentPageTask = rv.getCurrentPageTaskView(); TaskView fallbackTask = rv.getTaskViewAt(0); if (currentPageTask != null || fallbackTask != null) { TaskView taskToLaunch = currentPageTask; if (currentPageTask == null) { taskToLaunch = fallbackTask; ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( "Quick switch from home fallback case: The TaskView at index ") .append(rv.getCurrentPage()) .append(" is missing."), QUICK_SWITCH_FROM_HOME_FALLBACK); } taskToLaunch.launchTask(success -> { if (!success) { getStateManager().goToState(OVERVIEW); } else { Loading @@ -592,6 +605,11 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer return Unit.INSTANCE; }); } else { ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( "Quick switch from home failed: TaskViews at indices ") .append(rv.getCurrentPage()) .append(" and 0 are missing."), QUICK_SWITCH_FROM_HOME_FAILED); getStateManager().goToState(NORMAL); } break; Loading
quickstep/src/com/android/quickstep/util/ActiveGestureErrorDetector.java +17 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public class ActiveGestureErrorDetector { SCROLLER_ANIMATION_ABORTED, TASK_APPEARED, EXPECTING_TASK_APPEARED, FLAG_USING_OTHER_ACTIVITY_INPUT_CONSUMER, LAUNCHER_DESTROYED, RECENT_TASKS_MISSING, INVALID_VELOCITY_ON_SWIPE_UP, RECENTS_ANIMATION_START_PENDING, QUICK_SWITCH_FROM_HOME_FALLBACK, QUICK_SWITCH_FROM_HOME_FAILED, /** * These GestureEvents are specifically associated to state flags that get set in Loading Loading @@ -282,6 +283,22 @@ public class ActiveGestureErrorDetector { + " animation is still pending.", writer); break; case QUICK_SWITCH_FROM_HOME_FALLBACK: errorDetected |= printErrorIfTrue( true, prefix, /* errorMessage= */ "Quick switch from home fallback case: the " + "TaskView at the current page index was missing.", writer); break; case QUICK_SWITCH_FROM_HOME_FAILED: errorDetected |= printErrorIfTrue( true, prefix, /* errorMessage= */ "Quick switch from home failed: the TaskViews at " + "the current page index and index 0 were missing.", writer); break; case EXPECTING_TASK_APPEARED: case MOTION_DOWN: case SET_END_TARGET: Loading