summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2014-08-13 17:58:01 +0200
committerAdrian Roos <roosa@google.com>2014-08-13 17:23:19 +0000
commit959409b86f04700cb9898e4641b3bc1da30f5cb2 (patch)
treebc73e8eb2503fc7892be5b97a7f0a63832c6c346 /packages
parentca17708880ce75d6487ff6f87ff013ff4c9d78d5 (diff)
downloadframeworks_base-959409b86f04700cb9898e4641b3bc1da30f5cb2.zip
frameworks_base-959409b86f04700cb9898e4641b3bc1da30f5cb2.tar.gz
frameworks_base-959409b86f04700cb9898e4641b3bc1da30f5cb2.tar.bz2
QS Brightness Mirror: Also mirror setMax
Follow-up to Ic1f934f9ddbb582453b4b52a4b4402c71ac79654 Bug: 15408618 Change-Id: I3ea82f011f366fe34be2ff07546a7f46c1c3dc55
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java b/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java
index acfeb4f..35b574b 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/ToggleSlider.java
@@ -79,8 +79,9 @@ public class ToggleSlider extends RelativeLayout {
public void setMirror(ToggleSlider toggleSlider) {
mMirror = toggleSlider;
if (mMirror != null) {
- mMirror.mToggle.setChecked(mToggle.isChecked());
- mMirror.mSlider.setProgress(mSlider.getProgress());
+ mMirror.setChecked(mToggle.isChecked());
+ mMirror.setMax(mSlider.getMax());
+ mMirror.setValue(mSlider.getProgress());
}
}
@@ -110,10 +111,16 @@ public class ToggleSlider extends RelativeLayout {
public void setMax(int max) {
mSlider.setMax(max);
+ if (mMirror != null) {
+ mMirror.setMax(max);
+ }
}
public void setValue(int value) {
mSlider.setProgress(value);
+ if (mMirror != null) {
+ mMirror.setValue(value);
+ }
}
private final OnCheckedChangeListener mCheckListener = new OnCheckedChangeListener() {
@@ -141,7 +148,7 @@ public class ToggleSlider extends RelativeLayout {
}
if (mMirror != null) {
- mMirror.mSlider.setProgress(progress);
+ mMirror.setValue(progress);
}
}