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

Commit 8263c3e0 authored by John Spurlock's avatar John Spurlock
Browse files

Volume: Elide collapsed condition title if no end.

And make expanded title non-clickable.

Bug:16211705
Change-Id: I675b8ad8d08dca9a3f38292c45b771dc6532de77
parent 980f9925
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@
            android:id="@+id/zen_subhead_expanded"
            android:layout_width="wrap_content"
            android:layout_height="32dp"
            android:clickable="true"
            android:gravity="center_vertical"
            android:textAppearance="@style/TextAppearance.QS.Subhead" />

+2 −8
Original line number Diff line number Diff line
@@ -133,13 +133,6 @@ public class ZenModePanel extends LinearLayout {
        });

        mZenSubheadExpanded = (TextView) findViewById(R.id.zen_subhead_expanded);
        mZenSubheadExpanded.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                setExpanded(false);
                fireInteraction();
            }
        });

        mMoreSettings = findViewById(R.id.zen_more_settings);
        mMoreSettings.setOnClickListener(new View.OnClickListener() {
@@ -270,8 +263,9 @@ public class ZenModePanel extends LinearLayout {
        final boolean zenOff = zen == Global.ZEN_MODE_OFF;
        final boolean zenImportant = zen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
        final boolean zenNone = zen == Global.ZEN_MODE_NO_INTERRUPTIONS;
        final boolean foreverSelected = mExitConditionId == null;

        mZenSubhead.setVisibility(!zenOff ? VISIBLE : GONE);
        mZenSubhead.setVisibility(!zenOff && (mExpanded || !foreverSelected) ? VISIBLE : GONE);
        mZenSubheadExpanded.setVisibility(mExpanded ? VISIBLE : GONE);
        mZenSubheadCollapsed.setVisibility(!mExpanded ? VISIBLE : GONE);
        mMoreSettings.setVisibility(zenImportant && mExpanded ? VISIBLE : GONE);