Merge "Fix unresponsive brightness slider after font size change" into nyc-dev
This commit is contained in:
@@ -72,6 +72,8 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
|||||||
private QSCustomizer mCustomizePanel;
|
private QSCustomizer mCustomizePanel;
|
||||||
private Record mDetailRecord;
|
private Record mDetailRecord;
|
||||||
|
|
||||||
|
private BrightnessMirrorController mBrightnessMirrorController;
|
||||||
|
|
||||||
public QSPanel(Context context) {
|
public QSPanel(Context context) {
|
||||||
this(context, null);
|
this(context, null);
|
||||||
}
|
}
|
||||||
@@ -159,7 +161,7 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setBrightnessMirror(BrightnessMirrorController c) {
|
public void setBrightnessMirror(BrightnessMirrorController c) {
|
||||||
super.onFinishInflate();
|
mBrightnessMirrorController = c;
|
||||||
ToggleSlider brightnessSlider = (ToggleSlider) findViewById(R.id.brightness_slider);
|
ToggleSlider brightnessSlider = (ToggleSlider) findViewById(R.id.brightness_slider);
|
||||||
ToggleSlider mirror = (ToggleSlider) c.getMirror().findViewById(R.id.brightness_slider);
|
ToggleSlider mirror = (ToggleSlider) c.getMirror().findViewById(R.id.brightness_slider);
|
||||||
brightnessSlider.setMirror(mirror);
|
brightnessSlider.setMirror(mirror);
|
||||||
@@ -205,6 +207,11 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
|||||||
protected void onConfigurationChanged(Configuration newConfig) {
|
protected void onConfigurationChanged(Configuration newConfig) {
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
mFooter.onConfigurationChanged();
|
mFooter.onConfigurationChanged();
|
||||||
|
|
||||||
|
if (mBrightnessMirrorController != null) {
|
||||||
|
// Reload the mirror in case it got reinflated but we didn't.
|
||||||
|
setBrightnessMirror(mBrightnessMirrorController);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCollapse() {
|
public void onCollapse() {
|
||||||
|
|||||||
Reference in New Issue
Block a user