Loading packages/SystemUI/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2013,6 +2013,10 @@ <string name="system_multitasking_lhs">Enter split screen with current app to LHS</string> <!-- User visible title for the keyboard shortcut that switches from split screen to full screen [CHAR LIMIT=70] --> <string name="system_multitasking_full_screen">Switch from split screen to full screen</string> <!-- User visible title for the keyboard shortcut that switches to app on right or below while using split screen [CHAR LIMIT=70] --> <string name="system_multitasking_splitscreen_focus_rhs">Switch to app on right or below while using split screen</string> <!-- User visible title for the keyboard shortcut that switches to app on left or above while using split screen [CHAR LIMIT=70] --> <string name="system_multitasking_splitscreen_focus_lhs">Switch to app on left or above while using split screen</string> <!-- User visible title for the keyboard shortcut that replaces an app from one to another during split screen [CHAR LIMIT=70] --> <string name="system_multitasking_replace">During split screen: replace an app from one to another</string> Loading packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java +32 −25 Original line number Diff line number Diff line Loading @@ -631,32 +631,39 @@ public final class KeyboardShortcutListSearch { // Enter Split screen with current app to RHS: Meta + Ctrl + Right arrow // Enter Split screen with current app to LHS: Meta + Ctrl + Left arrow // Switch from Split screen to full screen: Meta + Ctrl + Up arrow String[] shortcutLabels = { context.getString(R.string.system_multitasking_rhs), context.getString(R.string.system_multitasking_lhs), context.getString(R.string.system_multitasking_full_screen), }; int[] keyCodes = { // Change split screen focus to RHS: Meta + Alt + Right arrow // Change split screen focus to LHS: Meta + Alt + Left arrow systemMultitaskingGroup.addItem( getMultitaskingShortcut(context.getString(R.string.system_multitasking_rhs), KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut(context.getString(R.string.system_multitasking_lhs), KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut(context.getString(R.string.system_multitasking_full_screen), KeyEvent.KEYCODE_DPAD_UP, }; KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut( context.getString(R.string.system_multitasking_splitscreen_focus_rhs), KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.META_META_ON | KeyEvent.META_ALT_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut( context.getString(R.string.system_multitasking_splitscreen_focus_lhs), KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.META_META_ON | KeyEvent.META_ALT_ON)); return systemMultitaskingGroup; } for (int i = 0; i < shortcutLabels.length; i++) { List<ShortcutKeyGroup> shortcutKeyGroups = Arrays.asList(new ShortcutKeyGroup( new KeyboardShortcutInfo( shortcutLabels[i], keyCodes[i], KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON), private static ShortcutMultiMappingInfo getMultitaskingShortcut(String shortcutLabel, int keycode, int modifiers) { List<ShortcutKeyGroup> shortcutKeyGroups = Arrays.asList( new ShortcutKeyGroup(new KeyboardShortcutInfo(shortcutLabel, keycode, modifiers), null)); ShortcutMultiMappingInfo shortcutMultiMappingInfo = new ShortcutMultiMappingInfo( shortcutLabels[i], null, shortcutKeyGroups); systemMultitaskingGroup.addItem(shortcutMultiMappingInfo); } return systemMultitaskingGroup; return new ShortcutMultiMappingInfo(shortcutLabel, null, shortcutKeyGroups); } private static KeyboardShortcutMultiMappingGroup getMultiMappingInputShortcuts( Loading Loading
packages/SystemUI/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -2013,6 +2013,10 @@ <string name="system_multitasking_lhs">Enter split screen with current app to LHS</string> <!-- User visible title for the keyboard shortcut that switches from split screen to full screen [CHAR LIMIT=70] --> <string name="system_multitasking_full_screen">Switch from split screen to full screen</string> <!-- User visible title for the keyboard shortcut that switches to app on right or below while using split screen [CHAR LIMIT=70] --> <string name="system_multitasking_splitscreen_focus_rhs">Switch to app on right or below while using split screen</string> <!-- User visible title for the keyboard shortcut that switches to app on left or above while using split screen [CHAR LIMIT=70] --> <string name="system_multitasking_splitscreen_focus_lhs">Switch to app on left or above while using split screen</string> <!-- User visible title for the keyboard shortcut that replaces an app from one to another during split screen [CHAR LIMIT=70] --> <string name="system_multitasking_replace">During split screen: replace an app from one to another</string> Loading
packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java +32 −25 Original line number Diff line number Diff line Loading @@ -631,32 +631,39 @@ public final class KeyboardShortcutListSearch { // Enter Split screen with current app to RHS: Meta + Ctrl + Right arrow // Enter Split screen with current app to LHS: Meta + Ctrl + Left arrow // Switch from Split screen to full screen: Meta + Ctrl + Up arrow String[] shortcutLabels = { context.getString(R.string.system_multitasking_rhs), context.getString(R.string.system_multitasking_lhs), context.getString(R.string.system_multitasking_full_screen), }; int[] keyCodes = { // Change split screen focus to RHS: Meta + Alt + Right arrow // Change split screen focus to LHS: Meta + Alt + Left arrow systemMultitaskingGroup.addItem( getMultitaskingShortcut(context.getString(R.string.system_multitasking_rhs), KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut(context.getString(R.string.system_multitasking_lhs), KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut(context.getString(R.string.system_multitasking_full_screen), KeyEvent.KEYCODE_DPAD_UP, }; KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut( context.getString(R.string.system_multitasking_splitscreen_focus_rhs), KeyEvent.KEYCODE_DPAD_RIGHT, KeyEvent.META_META_ON | KeyEvent.META_ALT_ON)); systemMultitaskingGroup.addItem( getMultitaskingShortcut( context.getString(R.string.system_multitasking_splitscreen_focus_lhs), KeyEvent.KEYCODE_DPAD_LEFT, KeyEvent.META_META_ON | KeyEvent.META_ALT_ON)); return systemMultitaskingGroup; } for (int i = 0; i < shortcutLabels.length; i++) { List<ShortcutKeyGroup> shortcutKeyGroups = Arrays.asList(new ShortcutKeyGroup( new KeyboardShortcutInfo( shortcutLabels[i], keyCodes[i], KeyEvent.META_META_ON | KeyEvent.META_CTRL_ON), private static ShortcutMultiMappingInfo getMultitaskingShortcut(String shortcutLabel, int keycode, int modifiers) { List<ShortcutKeyGroup> shortcutKeyGroups = Arrays.asList( new ShortcutKeyGroup(new KeyboardShortcutInfo(shortcutLabel, keycode, modifiers), null)); ShortcutMultiMappingInfo shortcutMultiMappingInfo = new ShortcutMultiMappingInfo( shortcutLabels[i], null, shortcutKeyGroups); systemMultitaskingGroup.addItem(shortcutMultiMappingInfo); } return systemMultitaskingGroup; return new ShortcutMultiMappingInfo(shortcutLabel, null, shortcutKeyGroups); } private static KeyboardShortcutMultiMappingGroup getMultiMappingInputShortcuts( Loading