From 13f31bd0fe9183cb326b39327e6c8ebe18682701 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 12 Sep 2017 10:44:34 -0400 Subject: [PATCH] Display volume dialog for longer... If the alarms only introduction is visible. Also fix the spacing of the intro message. Change-Id: I63c0b992ed0b7aad707a92eb1b451192af71aeae Fixes: 65188805 Test: manual --- packages/SystemUI/res/layout/volume_zen_footer.xml | 3 --- .../src/com/android/systemui/volume/VolumeDialogImpl.java | 4 ++++ .../SystemUI/src/com/android/systemui/volume/ZenFooter.java | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/res/layout/volume_zen_footer.xml b/packages/SystemUI/res/layout/volume_zen_footer.xml index 7ffcb1efb7b38..df79c5ff5ba47 100644 --- a/packages/SystemUI/res/layout/volume_zen_footer.xml +++ b/packages/SystemUI/res/layout/volume_zen_footer.xml @@ -25,18 +25,15 @@ android:id="@+id/zen_embedded_divider" android:layout_width="match_parent" android:layout_height="1dp" - android:layout_marginBottom="12dp" android:layout_marginTop="8dp" android:background="@color/qs_tile_divider" /> - diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java index 694c72f2fe157..41a5dc84b7132 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java @@ -75,6 +75,7 @@ import android.widget.TextView; import com.android.settingslib.Utils; import com.android.systemui.Dependency; import com.android.systemui.Interpolators; +import com.android.systemui.Prefs; import com.android.systemui.R; import com.android.systemui.plugins.VolumeDialog; import com.android.systemui.plugins.VolumeDialogController; @@ -514,6 +515,9 @@ public class VolumeDialogImpl implements VolumeDialog, TunerService.Tunable { if (mSafetyWarning != null) return 5000; if (mExpanded || mExpandButtonAnimationRunning) return 5000; if (mActiveStream == AudioManager.STREAM_MUSIC) return 1500; + if (mZenFooter.shouldShowIntroduction()) { + return 6000; + } return 3000; } diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java index 74642129b197d..80e162983a65a 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java +++ b/packages/SystemUI/src/com/android/systemui/volume/ZenFooter.java @@ -152,6 +152,7 @@ public class ZenFooter extends LinearLayout { mController.getCurrentUser(), true /*shortVersion*/); Util.setText(mSummaryLine2, line2); } + public boolean shouldShowIntroduction() { final boolean confirmed = Prefs.getBoolean(mContext, Prefs.Key.DND_CONFIRMED_ALARM_INTRODUCTION, false);