Mobile template: Changed web-viewer option as experimental.
authorminkee.lee <minkee.lee@samsung.com>
Wed, 17 Sep 2014 07:41:00 +0000 (16:41 +0900)
committerminkee.lee <minkee.lee@samsung.com>
Wed, 17 Sep 2014 07:41:00 +0000 (16:41 +0900)
- Web viewer option showed in UI only when emulator-manager run as experimental mode.

Change-Id: I4ddfc2b76e645df1cc42835f1fed26cc878d244b
Signed-off-by: minkee.lee <minkee.lee@samsung.com>
plugin-project/mobile-plugin/src/org/tizen/emulator/manager/mobile/ui/detail/ItemListFactory.java
template/x86-kiran-template.xml

index c3e9be3..bae73ce 100644 (file)
@@ -50,6 +50,8 @@ import org.tizen.emulator.manager.vms.xml.template.ItemList;
 
 public class ItemListFactory extends CommonItemListFactory {
 
+       private static String ITEM_EXPERIMENTAL = "experimental";
+
        private static void makeItemListOld(List<? extends IViewItem> list) {
                List<IViewItem> itemList = (List<IViewItem>)list;
 
@@ -85,11 +87,16 @@ public class ItemListFactory extends CommonItemListFactory {
                        List<IViewItem> itemList = (List<IViewItem>)list;
                        List<Item> deviceItemList = deviceList.getItem();
                        LineLabelViewItem currentLineLabel = null;   // Top categorizing item
+                       boolean isExperimentalItem = false;
 
                        for (Item item : deviceItemList) {
                                String type = item.getType();
                                String name = item.getName();
 
+                               if (isExperimentalItem && EmulatorManager.getManagerMode() != ManagerModeType.INHOUSE_MODE) {
+                                       continue;
+                               }
+
                                if (name.equals(CheckingRunningEmulator.OPTION_VIEWER)) {
                                        if (EmulatorManager.isLinux()) {
                                                itemList.add(new LabelViewItem(item, currentLineLabel));
@@ -98,8 +105,17 @@ public class ItemListFactory extends CommonItemListFactory {
                                }
 
                                if (type.equals(ItemType.LINE_LABEL.getName())) { // Top categorizing item
-                                       currentLineLabel = new LineLabelViewItem(item);
-                                       itemList.add(currentLineLabel);
+                                       if (name.equals(ITEM_EXPERIMENTAL)) {
+                                               isExperimentalItem = true;
+                                               if (EmulatorManager.getManagerMode() == ManagerModeType.INHOUSE_MODE) {
+                                                       currentLineLabel = new LineLabelViewItem(item);
+                                                       itemList.add(currentLineLabel);
+                                               }
+                                       } else {
+                                               currentLineLabel = new LineLabelViewItem(item);
+                                               itemList.add(currentLineLabel);
+                                               isExperimentalItem = false;
+                                       }
 
                                } else if (type.equals(ItemType.TOGGLE.getName())) {
                                        itemList.add(new OnOffViewItem(item, currentLineLabel));
index 6eee363..d9cd636 100644 (file)
 <!-- Followings are drawn as check box in Emulator Manager vm property UI.-->
        <deviceList>
                <item type="lineLabel" name="advancedOption" title="Advanced Option"/>
-               <item type="label" name="viewer" title="Viewer">
-                       <item type="combo" name="type" title="Type">
-                               <option name="list">Native, Web</option>
-                               <option name="defaultOnCreate">Native</option>
-                       </item>
-               </item>
                <item type="checkLabel" name="sensor" title="Sensor">
                        <item type="checkbox" name="accel" title="Accelerometer"/>
                        <item type="checkbox" name="gyro" title="Gyroscope"/>
                        <item type="checkbox" name="charger" title="Charger"/>
                        <item type="checkbox" name="usb" title="USB"/>
                </item>
+               <item type="lineLabel" name="experimental" title="Experimental Options"/>
+               <item type="label" name="viewer" title="Viewer">
+                       <item type="combo" name="type" title="Type">
+                               <option name="list">Native, Web</option>
+                               <option name="defaultOnCreate">Native</option>
+                       </item>
+               </item>
        </deviceList>
 
 </ItemList>