Handle split select rotation

- Update floatingTaskView, apply splitsSelectTranslation and splitPrimaryScorllOffest when rotating while in split select
- Moved getSplitSelectTranslation to RecentsView
- When in portrait, treat STAGE_POSITION_BOTTOM_OR_RIGHT as STAGE_POSITION_TOP_OR_LEFT in split translation calculation
- Apply splitsSelectTranslation for portrait grid too

Fix: 201721153
Test: manual
Change-Id: I768a3b15de4d434674058b274c368798f5852917
This commit is contained in:
Alex Chau
2021-12-06 18:53:26 +00:00
parent 57b9c472dc
commit 86ef5e924a
8 changed files with 68 additions and 24 deletions
@@ -24,7 +24,6 @@ import static com.android.launcher3.LauncherState.SPRING_LOADED;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Build;
import android.util.AttributeSet;
import android.view.MotionEvent;
@@ -171,10 +170,13 @@ public class LauncherRecentsView extends RecentsView<BaseQuickstepLauncher, Laun
}
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
protected void onOrientationChanged() {
super.onOrientationChanged();
// If overview is in modal state when rotate, reset it to overview state without running
// animation.
setModalStateEnabled(false);
if (mActivity.isInState(OVERVIEW_SPLIT_SELECT)) {
onRotateInSplitSelectionState();
}
}
}