| Index: remoting/android/java/src/org/chromium/chromoting/SessionConnector.java
|
| diff --git a/remoting/android/java/src/org/chromium/chromoting/SessionConnector.java b/remoting/android/java/src/org/chromium/chromoting/SessionConnector.java
|
| index 5bb53f548ddf4f69cd1d9a8f59193bcaff2cfc35..9c670aded4ee6b5559919945489df14d52422c79 100644
|
| --- a/remoting/android/java/src/org/chromium/chromoting/SessionConnector.java
|
| +++ b/remoting/android/java/src/org/chromium/chromoting/SessionConnector.java
|
| @@ -4,15 +4,15 @@
|
|
|
| package org.chromium.chromoting;
|
|
|
| +import org.chromium.chromoting.jni.Client;
|
| import org.chromium.chromoting.jni.ConnectionListener;
|
| -import org.chromium.chromoting.jni.JniInterface;
|
|
|
| /**
|
| * This class manages making a connection to a host, with logic for reloading the host list and
|
| * retrying the connection in the case of a stale host JID.
|
| */
|
| -public class SessionConnector implements ConnectionListener,
|
| - HostListLoader.Callback {
|
| +public class SessionConnector implements ConnectionListener, HostListLoader.Callback {
|
| + private Client mClient;
|
| private ConnectionListener mConnectionCallback;
|
| private HostListLoader.Callback mHostListCallback;
|
| private HostListLoader mHostListLoader;
|
| @@ -37,8 +37,9 @@ public class SessionConnector implements ConnectionListener,
|
| * @param hostListCallback Object to be notified whenever the host list is reloaded.
|
| * @param hostListLoader The object used for reloading the host list.
|
| */
|
| - public SessionConnector(ConnectionListener connectionCallback,
|
| + public SessionConnector(Client client, ConnectionListener connectionCallback,
|
| HostListLoader.Callback hostListCallback, HostListLoader hostListLoader) {
|
| + mClient = client;
|
| mConnectionCallback = connectionCallback;
|
| mHostListCallback = hostListCallback;
|
| mHostListLoader = hostListLoader;
|
| @@ -60,7 +61,7 @@ public class SessionConnector implements ConnectionListener,
|
| return;
|
| }
|
|
|
| - JniInterface.connectToHost(accountName, authToken, host.jabberId, host.id, host.publicKey,
|
| + mClient.connectToHost(accountName, authToken, host.jabberId, host.id, host.publicKey,
|
| this, mAuthenticator);
|
| }
|
|
|
| @@ -110,7 +111,7 @@ public class SessionConnector implements ConnectionListener,
|
| } else {
|
| // Reconnect to the host, but use the original callback directly, instead of this
|
| // wrapper object, so the host list is not loaded again.
|
| - JniInterface.connectToHost(mAccountName, mAuthToken, foundHost.jabberId,
|
| + mClient.connectToHost(mAccountName, mAuthToken, foundHost.jabberId,
|
| foundHost.id, foundHost.publicKey, mConnectionCallback, mAuthenticator);
|
| }
|
| }
|
|
|