aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {