aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorTim Wan <tim.wan@sonyericsson.com>2011-04-13 15:18:08 +0200
committerJohan Redestig <johan.redestig@sonyericsson.com>2011-04-15 11:43:00 +0200
commit470f6bd314acbf5c2c8a408f5f00b5ce55d5eab4 (patch)
tree95bbf30d8901b33b3fc880853f3fa43f4f06a5d3 /android
parent95ea5b25db2dc300db560f9af5edabd1da438de5 (diff)
downloadexternal_qemu-470f6bd314acbf5c2c8a408f5f00b5ce55d5eab4.zip
external_qemu-470f6bd314acbf5c2c8a408f5f00b5ce55d5eab4.tar.gz
external_qemu-470f6bd314acbf5c2c8a408f5f00b5ce55d5eab4.tar.bz2
Add support for hw.lcd.backlight
Change-Id: I02dc12caa76c86de5d294b6fc857ae37b74f0130
Diffstat (limited to 'android')
-rw-r--r--android/avd/hardware-properties.ini9
-rw-r--r--android/avd/hw-config-defs.h7
-rw-r--r--android/hw-control.c3
3 files changed, 18 insertions, 1 deletions
diff --git a/android/avd/hardware-properties.ini b/android/avd/hardware-properties.ini
index 7d2e7f6..151d3df 100644
--- a/android/avd/hardware-properties.ini
+++ b/android/avd/hardware-properties.ini
@@ -187,6 +187,15 @@ default = 160
abstract = Abstracted LCD density
description = Must be one of 120, 160 or 240. A value used to roughly describe the density of the LCD screen for automatic resource/asset selection.
+# LCD backlight - Enable/Disable LCD backlight simulation
+# default = no : Disabled
+# default = yes : Enabled
+name = hw.lcd.backlight
+type = boolean
+default = yes
+abstract = LCD backlight
+description = Enable/Disable LCD backlight simulation,yes-enabled,no-disabled.
+
# Maximum VM heap size
# Higher values are required for high-dpi devices
# Default will depend on RAM size.
diff --git a/android/avd/hw-config-defs.h b/android/avd/hw-config-defs.h
index 0ab1f0f..6308bd5 100644
--- a/android/avd/hw-config-defs.h
+++ b/android/avd/hw-config-defs.h
@@ -185,6 +185,13 @@ HWCFG_INT(
"Abstracted LCD density",
"Must be one of 120, 160 or 240. A value used to roughly describe the density of the LCD screen for automatic resource/asset selection.")
+HWCFG_BOOL(
+ hw_lcd_backlight,
+ "hw.lcd.backlight",
+ "yes",
+ "LCD backlight",
+ "Enable/Disable LCD backlight simulation,yes-enabled,no-disabled.")
+
HWCFG_INT(
vm_heapSize,
"vm.heapSize",
diff --git a/android/hw-control.c b/android/hw-control.c
index 6dac8c2..9180383 100644
--- a/android/hw-control.c
+++ b/android/hw-control.c
@@ -23,6 +23,7 @@
#include "android/hw-control.h"
#include "cbuffer.h"
#include "android/hw-qemud.h"
+#include "android/globals.h"
#include "android/utils/misc.h"
#include "android/utils/debug.h"
#include "qemu-char.h"
@@ -98,7 +99,7 @@ hw_control_do_query( HwControl* h,
q = if_starts_with( query, querylen, "power:light:brightness:" );
if (q != NULL) {
- if (h->client_funcs.light_brightness) {
+ if (h->client_funcs.light_brightness && android_hw->hw_lcd_backlight) {
char* qq = strchr((const char*)q, ':');
int value;
if (qq == NULL) {