[Title] Check if device is root before launching launch wizard
authordonghyuk.yang <donghyuk.yang@samsung.com>
Mon, 24 Jun 2013 07:42:13 +0000 (16:42 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Mon, 24 Jun 2013 07:42:13 +0000 (16:42 +0900)
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/PlatformLaunchDelegate.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/PlatformProjectAttachLaunchShortcut.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/PlatformProjectLaunchShortcut.java

index 4c20bed..fe49d63 100644 (file)
@@ -181,8 +181,6 @@ public class PlatformLaunchDelegate extends AbstractCLaunchDelegate {
 
     protected void setConfiguration(ILaunchConfiguration config, String mode,
             IProgressMonitor monitor)
-    // protected void setConfigIfNotFromShortcut(ILaunchConfiguration config,
-    // String mode, IProgressMonitor monitor)
             throws CoreException {
         installPackages(config, mode, monitor);
     }
index fc0690a..88476aa 100644 (file)
@@ -77,6 +77,7 @@ import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants;
 import org.tizen.nativecommon.launch.TizenLaunchMessages;
 import org.tizen.nativeplatform.build.PlatformConfigurationManager;
 import org.tizen.nativeplatform.launch.ITizenLaunchConfigurationConstants;
+import org.tizen.nativeplatform.launch.PlatformLaunchMessages;
 import org.tizen.nativeplatform.launch.wizards.PlatformAttachLaunchWizard;
 import org.tizen.nativeplatform.launch.wizards.PlatformLaunchUtils;
 import org.tizen.nativeplatform.launch.wizards.PlatformLaunchWizardDialog;
@@ -120,6 +121,10 @@ public class PlatformProjectAttachLaunchShortcut extends CApplicationLaunchShort
             DialogUtil.openErrorDialog(TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE);
             return;
         }
+        if (!device.isRoot()) {
+            DialogUtil.openErrorDialog(PlatformLaunchMessages.DEVICE_IS_NOT_ROOT_ON);
+            return;
+        }
 
         if (elements != null && elements.length > 0) {
             int nElements = elements.length;
index d98f326..9518701 100644 (file)
@@ -77,6 +77,7 @@ import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants;
 import org.tizen.nativecommon.launch.TizenLaunchMessages;
 import org.tizen.nativeplatform.build.PlatformConfigurationManager;
 import org.tizen.nativeplatform.launch.ITizenLaunchConfigurationConstants;
+import org.tizen.nativeplatform.launch.PlatformLaunchMessages;
 import org.tizen.nativeplatform.launch.wizards.PlatformLaunchUtils;
 import org.tizen.nativeplatform.launch.wizards.PlatformLaunchWizard;
 import org.tizen.nativeplatform.launch.wizards.PlatformLaunchWizardDialog;
@@ -125,6 +126,10 @@ public class PlatformProjectLaunchShortcut extends CApplicationLaunchShortcut {
             DialogUtil.openErrorDialog(TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE);
             return;
         }
+        if (!device.isRoot()) {
+            DialogUtil.openErrorDialog(PlatformLaunchMessages.DEVICE_IS_NOT_ROOT_ON);
+            return;
+        }
 
         if (elements != null && elements.length > 0) {
             int nElements = elements.length;