Mobile Launcher: Add sensor option.(press, uv, hrm)
authorminkee.lee <minkee.lee@samsung.com>
Fri, 24 Oct 2014 08:59:29 +0000 (17:59 +0900)
committerminkee.lee <minkee.lee@samsung.com>
Fri, 24 Oct 2014 08:59:29 +0000 (17:59 +0900)
Change-Id: I814457968699c63d153b4b01ade0344d866dff3c
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
plugin-project/mobile-plugin/src/org/tizen/emulator/manager/mobile/vms/Launcher.java
template/x86-standard-template.xml
template/x86-standard.xml

index 547751c..7322bbd 100644 (file)
@@ -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");
index e2ff132..53a311d 100644 (file)
@@ -53,6 +53,9 @@
                        <item type="checkbox" name="proxi" title="Proximity"/>
                        <item type="checkbox" name="light" title="Light"/>
                        <item type="checkbox" name="haptic" title="Haptic"/>
+                       <item type="checkbox" name="press" title="Pressure"/>
+                       <item type="checkbox" name="uv" title="Ultraviolet"/>
+                       <item type="checkbox" name="hrm" title="Heartbeat Rate"/>
                </item>
                <item type="checkLabel" name="device" title="Device">
        <!--            <item type="checkbox" name="nfc" title="NFC"/> -->
index 8dffd90..4bc3a46 100644 (file)
@@ -44,6 +44,9 @@
                        <subOption name="light" value="on"/>
                        <subOption name="proxi" value="on"/>
                        <subOption name="haptic" value="on"/>
+                       <subOption name="press" value="on"/>
+                       <subOption name="uv" value="on"/>
+                       <subOption name="hrm" value="on"/>
                </option>
        </advancedOption>
 </EmulatorConfiguration>