diff options
author | Roman Birg <roman@cyngn.com> | 2016-04-26 15:53:43 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-04-27 15:26:50 -0700 |
commit | 08147933e211b727c5d3dda3222f20bb7f70f429 (patch) | |
tree | f3a2d66d31d8f1c9ebccf9c9c70561094bd78ee4 /src/com | |
parent | b2c27cdb839074d5ea2b73568c239543760afe5d (diff) | |
download | packages_apps_Settings-08147933e211b727c5d3dda3222f20bb7f70f429.zip packages_apps_Settings-08147933e211b727c5d3dda3222f20bb7f70f429.tar.gz packages_apps_Settings-08147933e211b727c5d3dda3222f20bb7f70f429.tar.bz2 |
Settings: restore proper live display color profile
Select currently selected, not default, profile.
Ticket: CYNGNOS-2575
Change-Id: I8db23feefd88776949fe0af356b320b8b4a7b8cb
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/livedisplay/LiveDisplay.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/settings/livedisplay/LiveDisplay.java b/src/com/android/settings/livedisplay/LiveDisplay.java index 5cb7aff..f4214b9 100644 --- a/src/com/android/settings/livedisplay/LiveDisplay.java +++ b/src/com/android/settings/livedisplay/LiveDisplay.java @@ -232,7 +232,8 @@ public class LiveDisplay extends SettingsPreferenceFragment implements return false; } - final DisplayMode cur = mHardware.getDefaultDisplayMode(); + final DisplayMode cur = mHardware.getCurrentDisplayMode() != null + ? mHardware.getCurrentDisplayMode() : mHardware.getDefaultDisplayMode(); int curId = -1; String[] entries = new String[modes.length]; String[] values = new String[modes.length]; @@ -252,7 +253,7 @@ public class LiveDisplay extends SettingsPreferenceFragment implements mColorProfileSummaries[i] = summary; if (cur != null && modes[i].id == cur.id) { - curId = -1; + curId = cur.id; } } mColorProfile.setEntries(entries); @@ -270,7 +271,8 @@ public class LiveDisplay extends SettingsPreferenceFragment implements } if (value == null) { - DisplayMode cur = mHardware.getDefaultDisplayMode(); + DisplayMode cur = mHardware.getCurrentDisplayMode() != null + ? mHardware.getCurrentDisplayMode() : mHardware.getDefaultDisplayMode(); if (cur != null && cur.id >= 0) { value = String.valueOf(cur.id); } |