Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 396c9596 authored by Alex Chau's avatar Alex Chau Committed by Android Build Coastguard Worker
Browse files

Disable Select mode from Menu in fake landscape

Fix: 349072279
Test: Verify that Select mode is only available from Menu in grid only Overview on tablets
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2026c800165865b3323f449a2d9cda22e9231598)
Merged-In: Icd0d8303547b45d3653696812c51ce2c2bfd410b
Change-Id: Icd0d8303547b45d3653696812c51ce2c2bfd410b
parent 35f30f2e
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -492,19 +492,9 @@ public interface TaskShortcutFactory {
                TaskContainer taskContainer) {
            boolean isTablet = container.getDeviceProfile().isTablet;
            boolean isGridOnlyOverview = isTablet && Flags.enableGridOnlyOverview();
            // Extra conditions if it's not grid-only overview
            if (!isGridOnlyOverview) {
                RecentsOrientedState orientedState = taskContainer.getTaskView().getOrientedState();
                boolean isFakeLandscape = !orientedState.isRecentsActivityRotationAllowed()
                        && orientedState.getTouchRotation() != ROTATION_0;
                if (!isFakeLandscape) {
                    return null;
                }
                // Disallow "Select" when swiping up from landscape due to rotated thumbnail.
                if (orientedState.getDisplayRotation() != ROTATION_0) {
                return null;
            }
            }

            SystemShortcut modalStateSystemShortcut =
                    taskContainer.getOverlay().getModalStateSystemShortcut(