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

Commit daafc613 authored by Adnan Begovic's avatar Adnan Begovic
Browse files

SystemUi: Respect shouldCollapsePanel when handling onClick.

Change-Id: Ia7058d0744ac1dcb4eda2050caf549b49308bacc
parent 34dace5f
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ public class CustomQSTile extends QSTile<QSTile.State> {
    private int mCurrentUserId;
    private StatusBarPanelCustomTile mTile;
    private CustomQSDetailAdapter mDetailAdapter;
    private boolean mCollapsePanel;

    public CustomQSTile(Host host, StatusBarPanelCustomTile tile) {
        super(host);
@@ -96,11 +97,12 @@ public class CustomQSTile extends QSTile<QSTile.State> {
            if (mExpandedStyle != null &&
                    mExpandedStyle.getStyle() != CustomTile.ExpandedStyle.NO_STYLE) {
                showDetail(true);
                return;
            }
            if (mOnClick != null) {
                if (mOnClick.isActivity()) {
            if (mCollapsePanel) {
                mHost.collapsePanels();
            }
            if (mOnClick != null) {
                mOnClick.send();
            } else if (mOnClickUri != null) {
                final Intent intent = new Intent().setData(mOnClickUri);
@@ -130,6 +132,7 @@ public class CustomQSTile extends QSTile<QSTile.State> {
        mOnClick = customTile.onClick;
        mOnClickUri = customTile.onClickUri;
        mExpandedStyle = customTile.expandedStyle;
        mCollapsePanel = customTile.collapsePanel;
        mDetailAdapter = new CustomQSDetailAdapter();
    }