Index: remoting/android/java/src/org/chromium/chromoting/SessionAuthenticator.java |
diff --git a/remoting/android/java/src/org/chromium/chromoting/SessionAuthenticator.java b/remoting/android/java/src/org/chromium/chromoting/SessionAuthenticator.java |
index ce50a040231dd17d144310add62ce39b22e60f00..a18c2f463782a5a430a090b226c7908d05be9d07 100644 |
--- a/remoting/android/java/src/org/chromium/chromoting/SessionAuthenticator.java |
+++ b/remoting/android/java/src/org/chromium/chromoting/SessionAuthenticator.java |
@@ -16,7 +16,7 @@ |
import android.widget.TextView; |
import android.widget.Toast; |
-import org.chromium.chromoting.jni.Client; |
+import org.chromium.chromoting.jni.JniInterface; |
/** |
* This class performs the user-interaction needed to authenticate the session connection. This |
@@ -29,18 +29,14 @@ |
*/ |
private Chromoting mApplicationContext; |
- /** Client connection being authenticated. */ |
- private final Client mClient; |
- |
/** Provides the tokenUrlPatterns for this host during fetchThirdPartyTokens(). */ |
private HostInfo mHost; |
/** Object for fetching OAuth2 access tokens from third party authorization servers. */ |
private ThirdPartyTokenFetcher mTokenFetcher; |
- public SessionAuthenticator(Chromoting context, Client client, HostInfo host) { |
+ public SessionAuthenticator(Chromoting context, HostInfo host) { |
mApplicationContext = context; |
- mClient = client; |
mHost = host; |
} |
@@ -66,8 +62,8 @@ |
R.string.connect_button, new DialogInterface.OnClickListener() { |
@Override |
public void onClick(DialogInterface dialog, int which) { |
- if (mClient.isConnected()) { |
- mClient.handleAuthenticationResponse( |
+ if (JniInterface.isConnected()) { |
+ JniInterface.handleAuthenticationResponse( |
String.valueOf(pinTextView.getText()), |
pinCheckBox.isChecked(), Build.MODEL); |
} else { |
@@ -82,7 +78,7 @@ |
R.string.cancel, new DialogInterface.OnClickListener() { |
@Override |
public void onClick(DialogInterface dialog, int which) { |
- mClient.destroy(); |
+ JniInterface.disconnectFromHost(); |
} |
}); |
@@ -142,7 +138,7 @@ |
// authenticate itself with the host using spake. |
String sharedSecret = accessToken; |
- mClient.onThirdPartyTokenFetched(token, sharedSecret); |
+ JniInterface.onThirdPartyTokenFetched(token, sharedSecret); |
} |
}; |
mTokenFetcher = new ThirdPartyTokenFetcher(mApplicationContext, mHost.getTokenUrlPatterns(), |