Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c91fb587 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "Adding a global accessibility action to open quick settings." into jb-mr1-dev

parents fe54290d e20a177d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2066,6 +2066,7 @@ package android.accessibilityservice {
    field public static final int GLOBAL_ACTION_BACK = 1; // 0x1
    field public static final int GLOBAL_ACTION_HOME = 2; // 0x2
    field public static final int GLOBAL_ACTION_NOTIFICATIONS = 4; // 0x4
    field public static final int GLOBAL_ACTION_QUICK_SETTINGS = 5; // 0x5
    field public static final int GLOBAL_ACTION_RECENTS = 3; // 0x3
    field public static final java.lang.String SERVICE_INTERFACE = "android.accessibilityservice.AccessibilityService";
    field public static final java.lang.String SERVICE_META_DATA = "android.accessibilityservice";
+6 −1
Original line number Diff line number Diff line
@@ -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 {
+36 −6
Original line number Diff line number Diff line
@@ -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.
+4 −2
Original line number Diff line number Diff line
@@ -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);
+4 −2
Original line number Diff line number Diff line
@@ -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);
Loading