diff options
author | Ethan Chen <intervigil@gmail.com> | 2016-04-25 17:44:08 -0700 |
---|---|---|
committer | Ethan Chen <intervigil@gmail.com> | 2016-04-25 17:44:53 -0700 |
commit | c68b38ac3a2d8a2714a5fcf0192956359220159c (patch) | |
tree | e8e0fafaf821329132d573a54dae04e272eb10ff /cm/lib | |
parent | e41c2924cbb6626f0a3e04aa39cdb77c797aaeef (diff) | |
download | vendor_cmsdk-c68b38ac3a2d8a2714a5fcf0192956359220159c.zip vendor_cmsdk-c68b38ac3a2d8a2714a5fcf0192956359220159c.tar.gz vendor_cmsdk-c68b38ac3a2d8a2714a5fcf0192956359220159c.tar.bz2 |
livedisplay: Connect display modes to CMHW
REF: CRACKLING-1069
Change-Id: I5be5cabf316d9bd02ab4ffc169d458ab8d1b46d4
Diffstat (limited to 'cm/lib')
-rw-r--r-- | cm/lib/main/java/org/cyanogenmod/platform/internal/display/DisplayHardwareController.java | 12 |
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()); |