Loading core/api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -415,6 +415,7 @@ package android.app { method public void clickNotification(@Nullable String, int, int, boolean); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void collapsePanels(); method public void expandNotificationsPanel(); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public int getLastSystemKey(); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void handleSystemKey(int); method public void sendNotificationFeedback(@Nullable String, @Nullable android.os.Bundle); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void setExpansionDisabledForSimNetworkLock(boolean); Loading Loading @@ -2628,6 +2629,7 @@ package android.provider { field public static final String SELECTED_SPELL_CHECKER_SUBTYPE = "selected_spell_checker_subtype"; field public static final String SHOW_FIRST_CRASH_DIALOG_DEV_OPTION = "show_first_crash_dialog_dev_option"; field public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard"; field public static final String STYLUS_BUTTONS_ENABLED = "stylus_buttons_enabled"; field @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static final String SYNC_PARENT_SOUNDS = "sync_parent_sounds"; field public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; } Loading core/java/android/app/StatusBarManager.java +23 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,29 @@ public class StatusBarManager { } } /** * Gets the last handled system key. A system key is a KeyEvent that the * {@link com.android.server.policy.PhoneWindowManager} sends directly to the * status bar, rather than forwarding to apps. If a key has never been sent to the * status bar, will return -1. * * @return the keycode of the last KeyEvent that has been sent to the system. * @hide */ @RequiresPermission(android.Manifest.permission.STATUS_BAR) @TestApi public int getLastSystemKey() { try { final IStatusBarService svc = getService(); if (svc != null) { return svc.getLastSystemKey(); } } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } return -1; } /** * Expand the settings panel. * Loading core/java/android/provider/Settings.java +2 −0 Original line number Diff line number Diff line Loading @@ -7414,6 +7414,8 @@ public final class Settings { * * @hide */ @TestApi @Readable @SuppressLint("NoSettingsProvider") public static final String STYLUS_BUTTONS_ENABLED = "stylus_buttons_enabled"; Loading core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ interface IStatusBarService void clickTile(in ComponentName tile); @UnsupportedAppUsage void handleSystemKey(in int key); int getLastSystemKey(); /** * Methods to show toast messages for screen pinning Loading services/core/java/com/android/server/statusbar/StatusBarManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.TestApi; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.ActivityThread; Loading Loading @@ -178,6 +179,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D private final SessionMonitor mSessionMonitor; private int mCurrentUserId; private boolean mTracingEnabled; private int mLastSystemKey = -1; private final TileRequestTracker mTileRequestTracker; Loading Loading @@ -905,6 +907,8 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D return; } mLastSystemKey = key; if (mBar != null) { try { mBar.handleSystemKey(key); Loading @@ -913,6 +917,14 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D } } @Override @TestApi public int getLastSystemKey() { enforceStatusBar(); return mLastSystemKey; } @Override public void showPinningEnterExitToast(boolean entering) throws RemoteException { if (mBar != null) { Loading Loading
core/api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -415,6 +415,7 @@ package android.app { method public void clickNotification(@Nullable String, int, int, boolean); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void collapsePanels(); method public void expandNotificationsPanel(); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public int getLastSystemKey(); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void handleSystemKey(int); method public void sendNotificationFeedback(@Nullable String, @Nullable android.os.Bundle); method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void setExpansionDisabledForSimNetworkLock(boolean); Loading Loading @@ -2628,6 +2629,7 @@ package android.provider { field public static final String SELECTED_SPELL_CHECKER_SUBTYPE = "selected_spell_checker_subtype"; field public static final String SHOW_FIRST_CRASH_DIALOG_DEV_OPTION = "show_first_crash_dialog_dev_option"; field public static final String SHOW_IME_WITH_HARD_KEYBOARD = "show_ime_with_hard_keyboard"; field public static final String STYLUS_BUTTONS_ENABLED = "stylus_buttons_enabled"; field @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static final String SYNC_PARENT_SOUNDS = "sync_parent_sounds"; field public static final String VOICE_INTERACTION_SERVICE = "voice_interaction_service"; } Loading
core/java/android/app/StatusBarManager.java +23 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,29 @@ public class StatusBarManager { } } /** * Gets the last handled system key. A system key is a KeyEvent that the * {@link com.android.server.policy.PhoneWindowManager} sends directly to the * status bar, rather than forwarding to apps. If a key has never been sent to the * status bar, will return -1. * * @return the keycode of the last KeyEvent that has been sent to the system. * @hide */ @RequiresPermission(android.Manifest.permission.STATUS_BAR) @TestApi public int getLastSystemKey() { try { final IStatusBarService svc = getService(); if (svc != null) { return svc.getLastSystemKey(); } } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } return -1; } /** * Expand the settings panel. * Loading
core/java/android/provider/Settings.java +2 −0 Original line number Diff line number Diff line Loading @@ -7414,6 +7414,8 @@ public final class Settings { * * @hide */ @TestApi @Readable @SuppressLint("NoSettingsProvider") public static final String STYLUS_BUTTONS_ENABLED = "stylus_buttons_enabled"; Loading
core/java/com/android/internal/statusbar/IStatusBarService.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ interface IStatusBarService void clickTile(in ComponentName tile); @UnsupportedAppUsage void handleSystemKey(in int key); int getLastSystemKey(); /** * Methods to show toast messages for screen pinning Loading
services/core/java/com/android/server/statusbar/StatusBarManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.Manifest; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.annotation.TestApi; import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.ActivityThread; Loading Loading @@ -178,6 +179,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D private final SessionMonitor mSessionMonitor; private int mCurrentUserId; private boolean mTracingEnabled; private int mLastSystemKey = -1; private final TileRequestTracker mTileRequestTracker; Loading Loading @@ -905,6 +907,8 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D return; } mLastSystemKey = key; if (mBar != null) { try { mBar.handleSystemKey(key); Loading @@ -913,6 +917,14 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D } } @Override @TestApi public int getLastSystemKey() { enforceStatusBar(); return mLastSystemKey; } @Override public void showPinningEnterExitToast(boolean entering) throws RemoteException { if (mBar != null) { Loading