Wire up default connections in the core for #10418.
authorEd Swartz <ed.swartz@nokia.com>
Wed, 30 Dec 2009 09:59:34 -0600
changeset 729 477762bc3b31
parent 728 a39d0ba41f81
child 730 8ecd45ef360e
Wire up default connections in the core for #10418.
connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java
--- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Tue Dec 29 15:47:09 2009 -0600
+++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java	Wed Dec 30 09:59:34 2009 -0600
@@ -518,7 +518,12 @@
 	
 	public IConnection ensureConnection(String id, IService service) throws CoreException {
 		Check.checkArg(service);
-		IConnection connection = findConnectionById(id);
+		IConnection connection;
+		if (DEFAULT_CONNECTION_ID.equals(id)) {
+			connection = getDefaultConnection();
+		} else {
+			connection = findConnectionById(id);
+		}
 		if (!isCompatibleConnection(connection, service)) {
 			// TODO ask user to connect a device or cancel
 			throw new CoreException(