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

Commit c70f4652 authored by Josh's avatar Josh
Browse files

Removed switch focus in splitscreen shortcuts

Removed shortcuts for switching to app on left/right while in
splitscreen mode.

Test: Manual - ensure shortcuts do not show up in shortcut helper
Flag: com.android.systemui.keyboard_shortcut_helper_rewrite
Fix: 380227723
Change-Id: Idbf777d75095ed3fefdd96fe1fb4e722688e23e2
parent 7372f968
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import com.android.systemui.keyboard.shortcut.shared.model.KeyCombination
import com.android.systemui.keyboard.shortcut.shared.model.Shortcut
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategory
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.AppCategories
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.MultiTasking
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCategoryType.System
import com.android.systemui.keyboard.shortcut.shared.model.ShortcutCommand
@@ -550,21 +549,11 @@ object TestShortcuts {
                "Split screen",
                "Use split screen with app on the left",
            ),
            simpleShortcutCategory(
                MultiTasking,
                "Split screen",
                "Switch to app on left or above while using split screen",
            ),
            simpleShortcutCategory(
                MultiTasking,
                "Split screen",
                "Use split screen with app on the right",
            ),
            simpleShortcutCategory(
                MultiTasking,
                "Split screen",
                "Switch to app on right or below while using split screen",
            ),
            simpleShortcutCategory(System, "System controls", "Show shortcuts"),
            simpleShortcutCategory(System, "System controls", "View recent apps"),
        )
@@ -594,15 +583,9 @@ object TestShortcuts {
            simpleInputGestureData(
                keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_LEFT
            ),
            simpleInputGestureData(
                keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_LEFT
            ),
            simpleInputGestureData(
                keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_RIGHT
            ),
            simpleInputGestureData(
                keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_RIGHT
            ),
            simpleInputGestureData(
                keyGestureType = KeyGestureEvent.KEY_GESTURE_TYPE_OPEN_SHORTCUT_HELPER
            ),
+0 −4
Original line number Diff line number Diff line
@@ -136,10 +136,6 @@ class InputGestureMaps @Inject constructor(private val context: Context) {
            KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_LEFT to R.string.system_multitasking_lhs,
            KEY_GESTURE_TYPE_SPLIT_SCREEN_NAVIGATION_RIGHT to R.string.system_multitasking_rhs,
            KEY_GESTURE_TYPE_MULTI_WINDOW_NAVIGATION to R.string.system_multitasking_full_screen,
            KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_LEFT to
                R.string.system_multitasking_splitscreen_focus_lhs,
            KEY_GESTURE_TYPE_CHANGE_SPLITSCREEN_FOCUS_RIGHT to
                R.string.system_multitasking_splitscreen_focus_rhs,
        )

    val shortcutLabelToKeyGestureTypeMap: Map<String, Int>
+0 −15
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ import android.view.KeyEvent.KEYCODE_EQUALS
import android.view.KeyEvent.KEYCODE_LEFT_BRACKET
import android.view.KeyEvent.KEYCODE_MINUS
import android.view.KeyEvent.KEYCODE_RIGHT_BRACKET
import android.view.KeyEvent.META_ALT_ON
import android.view.KeyEvent.META_CTRL_ON
import android.view.KeyEvent.META_META_ON
import android.view.KeyboardShortcutGroup
@@ -74,20 +73,6 @@ constructor(@Main private val resources: Resources, @Application private val con
                command(META_META_ON or META_CTRL_ON, KEYCODE_DPAD_UP)
            }
        )
        //  Change split screen focus to RHS:
        //   - Meta + Alt + Right arrow
        add(
            shortcutInfo(resources.getString(R.string.system_multitasking_splitscreen_focus_rhs)) {
                command(META_META_ON or META_ALT_ON, KEYCODE_DPAD_RIGHT)
            }
        )
        //  Change split screen focus to LHS:
        //   - Meta + Alt + Left arrow
        add(
            shortcutInfo(resources.getString(R.string.system_multitasking_splitscreen_focus_lhs)) {
                command(META_META_ON or META_ALT_ON, KEYCODE_DPAD_LEFT)
            }
        )
        if (enableMoveToNextDisplayShortcut()) {
            // Move a window to the next display:
            //  - Meta + Ctrl + D