From 57fccb7d75d57e26b267dff73c69d655f5a66a40 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Fri, 24 Oct 2014 17:59:29 +0900 Subject: [PATCH] Mobile Launcher: Add sensor option.(press, uv, hrm) Change-Id: I814457968699c63d153b4b01ade0344d866dff3c Signed-off-by: minkee.lee --- .../emulator/manager/mobile/vms/Launcher.java | 23 +++++++++++++++++++++- template/x86-standard-template.xml | 3 +++ template/x86-standard.xml | 3 +++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/plugin-project/mobile-plugin/src/org/tizen/emulator/manager/mobile/vms/Launcher.java b/plugin-project/mobile-plugin/src/org/tizen/emulator/manager/mobile/vms/Launcher.java index 547751c..7322bbd 100644 --- a/plugin-project/mobile-plugin/src/org/tizen/emulator/manager/mobile/vms/Launcher.java +++ b/plugin-project/mobile-plugin/src/org/tizen/emulator/manager/mobile/vms/Launcher.java @@ -85,6 +85,9 @@ public class Launcher implements ILauncher { public static final String OPT_LIGHT = "light"; public static final String OPT_PROXI = "proxi"; public static final String OPT_HAPTIC = "haptic"; + public static final String OPT_PRESS = "press"; // pressure + public static final String OPT_UV = "uv"; // ultra violet + public static final String OPT_HRM = "hrm"; // heartbeat rate meter public static Launcher getInstance() { if (launcher == null) { @@ -339,7 +342,7 @@ public class Launcher implements ILauncher { cmd.add("virtio-touchscreen-pci"); } - // for sensor (accel, geo, gyro, light, proxi, haptic) + // for sensor (accel, geo, gyro, light, proxi, haptic, pressure, ultra violet, heart rate meter) OptionType sensor = property.getPropertyValue().getAdvancedOption(OPT_SENSOR); if (sensor != null) { cmd.add("-device"); @@ -381,6 +384,24 @@ public class Launcher implements ILauncher { } sb.append("haptic"); } + if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_PRESS))) { + if(!sb.toString().isEmpty()) { + sb.append("&"); + } + sb.append("press"); + } + if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_UV))) { + if(!sb.toString().isEmpty()) { + sb.append("&"); + } + sb.append("uv"); + } + if (checkOnOff(property.getPropertyValue().getAdvancedOptionSubValue(OPT_SENSOR, OPT_HRM))) { + if(!sb.toString().isEmpty()) { + sb.append("&"); + } + sb.append("hrm"); + } if (sb.toString().isEmpty()) { cmd.add("virtio-sensor-pci"); diff --git a/template/x86-standard-template.xml b/template/x86-standard-template.xml index e2ff132..53a311d 100644 --- a/template/x86-standard-template.xml +++ b/template/x86-standard-template.xml @@ -53,6 +53,9 @@ + + + diff --git a/template/x86-standard.xml b/template/x86-standard.xml index 8dffd90..4bc3a46 100644 --- a/template/x86-standard.xml +++ b/template/x86-standard.xml @@ -44,6 +44,9 @@ + + + -- 2.7.4