Loading core/java/android/view/IWindowManager.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import android.view.IWallpaperVisibilityListener; import android.view.IWindow; import android.view.IWindowSession; import android.view.IWindowSessionCallback; import android.view.KeyboardShortcutGroup; import android.view.KeyEvent; import android.view.InputEvent; import android.view.InsetsState; Loading Loading @@ -1095,4 +1096,11 @@ interface IWindowManager boolean transferTouchGesture(in InputTransferToken transferFromToken, in InputTransferToken transferToToken); /** * Request the application launch keyboard shortcuts the system has defined. * * @param deviceId The id of the {@link InputDevice} that will handle the shortcut. */ KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId); } core/java/android/view/KeyboardShortcutGroup.aidl 0 → 100644 +3 −0 Original line number Diff line number Diff line package android.view; @JavaOnlyStableParcelable parcelable KeyboardShortcutGroup; core/java/android/view/KeyboardShortcutInfo.java +18 −1 Original line number Diff line number Diff line Loading @@ -81,12 +81,29 @@ public final class KeyboardShortcutInfo implements Parcelable { * {@link KeyEvent#META_SYM_ON}. */ public KeyboardShortcutInfo(CharSequence label, char baseCharacter, int modifiers) { this(label, null, baseCharacter, modifiers); } /** * @param label The label that identifies the action performed by this shortcut. * @param icon An icon that identifies the action performed by this shortcut. * @param baseCharacter The character that triggers the shortcut. * @param modifiers The set of modifiers that, combined with the key, trigger the shortcut. * These should be a combination of {@link KeyEvent#META_CTRL_ON}, * {@link KeyEvent#META_SHIFT_ON}, {@link KeyEvent#META_META_ON}, * {@link KeyEvent#META_ALT_ON}, {@link KeyEvent#META_FUNCTION_ON} and * {@link KeyEvent#META_SYM_ON}. * * @hide */ public KeyboardShortcutInfo( CharSequence label, @Nullable Icon icon, char baseCharacter, int modifiers) { mLabel = label; checkArgument(baseCharacter != MIN_VALUE); mBaseCharacter = baseCharacter; mKeycode = KeyEvent.KEYCODE_UNKNOWN; mModifiers = modifiers; mIcon = null; mIcon = icon; } private KeyboardShortcutInfo(Parcel source) { Loading core/java/android/view/WindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -1667,6 +1667,15 @@ public interface WindowManager extends ViewManager { */ public void requestAppKeyboardShortcuts(final KeyboardShortcutsReceiver receiver, int deviceId); /** * Request the application launch keyboard shortcuts the system has defined. * * @param deviceId The id of the {@link InputDevice} that will handle the shortcut. * * @hide */ KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId); /** * Request for ime's keyboard shortcuts to be retrieved asynchronously. * Loading core/java/android/view/WindowManagerImpl.java +10 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,16 @@ public final class WindowManagerImpl implements WindowManager { } } @Override public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) { try { return WindowManagerGlobal.getWindowManagerService() .getApplicationLaunchKeyboardShortcuts(deviceId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } @Override public void requestImeKeyboardShortcuts( final KeyboardShortcutsReceiver receiver, int deviceId) { Loading Loading
core/java/android/view/IWindowManager.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import android.view.IWallpaperVisibilityListener; import android.view.IWindow; import android.view.IWindowSession; import android.view.IWindowSessionCallback; import android.view.KeyboardShortcutGroup; import android.view.KeyEvent; import android.view.InputEvent; import android.view.InsetsState; Loading Loading @@ -1095,4 +1096,11 @@ interface IWindowManager boolean transferTouchGesture(in InputTransferToken transferFromToken, in InputTransferToken transferToToken); /** * Request the application launch keyboard shortcuts the system has defined. * * @param deviceId The id of the {@link InputDevice} that will handle the shortcut. */ KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId); }
core/java/android/view/KeyboardShortcutGroup.aidl 0 → 100644 +3 −0 Original line number Diff line number Diff line package android.view; @JavaOnlyStableParcelable parcelable KeyboardShortcutGroup;
core/java/android/view/KeyboardShortcutInfo.java +18 −1 Original line number Diff line number Diff line Loading @@ -81,12 +81,29 @@ public final class KeyboardShortcutInfo implements Parcelable { * {@link KeyEvent#META_SYM_ON}. */ public KeyboardShortcutInfo(CharSequence label, char baseCharacter, int modifiers) { this(label, null, baseCharacter, modifiers); } /** * @param label The label that identifies the action performed by this shortcut. * @param icon An icon that identifies the action performed by this shortcut. * @param baseCharacter The character that triggers the shortcut. * @param modifiers The set of modifiers that, combined with the key, trigger the shortcut. * These should be a combination of {@link KeyEvent#META_CTRL_ON}, * {@link KeyEvent#META_SHIFT_ON}, {@link KeyEvent#META_META_ON}, * {@link KeyEvent#META_ALT_ON}, {@link KeyEvent#META_FUNCTION_ON} and * {@link KeyEvent#META_SYM_ON}. * * @hide */ public KeyboardShortcutInfo( CharSequence label, @Nullable Icon icon, char baseCharacter, int modifiers) { mLabel = label; checkArgument(baseCharacter != MIN_VALUE); mBaseCharacter = baseCharacter; mKeycode = KeyEvent.KEYCODE_UNKNOWN; mModifiers = modifiers; mIcon = null; mIcon = icon; } private KeyboardShortcutInfo(Parcel source) { Loading
core/java/android/view/WindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -1667,6 +1667,15 @@ public interface WindowManager extends ViewManager { */ public void requestAppKeyboardShortcuts(final KeyboardShortcutsReceiver receiver, int deviceId); /** * Request the application launch keyboard shortcuts the system has defined. * * @param deviceId The id of the {@link InputDevice} that will handle the shortcut. * * @hide */ KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId); /** * Request for ime's keyboard shortcuts to be retrieved asynchronously. * Loading
core/java/android/view/WindowManagerImpl.java +10 −0 Original line number Diff line number Diff line Loading @@ -236,6 +236,16 @@ public final class WindowManagerImpl implements WindowManager { } } @Override public KeyboardShortcutGroup getApplicationLaunchKeyboardShortcuts(int deviceId) { try { return WindowManagerGlobal.getWindowManagerService() .getApplicationLaunchKeyboardShortcuts(deviceId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } @Override public void requestImeKeyboardShortcuts( final KeyboardShortcutsReceiver receiver, int deviceId) { Loading