aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cm/lib/main/java/org/cyanogenmod/platform/internal/display/DisplayHardwareController.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/cm/lib/main/java/org/cyanogenmod/platform/internal/display/DisplayHardwareController.java b/cm/lib/main/java/org/cyanogenmod/platform/internal/display/DisplayHardwareController.java
index 5e90c54..b43e17b 100644
--- a/cm/lib/main/java/org/cyanogenmod/platform/internal/display/DisplayHardwareController.java
+++ b/cm/lib/main/java/org/cyanogenmod/platform/internal/display/DisplayHardwareController.java
@@ -47,6 +47,7 @@ public class DisplayHardwareController extends LiveDisplayFeature {
private final boolean mUseColorAdjustment;
private final boolean mUseColorEnhancement;
private final boolean mUseCABC;
+ private final boolean mUseDisplayModes;
// default values
private final boolean mDefaultAutoContrast;
@@ -92,6 +93,10 @@ public class DisplayHardwareController extends LiveDisplayFeature {
mUseColorAdjustment = mHardware
.isSupported(CMHardwareManager.FEATURE_DISPLAY_COLOR_CALIBRATION);
+
+ mUseDisplayModes = mHardware
+ .isSupported(CMHardwareManager.FEATURE_DISPLAY_MODES);
+
if (mUseColorAdjustment) {
mMaxColor = mHardware.getDisplayColorCalibrationMax();
copyColors(getColorAdjustment(), mColorAdjustment);
@@ -138,7 +143,11 @@ public class DisplayHardwareController extends LiveDisplayFeature {
if (mUseColorAdjustment) {
caps.set(LiveDisplayManager.FEATURE_COLOR_ADJUSTMENT);
}
- return mUseAutoContrast || mUseColorEnhancement || mUseCABC || mUseColorAdjustment;
+ if (mUseDisplayModes) {
+ caps.set(LiveDisplayManager.FEATURE_DISPLAY_MODES);
+ }
+ return mUseAutoContrast || mUseColorEnhancement || mUseCABC || mUseColorAdjustment ||
+ mUseDisplayModes;
}
@Override
@@ -190,6 +199,7 @@ public class DisplayHardwareController extends LiveDisplayFeature {
pw.println(" mUseColorAdjustment=" + mUseColorAdjustment);
pw.println(" mUseColorEnhancement=" + mUseColorEnhancement);
pw.println(" mUseCABC=" + mUseCABC);
+ pw.println(" mUseDisplayModes=" + mUseDisplayModes);
pw.println();
pw.println(" DisplayHardwareController State:");
pw.println(" mAutoContrast=" + isAutoContrastEnabled());