summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/settings/livedisplay/LiveDisplay.java8
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);
}