diff options
author | Jason Monk <jmonk@google.com> | 2014-09-10 15:00:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-10 15:00:31 +0000 |
commit | 0875a782ad6688407050592dd32169d7a8f0716a (patch) | |
tree | f944f8a68413a481d7761d88eb9f50091e88fb83 /packages/SystemUI/src/com/android/systemui/volume | |
parent | c8e4fa41f22cc23937a8660992ee60502ed6e13f (diff) | |
parent | e2f4771a0105ad6a94ff759353ca00c3a5fba72a (diff) | |
download | frameworks_base-0875a782ad6688407050592dd32169d7a8f0716a.zip frameworks_base-0875a782ad6688407050592dd32169d7a8f0716a.tar.gz frameworks_base-0875a782ad6688407050592dd32169d7a8f0716a.tar.bz2 |
Merge "Update zen mode and qs strings on locale change" into lmp-dev
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/volume')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java | 3 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java | 17 |
2 files changed, 16 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java index 6949ffb..fa43f32 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java @@ -431,6 +431,9 @@ public class VolumePanel extends Handler { public void onConfigurationChanged(Configuration newConfig) { updateWidth(); + if (mZenPanel != null) { + mZenPanel.updateLocale(); + } } private void updateWidth() { diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java index ac1563d..f829994 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java +++ b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java @@ -120,10 +120,7 @@ public class ZenModePanel extends LinearLayout { super.onFinishInflate(); mZenButtons = (SegmentedButtons) findViewById(R.id.zen_buttons); - mZenButtons.addButton(R.string.interruption_level_none, Global.ZEN_MODE_NO_INTERRUPTIONS); - mZenButtons.addButton(R.string.interruption_level_priority, - Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS); - mZenButtons.addButton(R.string.interruption_level_all, Global.ZEN_MODE_OFF); + addZenButtons(); mZenButtons.setCallback(mZenButtonsCallback); mZenSubhead = findViewById(R.id.zen_subhead); @@ -173,6 +170,13 @@ public class ZenModePanel extends LinearLayout { setExpanded(false); } + private void addZenButtons() { + mZenButtons.addButton(R.string.interruption_level_none, Global.ZEN_MODE_NO_INTERRUPTIONS); + mZenButtons.addButton(R.string.interruption_level_priority, + Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS); + mZenButtons.addButton(R.string.interruption_level_all, Global.ZEN_MODE_OFF); + } + public void setHidden(boolean hidden) { if (mHidden == hidden) return; mHidden = hidden; @@ -233,6 +237,11 @@ public class ZenModePanel extends LinearLayout { mController.addCallback(mZenCallback); } + public void updateLocale() { + mZenButtons.removeAllViews(); + addZenButtons(); + } + private void setExitCondition(Condition exitCondition) { if (sameConditionId(mExitCondition, exitCondition)) return; mExitCondition = exitCondition; |