diff options
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/accessibilityservice/AccessibilityService.java | 7 | ||||
-rw-r--r-- | core/java/android/app/StatusBarManager.java | 42 |
2 files changed, 42 insertions, 7 deletions
diff --git a/core/java/android/accessibilityservice/AccessibilityService.java b/core/java/android/accessibilityservice/AccessibilityService.java index 81ee192..b0bad07 100644 --- a/core/java/android/accessibilityservice/AccessibilityService.java +++ b/core/java/android/accessibilityservice/AccessibilityService.java @@ -323,7 +323,7 @@ public abstract class AccessibilityService extends Service { public static final int GLOBAL_ACTION_HOME = 2; /** - * Action to open the recents. + * Action to open the recent apps. */ public static final int GLOBAL_ACTION_RECENTS = 3; @@ -332,6 +332,11 @@ public abstract class AccessibilityService extends Service { */ public static final int GLOBAL_ACTION_NOTIFICATIONS = 4; + /** + * Action to open the quick settings. + */ + public static final int GLOBAL_ACTION_QUICK_SETTINGS = 5; + private static final String LOG_TAG = "AccessibilityService"; interface Callbacks { diff --git a/core/java/android/app/StatusBarManager.java b/core/java/android/app/StatusBarManager.java index dd9f337..1e61e10 100644 --- a/core/java/android/app/StatusBarManager.java +++ b/core/java/android/app/StatusBarManager.java @@ -97,13 +97,13 @@ public class StatusBarManager { } /** - * Expand the status bar. + * Expand the notifications. */ - public void expand() { + public void expandNotifications() { try { final IStatusBarService svc = getService(); if (svc != null) { - svc.expand(); + svc.expandNotifications(); } } catch (RemoteException ex) { // system process is dead anyway. @@ -112,13 +112,43 @@ public class StatusBarManager { } /** - * Collapse the status bar. + * Collapse the notifications. */ - public void collapse() { + public void collapseNotifications() { try { final IStatusBarService svc = getService(); if (svc != null) { - svc.collapse(); + svc.collapseNotifications(); + } + } catch (RemoteException ex) { + // system process is dead anyway. + throw new RuntimeException(ex); + } + } + + /** + * Expand the quick settings. + */ + public void expandQuickSettings() { + try { + final IStatusBarService svc = getService(); + if (svc != null) { + svc.expandQuickSettings(); + } + } catch (RemoteException ex) { + // system process is dead anyway. + throw new RuntimeException(ex); + } + } + + /** + * Collapse the quick settings. + */ + public void collapseQuickSettings() { + try { + final IStatusBarService svc = getService(); + if (svc != null) { + svc.collapseQuickSettings(); } } catch (RemoteException ex) { // system process is dead anyway. |