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

Commit 0dc2b81c authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Cleanup internal status bar APIs." into jb-mr1-dev

parents 195b6e12 11cf1781
Loading
Loading
Loading
Loading
+9 −24
Original line number Diff line number Diff line
@@ -97,13 +97,13 @@ public class StatusBarManager {
    }
    
    /**
     * Expand the notifications.
     * Expand the notifications panel.
     */
    public void expandNotifications() {
    public void expandNotificationsPanel() {
        try {
            final IStatusBarService svc = getService();
            if (svc != null) {
                svc.expandNotifications();
                svc.expandNotificationsPanel();
            }
        } catch (RemoteException ex) {
            // system process is dead anyway.
@@ -112,13 +112,13 @@ public class StatusBarManager {
    }
    
    /**
     * Collapse the notifications.
     * Collapse the notifications and settings panels.
     */
    public void collapseNotifications() {
    public void collapsePanels() {
        try {
            final IStatusBarService svc = getService();
            if (svc != null) {
                svc.collapseNotifications();
                svc.collapsePanels();
            }
        } catch (RemoteException ex) {
            // system process is dead anyway.
@@ -127,28 +127,13 @@ public class StatusBarManager {
    }

    /**
     * Expand the quick settings.
     * Expand the settings panel.
     */
    public void expandQuickSettings() {
    public void expandSettingsPanel() {
        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();
                svc.expandSettingsPanel();
            }
        } catch (RemoteException ex) {
            // system process is dead anyway.
+3 −4
Original line number Diff line number Diff line
@@ -28,10 +28,9 @@ oneway interface IStatusBar
    void updateNotification(IBinder key, in StatusBarNotification notification);
    void removeNotification(IBinder key);
    void disable(int state);
    void animateExpandNotifications();
    void animateCollapseNotifications();
    void animateExpandQuickSettings();
    void animateCollapseQuickSettings();
    void animateExpandNotificationsPanel();
    void animateExpandSettingsPanel();
    void animateCollapsePanels();
    void setSystemUiVisibility(int vis, int mask);
    void topAppWindowChanged(boolean menuVisible);
    void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
+3 −4
Original line number Diff line number Diff line
@@ -24,16 +24,15 @@ import com.android.internal.statusbar.StatusBarNotification;
/** @hide */
interface IStatusBarService
{
    void expandNotifications();
    void collapseNotifications();
    void expandQuickSettings();
    void collapseQuickSettings();
    void expandNotificationsPanel();
    void collapsePanels();
    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);
    void removeIcon(String slot);
    void topAppWindowChanged(boolean menuVisible);
    void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
    void expandSettingsPanel();

    // ---- Methods below are for use by the status bar policy services ----
    // You need the STATUS_BAR_SERVICE permission
+2 −2
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ public class SearchPanelView extends FrameLayout implements

    private void startAssistActivity() {
        // Close Recent Apps if needed
        mBar.animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_SEARCH_PANEL);
        mBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_SEARCH_PANEL);
        // Launch Assist
        Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE))
                .getAssistIntent(mContext, UserHandle.USER_CURRENT);
@@ -220,7 +220,7 @@ public class SearchPanelView extends FrameLayout implements
    public void hide(boolean animate) {
        if (mBar != null) {
            // This will indirectly cause show(false, ...) to get called
            mBar.animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
            mBar.animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
        } else {
            setVisibility(View.INVISIBLE);
        }
+3 −3
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ public abstract class BaseStatusBar extends SystemUI implements

            if (isActivity && handled) {
                // close the shade if it was open
                animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
                animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
                visibilityChanged(false);
            }
            return handled;
@@ -357,7 +357,7 @@ public abstract class BaseStatusBar extends SystemUI implements
                    public boolean onMenuItemClick(MenuItem item) {
                        if (item.getItemId() == R.id.notification_inspect_item) {
                            startApplicationDetailsActivity(packageNameF);
                            animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
                            animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
                        } else {
                            return false;
                        }
@@ -789,7 +789,7 @@ public abstract class BaseStatusBar extends SystemUI implements
            }

            // close the shade if it was open
            animateCollapseNotifications(CommandQueue.FLAG_EXCLUDE_NONE);
            animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE);
            visibilityChanged(false);

            // If this click was on the intruder alert, hide that instead
Loading