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

Commit ded2b105 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Support dnd condition in Settings"

parents 2b9ef654 a9927325
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -127,6 +127,14 @@ public class NotificationManager
    public static final String ACTION_INTERRUPTION_FILTER_CHANGED
            = "android.app.action.INTERRUPTION_FILTER_CHANGED";

    /**
     * Intent that is broadcast when the state of getCurrentInterruptionFilter() changes.
     * @hide
     */
    @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_INTERRUPTION_FILTER_CHANGED_INTERNAL
            = "android.app.action.INTERRUPTION_FILTER_CHANGED_INTERNAL";

    /**
     * {@link #getCurrentInterruptionFilter() Interruption filter} constant -
     *     Normal interruption filter.
+8 −1
Original line number Diff line number Diff line
@@ -180,10 +180,17 @@ public class StatusBarManager {
     * Expand the settings panel.
     */
    public void expandSettingsPanel() {
        expandSettingsPanel(null);
    }

    /**
     * Expand the settings panel and open a subPanel, pass null to just open the settings panel.
     */
    public void expandSettingsPanel(String subPanel) {
        try {
            final IStatusBarService svc = getService();
            if (svc != null) {
                svc.expandSettingsPanel();
                svc.expandSettingsPanel(subPanel);
            }
        } catch (RemoteException ex) {
            // system process is dead anyway.
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ oneway interface IStatusBar
    void removeIcon(int index);
    void disable(int state1, int state2);
    void animateExpandNotificationsPanel();
    void animateExpandSettingsPanel();
    void animateExpandSettingsPanel(String subPanel);
    void animateCollapsePanels();
    void setSystemUiVisibility(int vis, int mask);
    void topAppWindowChanged(boolean menuVisible);
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ interface IStatusBarService
    void topAppWindowChanged(boolean menuVisible);
    void setImeWindowStatus(in IBinder token, int vis, int backDisposition,
            boolean showImeSwitcher);
    void expandSettingsPanel();
    void expandSettingsPanel(String subPanel);
    void setCurrentUser(int newUserId);

    // ---- Methods below are for use by the status bar policy services ----
+14 −0
Original line number Diff line number Diff line
@@ -154,6 +154,20 @@ public class QSPanel extends FrameLayout implements Tunable {
        }
    }

    public void openDetails(String subPanel) {
        QSTile<?> tile = getTile(subPanel);
        showDetailAdapter(true, tile.getDetailAdapter(), new int[] {getWidth() / 2, 0});
    }

    private QSTile<?> getTile(String subPanel) {
        for (int i = 0; i < mRecords.size(); i++) {
            if (subPanel.equals(mRecords.get(i).tile.getTileSpec())) {
                return mRecords.get(i).tile;
            }
        }
        return mHost.createTile(subPanel);
    }

    protected void createCustomizePanel() {
        mCustomizePanel = (QSCustomizer) LayoutInflater.from(mContext)
                .inflate(R.layout.qs_customize_panel, null);
Loading