Listen to brigtness updates to update brightness summary.

- add content observer for brightness relates changes, and update the
brightness preference summary when changes occur.
- also check for VR mode and auto brightness mode when reading the
current brightness value.

Bug: 37227609
Test: make RunSettingsRoboTests
Change-Id: I895d251e1dc12cb114ef00328eb8aa0075d77ab1
This commit is contained in:
Doris Ling
2017-04-13 15:06:36 -07:00
committed by Fan Zhang
parent 564c74b8b2
commit 83e2741bd7
5 changed files with 278 additions and 33 deletions

View File

@@ -104,7 +104,7 @@ public class DisplaySettings extends DashboardFragment {
controllers.add(new VrDisplayPreferenceController(context));
controllers.add(new WallpaperPreferenceController(context));
controllers.add(new ThemePreferenceController(context));
controllers.add(new BrightnessLevelPreferenceController(context));
controllers.add(new BrightnessLevelPreferenceController(context, lifecycle));
return controllers;
}