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

Commit 5fd224ae authored by John Spurlock's avatar John Spurlock Committed by Android Git Automerger
Browse files

am ce3d86e2: Merge "QS: Back button closes detail (if showing)" into lmp-dev

* commit 'ce3d86e22da8a0659c4d480d87a77b8fa0968bc7':
  QS: Back button closes detail (if showing)
parents 57652524 487315f8
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public class QSPanel extends ViewGroup {
        mDetailDoneButton.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                showDetail(false, mDetailRecord);
                closeDetail();
            }
        });
    }
@@ -134,7 +134,7 @@ public class QSPanel extends ViewGroup {
        if (mExpanded == expanded) return;
        mExpanded = expanded;
        if (!mExpanded) {
            showDetail(false /*show*/, mDetailRecord);
            closeDetail();
        }
    }

@@ -226,6 +226,14 @@ public class QSPanel extends ViewGroup {
        addView(r.tileView);
    }

    public boolean isShowingDetail() {
        return mDetailRecord != null;
    }

    public void closeDetail() {
        showDetail(false, mDetailRecord);
    }

    private void handleShowDetail(Record r, boolean show) {
        if (r instanceof TileRecord) {
            handleShowDetailTile((TileRecord) r, show);
+8 −0
Original line number Diff line number Diff line
@@ -1424,6 +1424,14 @@ public class NotificationPanelView extends PanelView implements
        return mQsExpanded;
    }

    public boolean isQsDetailShowing() {
        return mQsPanel.isShowingDetail();
    }

    public void closeQsDetail() {
        mQsPanel.closeDetail();
    }

    @Override
    public boolean shouldDelayChildPressedState() {
        return true;
+5 −1
Original line number Diff line number Diff line
@@ -3458,7 +3458,11 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            return true;
        }
        if (mNotificationPanel.isQsExpanded()) {
            if (mNotificationPanel.isQsDetailShowing()) {
                mNotificationPanel.closeQsDetail();
            } else {
                mNotificationPanel.animateCloseQs();
            }
            return true;
        }
        if (mState != StatusBarState.KEYGUARD && mState != StatusBarState.SHADE_LOCKED) {