mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 10:26:52 +00:00
Merge "Fix missing screenshots on rotate from recents view select state" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a473ff6c23
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user