diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-09-25 16:46:33 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-25 16:47:06 -0700 |
commit | c91fb5875bfd7f91d50d6fe939873872b53c8b2f (patch) | |
tree | 20d76cda14967d73acad9df9445b2211bbe2482f /core/java | |
parent | fe54290df0c5d495b7f388035a4ae3a20821a183 (diff) | |
parent | e20a177d3f147f3011647c3bdab401f90b2c5d1d (diff) | |
download | frameworks_base-c91fb5875bfd7f91d50d6fe939873872b53c8b2f.zip frameworks_base-c91fb5875bfd7f91d50d6fe939873872b53c8b2f.tar.gz frameworks_base-c91fb5875bfd7f91d50d6fe939873872b53c8b2f.tar.bz2 |
Merge "Adding a global accessibility action to open quick settings." into jb-mr1-dev
Diffstat (limited to 'core/java')
4 files changed, 50 insertions, 11 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. diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl index 294d4c4..0737b52 100644 --- a/core/java/com/android/internal/statusbar/IStatusBar.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl @@ -28,8 +28,10 @@ oneway interface IStatusBar void updateNotification(IBinder key, in StatusBarNotification notification); void removeNotification(IBinder key); void disable(int state); - void animateExpand(); - void animateCollapse(); + void animateExpandNotifications(); + void animateCollapseNotifications(); + void animateExpandQuickSettings(); + void animateCollapseQuickSettings(); void setSystemUiVisibility(int vis, int mask); void topAppWindowChanged(boolean menuVisible); void setImeWindowStatus(in IBinder token, int vis, int backDisposition); diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index c64f170..60e2b34 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -24,8 +24,10 @@ import com.android.internal.statusbar.StatusBarNotification; /** @hide */ interface IStatusBarService { - void expand(); - void collapse(); + void expandNotifications(); + void collapseNotifications(); + void expandQuickSettings(); + void collapseQuickSettings(); void disable(int what, IBinder token, String pkg); void setIcon(String slot, String iconPackage, int iconId, int iconLevel, String contentDescription); void setIconVisibility(String slot, boolean visible); |