Merge "Fix missing screenshots on rotate from recents view select state" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-10-19 03:48:11 +00:00
committed by Android (Google) Code Review
3 changed files with 9 additions and 14 deletions

View File

@@ -200,13 +200,12 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
}
@Override
public void setModalStateEnabled(boolean isModalState) {
super.setModalStateEnabled(isModalState);
public void setModalStateEnabled(boolean isModalState, boolean animate) {
if (isModalState) {
mActivity.getStateManager().goToState(RecentsState.MODAL_TASK);
mActivity.getStateManager().goToState(RecentsState.MODAL_TASK, animate);
} else {
if (mActivity.isInState(RecentsState.MODAL_TASK)) {
mActivity.getStateManager().goToState(DEFAULT);
mActivity.getStateManager().goToState(DEFAULT, animate);
resetModalVisuals();
}
}

View File

@@ -162,13 +162,12 @@ public class LauncherRecentsView extends RecentsView<QuickstepLauncher, Launcher
}
@Override
public void setModalStateEnabled(boolean isModalState) {
super.setModalStateEnabled(isModalState);
public void setModalStateEnabled(boolean isModalState, boolean animate) {
if (isModalState) {
mActivity.getStateManager().goToState(LauncherState.OVERVIEW_MODAL_TASK);
mActivity.getStateManager().goToState(LauncherState.OVERVIEW_MODAL_TASK, animate);
} else {
if (mActivity.isInState(LauncherState.OVERVIEW_MODAL_TASK)) {
mActivity.getStateManager().goToState(LauncherState.OVERVIEW);
mActivity.getStateManager().goToState(LauncherState.OVERVIEW, animate);
resetModalVisuals();
}
}

View File

@@ -1760,7 +1760,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
private void onOrientationChanged() {
// If overview is in modal state when rotate, reset it to overview state without running
// animation.
setModalStateEnabled(false);
setModalStateEnabled(/* isModalState= */ false, /* animate= */ false);
if (isSplitSelectionActive()) {
onRotateInSplitSelectionState();
}
@@ -5198,11 +5198,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
setInsets(mInsets);
}
/**
* Enables or disables modal state for RecentsView
* @param isModalState
*/
public void setModalStateEnabled(boolean isModalState) { }
/** Enables or disables modal state for RecentsView */
public abstract void setModalStateEnabled(boolean isModalState, boolean animate);
public TaskOverlayFactory getTaskOverlayFactory() {
return mTaskOverlayFactory;