From 37a13208c93bbe00cf233baf1ebcd6e081972a27 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Wed, 14 Oct 2009 11:55:50 -0700 Subject: [PATCH] Add separate configuration flag for hardware ALS support. A new flag config_hardware_automatic_brightness_available indicates that the device has hardware support for automatic screen brightness management, while config_automatic_brightness_available now indicates that automatic brightness mode is available in general. If config_automatic_brightness_available is true but config_hardware_automatic_brightness_available is false, then automatic brightness mode support in PowerManager support will be used. Bug b/2015734 (Ambient light sensor support in power manager) Change-Id: I6cd888252043dd63df3c25a1d14c21a04a91ad28 Signed-off-by: Mike Lockwood --- core/res/res/values/config.xml | 6 +++++- services/java/com/android/server/HardwareService.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index c87a11c6de539..45fcaa59e8405 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -67,7 +67,11 @@ the slider can be opened (for example, in a pocket or purse). --> true - + + false + + false diff --git a/services/java/com/android/server/HardwareService.java b/services/java/com/android/server/HardwareService.java index 29c13e04f7f83..7c56a30804e81 100755 --- a/services/java/com/android/server/HardwareService.java +++ b/services/java/com/android/server/HardwareService.java @@ -133,7 +133,7 @@ public class HardwareService extends IHardwareService.Stub { context.registerReceiver(mIntentReceiver, filter); mAutoBrightnessAvailable = context.getResources().getBoolean( - com.android.internal.R.bool.config_automatic_brightness_available); + com.android.internal.R.bool.config_hardware_automatic_brightness_available); } protected void finalize() throws Throwable {