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.

Merged-In: I895d251e1dc12cb114ef00328eb8aa0075d77ab1
Change-Id: Ice549ffd708c2dad311a87b6a92bf1c8db426456
Fix: 37227609
Test: make RunSettingsRoboTests
This commit is contained in:
Doris Ling
2017-04-13 15:06:36 -07:00
committed by Fan Zhang
parent a0e617f96d
commit 4b95879634
5 changed files with 277 additions and 37 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;
}