summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/res/res/values/strings.xml3
-rwxr-xr-xcore/res/res/values/symbols.xml1
-rw-r--r--packages/SystemUI/res/layout/volume_zen_footer.xml32
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java8
4 files changed, 30 insertions, 14 deletions
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index eab9f5f..625ab59 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -4104,6 +4104,9 @@
<!-- Zen mode condition: no exit criteria. [CHAR LIMIT=NONE] -->
<string name="zen_mode_forever">Until you turn this off</string>
+ <!-- Zen mode condition: no exit criteria, includes the name of the feature for emphasis. [CHAR LIMIT=NONE] -->
+ <string name="zen_mode_forever_dnd">Until you turn off Do Not Disturb</string>
+
<!-- Zen mode active automatic rule name separator. [CHAR LIMIT=NONE] -->
<string name="zen_mode_rule_name_combination"><xliff:g id="first" example="Weeknights">%1$s</xliff:g> / <xliff:g id="rest" example="Meetings">%2$s</xliff:g></string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index d5cf9b4..9d56f13 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2054,6 +2054,7 @@
<java-symbol type="dimen" name="timepicker_text_size_inner" />
<java-symbol type="string" name="battery_saver_description" />
<java-symbol type="string" name="zen_mode_forever" />
+ <java-symbol type="string" name="zen_mode_forever_dnd" />
<java-symbol type="string" name="zen_mode_rule_name_combination" />
<java-symbol type="plurals" name="zen_mode_duration_minutes" />
<java-symbol type="plurals" name="zen_mode_duration_hours" />
diff --git a/packages/SystemUI/res/layout/volume_zen_footer.xml b/packages/SystemUI/res/layout/volume_zen_footer.xml
index eede804..28447d7 100644
--- a/packages/SystemUI/res/layout/volume_zen_footer.xml
+++ b/packages/SystemUI/res/layout/volume_zen_footer.xml
@@ -24,7 +24,7 @@
android:id="@+id/zen_embedded_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
- android:layout_marginBottom="8dp"
+ android:layout_marginBottom="12dp"
android:layout_marginTop="8dp"
android:background="@color/qs_tile_divider" />
@@ -53,26 +53,34 @@
android:id="@+id/volume_zen_summary_line_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:textDirection="locale"
android:textAppearance="@style/TextAppearance.Volume.ZenSummary" />
<TextView
android:id="@+id/volume_zen_summary_line_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginTop="1dp"
+ android:textDirection="locale"
android:textAppearance="@style/TextAppearance.Volume.ZenDetail" />
+
</LinearLayout>
- <TextView
- android:id="@+id/volume_zen_end_now"
- style="@style/QSBorderlessButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:clickable="true"
- android:focusable="true"
- android:minWidth="91dp"
- android:text="@string/volume_zen_end_now"
- android:textColor="@color/system_accent_color"
- android:textAppearance="@style/TextAppearance.QS.DetailButton" />
</LinearLayout>
+ <TextView
+ android:id="@+id/volume_zen_end_now"
+ style="@style/QSBorderlessButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="end"
+ android:layout_marginEnd="8dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:paddingStart="15dp"
+ android:paddingEnd="15dp"
+ android:text="@string/volume_zen_end_now"
+ android:textColor="@color/system_accent_color"
+ android:textAppearance="@style/TextAppearance.QS.DetailButton" />
+
</com.android.systemui.volume.ZenFooter> \ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java
index 6d67d11..3f6294d 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java
@@ -126,8 +126,12 @@ public class ZenFooter extends LinearLayout {
: null;
Util.setText(mSummaryLine1, line1);
- final String line2 = ZenModeConfig.getConditionSummary(mContext, mConfig,
- mController.getCurrentUser(), true /*shortVersion*/);
+ final boolean isForever = mConfig != null && mConfig.manualRule != null
+ && mConfig.manualRule.conditionId == null;
+ final String line2 =
+ isForever ? mContext.getString(com.android.internal.R.string.zen_mode_forever_dnd)
+ : ZenModeConfig.getConditionSummary(mContext, mConfig, mController.getCurrentUser(),
+ true /*shortVersion*/);
Util.setText(mSummaryLine2, line2);
}