From 023544f762a835fa903088cb38abda31aa09bed5 Mon Sep 17 00:00:00 2001 From: John Spurlock Date: Tue, 2 Jun 2015 17:52:46 -0400 Subject: [PATCH] Volume footer uglification. - Move "End now" button to its own line, below the condition lines. - Add the feature name "Do Not Disturb" to the condition summary for the indef condition. - Fix found RTL issues with the footer. Bug: 21171893 Change-Id: Ia12fe57d46a5547beec82cf76e175982bfa3fd6c --- core/res/res/values/strings.xml | 3 ++ core/res/res/values/symbols.xml | 1 + .../SystemUI/res/layout/volume_zen_footer.xml | 32 ++++++++++++------- .../android/systemui/volume/ZenFooter.java | 8 +++-- 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index d9801efc6fafc..ceb9788267ec5 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -4085,6 +4085,9 @@ Until you turn this off + + Until you turn off Do Not Disturb + %1$s / %2$s diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index ff3801fe67783..f800697f6612b 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2057,6 +2057,7 @@ + diff --git a/packages/SystemUI/res/layout/volume_zen_footer.xml b/packages/SystemUI/res/layout/volume_zen_footer.xml index eede804421235..28447d772c867 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" /> + - + + \ 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 6d67d1136a71c..3f6294d47634f 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); }