From 94ddbc9e84a5878a39695766610869d21966bedf Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Tue, 8 Dec 2015 00:30:22 -0800 Subject: cmhw: Add isSelfManaged for SRE module * Some implementations of this do their own ambient sensing. Add a flag to enable this. TICKET: CYNGNOS-2237 Change-Id: Ic575b42740de1cfcd109883013417142bed2cd4e (cherry picked from commit 595a401a0b52fa2058df7e24435921ac08fb2e3a) --- src/org/cyanogenmod/hardware/SunlightEnhancement.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/org/cyanogenmod/hardware/SunlightEnhancement.java b/src/org/cyanogenmod/hardware/SunlightEnhancement.java index 0045eed..7ddbf41 100644 --- a/src/org/cyanogenmod/hardware/SunlightEnhancement.java +++ b/src/org/cyanogenmod/hardware/SunlightEnhancement.java @@ -55,4 +55,17 @@ public class SunlightEnhancement { * @return boolean False if adaptive backlight is not a dependency */ public static boolean isAdaptiveBacklightRequired() { return true; } + + /** + * Set this to true if the implementation is self-managed and does + * it's own ambient sensing. In this case, setEnabled is assumed + * to toggle the feature on or off, but not activate it. If set + * to false, LiveDisplay will call setEnabled when the ambient lux + * threshold is crossed. + * + * @return true if this enhancement is self-managed + */ + public static boolean isSelfManaged() { + return false; + } } -- cgit v1.2.3