Avoid initial PCCS discovery dialog on non-Win32 systems
authorEd Swartz <ed.swartz@nokia.com>
Mon, 22 Feb 2010 08:56:37 -0600
changeset 1001 3360f7e9df9f
parent 996 1923bf044315
child 1002 ccd4bc5cc078
Avoid initial PCCS discovery dialog on non-Win32 systems
connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/META-INF/MANIFEST.MF
connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java
--- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/META-INF/MANIFEST.MF	Fri Feb 19 09:31:35 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/META-INF/MANIFEST.MF	Mon Feb 22 08:56:37 2010 -0600
@@ -9,7 +9,8 @@
  org.eclipse.core.runtime,
  org.eclipse.jface,
  org.eclipse.ui,
- com.nokia.carbide.remoteConnections
+ com.nokia.carbide.remoteConnections,
+ com.nokia.cpp.utils.core;bundle-version="1.0.0"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Bundle-ActivationPolicy: lazy
 Bundle-ClassPath: .,
--- a/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java	Fri Feb 19 09:31:35 2010 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections.discovery.pccs/src/com/nokia/carbide/remoteconnections/discovery/pccs/agent/PCCSDiscoveryAgent.java	Mon Feb 22 08:56:37 2010 -0600
@@ -37,6 +37,7 @@
 import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager;
 import com.nokia.carbide.remoteconnections.internal.api.IConnection2;
 import com.nokia.carbide.remoteconnections.internal.api.IDeviceDiscoveryAgent;
+import com.nokia.cpp.internal.api.utils.core.HostOS;
 
 /**
  * Implementation of IDeviceDiscoveryAgent for PCCS USB connection.
@@ -296,16 +297,18 @@
 	}
 
 	public IPrerequisiteStatus getPrerequisiteStatus() {
-		// Manager calls this first so we can check if we can load.
-		// so let's open the discovery and close it catching any exceptions.
-		try {
-			pccsConnection.open();
-			// successful load - close it as start() will open again
-			pccsConnection.close();
-		} catch (CoreException ce) {
-			saveLoadStatus(ce);
-		}
-		
+		// Only try on platforms that run PC Suite
+		if (HostOS.IS_WIN32) {
+			// Manager calls this first so we can check if we can load.
+			// so let's open the discovery and close it catching any exceptions.
+			try {
+				pccsConnection.open();
+				// successful load - close it as start() will open again
+				pccsConnection.close();
+			} catch (CoreException ce) {
+				saveLoadStatus(ce);
+			}
+		}		
 		return loadStatus;
 	}
 }