aboutsummaryrefslogtreecommitdiffstats
path: root/android/avd
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2012-03-16 12:25:23 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2012-03-19 08:29:19 -0700
commit863d1010d9c8fa4342b1b0ea860bcfb096806acc (patch)
tree6e6bb1fa3e508f9633586b2a4b9db73ffb97d647 /android/avd
parenta342edc996e079f2d1a913ec19d25fd1c118af4e (diff)
downloadexternal_qemu-863d1010d9c8fa4342b1b0ea860bcfb096806acc.zip
external_qemu-863d1010d9c8fa4342b1b0ea860bcfb096806acc.tar.gz
external_qemu-863d1010d9c8fa4342b1b0ea860bcfb096806acc.tar.bz2
Cleanup harware properties.
1. Remove unused hw.camera.maxHorizontalPixels, and hw.camera.maxVerticalPixels parameters. 2. Combine hw.touchScreen, and hw.multiTouch under one property: hw.screen Change-Id: I3cdf64f7d7e46486110cbc0769f9d98a61f0bea5
Diffstat (limited to 'android/avd')
-rw-r--r--android/avd/hardware-properties.ini29
-rw-r--r--android/avd/hw-config.c18
-rw-r--r--android/avd/hw-config.h7
3 files changed, 31 insertions, 23 deletions
diff --git a/android/avd/hardware-properties.ini b/android/avd/hardware-properties.ini
index 241bf54..fdabcb5 100644
--- a/android/avd/hardware-properties.ini
+++ b/android/avd/hardware-properties.ini
@@ -46,19 +46,12 @@ default = 0
abstract = Device ram size
description = The amount of physical RAM on the device, in megabytes.
-# Touch screen support
-name = hw.touchScreen
-type = boolean
-default = yes
-abstract = Touch-screen support
-description = Whether there is a touch screen or not on the device.
-
-# Multi-touch screen support
-name = hw.multiTouch
-type = boolean
-default = no
-abstract = Multi-touch screen support
-description = Whether there is a multi-touch screen or not on the device.
+# Touch screen type
+name = hw.screen
+type = string
+default = touch
+abstract = Touch screen type
+description = Defines type of the screen. Can be 'touch', 'multi-touch', or 'no-touch'.
# Hardware main keys (back/home)
name = hw.mainKeys
@@ -128,16 +121,6 @@ default = yes
abstract = Camera support
description = Whether the device has a camera.
-name = hw.camera.maxHorizontalPixels
-type = integer
-default = 640
-abstract = Maximum horizontal camera pixels
-
-name = hw.camera.maxVerticalPixels
-type = integer
-default = 480
-abstract = Maximum vertical camera pixels
-
# GPS support
name = hw.gps
type = boolean
diff --git a/android/avd/hw-config.c b/android/avd/hw-config.c
index 65796d9..2d50ef7 100644
--- a/android/avd/hw-config.c
+++ b/android/avd/hw-config.c
@@ -125,3 +125,21 @@ androidHwConfig_done( AndroidHwConfig* config )
#include "android/avd/hw-config-defs.h"
}
+
+int
+androidHwConfig_isScreenNoTouch( AndroidHwConfig* config )
+{
+ return strcmp(config->hw_screen, "no-touch") == 0;
+}
+
+int
+androidHwConfig_isScreenTouch( AndroidHwConfig* config )
+{
+ return strcmp(config->hw_screen, "touch") == 0;
+}
+
+int
+androidHwConfig_isScreenMultiTouch( AndroidHwConfig* config )
+{
+ return strcmp(config->hw_screen, "multi-touch") == 0;
+}
diff --git a/android/avd/hw-config.h b/android/avd/hw-config.h
index 3c2480a..fd99e45 100644
--- a/android/avd/hw-config.h
+++ b/android/avd/hw-config.h
@@ -57,4 +57,11 @@ int androidHwConfig_write( AndroidHwConfig* hwConfig,
/* Finalize a given hardware configuration */
void androidHwConfig_done( AndroidHwConfig* config );
+/* Checks if screen doesn't support touch, or multi-touch */
+int androidHwConfig_isScreenNoTouch( AndroidHwConfig* config );
+/* Checks if screen supports touch (but not multi-touch). */
+int androidHwConfig_isScreenTouch( AndroidHwConfig* config );
+/* Checks if screen supports multi-touch. */
+int androidHwConfig_isScreenMultiTouch( AndroidHwConfig* config );
+
#endif /* _ANDROID_AVD_HW_CONFIG_H */