Allows Launcher to recover gracefully into OverviewSplitSelect state
When Launcher restarts (as the result of a UiModeChange or something else), it attempts to recover its previous state. However, the OverviewSplitSelect state is unique because it requires some additional information to recover properly (the taskId of the staged task and so on). This change makes it so that the relevant information is passed forward in the recovery bundle. Launcher will now restart in the base Overview state, and then immediately apply the saved data to recover the OverviewSplitSelect state. Fixes: 233019928 Test: Manual Change-Id: Ie6123ef9c374be000268f82857b696c49213c541 Merged-In: Ie6123ef9c374be000268f82857b696c49213c541
This commit is contained in:
@@ -39,6 +39,7 @@ import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.popup.QuickstepSystemShortcut;
|
||||
import com.android.launcher3.statehandlers.DepthController;
|
||||
import com.android.launcher3.statemanager.StateManager.StateListener;
|
||||
import com.android.launcher3.util.PendingSplitSelectInfo;
|
||||
import com.android.launcher3.util.SplitConfigurationOptions;
|
||||
import com.android.quickstep.LauncherActivityInterface;
|
||||
import com.android.quickstep.util.SplitSelectStateController;
|
||||
@@ -88,6 +89,21 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun
|
||||
super.onTaskLaunchAnimationEnd(success);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTaskIconChanged(int taskId) {
|
||||
// If Launcher needs to return to split select state, do it now, after the icon has updated.
|
||||
if (mActivity.hasPendingSplitSelectInfo()) {
|
||||
PendingSplitSelectInfo recoveryData = mActivity.getPendingSplitSelectInfo();
|
||||
if (recoveryData.getStagedTaskId() == taskId) {
|
||||
initiateSplitSelect(
|
||||
getTaskViewByTaskId(recoveryData.getStagedTaskId()),
|
||||
recoveryData.getStagePosition()
|
||||
);
|
||||
mActivity.finishSplitSelectRecovery();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
|
||||
Reference in New Issue
Block a user