From a2f29cb6efc83df073e66a3cf2c7ba02709b4257 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Tue, 4 Oct 2011 10:41:26 -0700 Subject: Cherrypick fa0c8e from master. do not merge. New AVD property to control presence of hw main keys. This allows injecting a new runtime property into the system running on the emulator to control whether to display the new software back/home keys. Change-Id: I7d3a7ae681d1152f86a8bc7a036fd3ccf5be2e2a --- android/avd/hardware-properties.ini | 13 +++++++++---- vl-android.c | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/android/avd/hardware-properties.ini b/android/avd/hardware-properties.ini index 8fb51b4..a2b05df 100644 --- a/android/avd/hardware-properties.ini +++ b/android/avd/hardware-properties.ini @@ -14,10 +14,8 @@ # - once to implement the hardware configuration loader # (see android/avd/hw-config.h) # -# Hopefully, this file should also be read by a virtual device creation -# tool/wizard to provide a nice user interface (hence the presence of -# the 'abstract' and 'description' keys which are not currently used) -# +# It is also packaged by the SDK and parsed by tools to let the developers +# create AVDs. # # NOTE: if you remove items from this file, be sure that you do not break # the emulator build. @@ -55,6 +53,13 @@ default = yes abstract = Touch-screen support description = Whether there is a touch screen or not on the device. +# Hardware main keys (back/home) +name = hw.mainKeys +type = boolean +default = yes +abstract = Hardware Back/Home keys +description = Whether there are hardware back/home keys on the device. + # Trackball support name = hw.trackBall type = boolean diff --git a/vl-android.c b/vl-android.c index a0041dc..322ddca 100644 --- a/vl-android.c +++ b/vl-android.c @@ -3689,6 +3689,9 @@ int main(int argc, char **argv, char **envp) hwLcd_setBootProperty(density); } + /* Initialize presence of hardware nav button */ + boot_property_add("qemu.hw.mainkeys", android_hw->hw_mainKeys ? "1" : "0"); + /* Initialize TCP dump */ if (android_op_tcpdump) { if (qemu_tcpdump_start(android_op_tcpdump) < 0) { -- cgit v1.1