Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: remoting/android/java/src/org/chromium/chromoting/Chromoting.java

Issue 582873004: Android Chromoting: Remove duplicate code for fetching the host list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/android/java/src/org/chromium/chromoting/Chromoting.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/Chromoting.java b/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
index f0901bc2d8e4655d9eadede2411628cee3035e7c..956cf75727a242640fa45e0ffd8afca0a1f5e7f7 100644
--- a/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
+++ b/remoting/android/java/src/org/chromium/chromoting/Chromoting.java
@@ -174,6 +174,7 @@ public class Chromoting extends Activity implements JniInterface.ConnectionListe
}
}
}
+
/**
* Called when the activity becomes visible. This happens on initial launch and whenever the
* user switches to the activity, for example, by using the window-switcher or when coming from
@@ -306,12 +307,6 @@ public class Chromoting extends Activity implements JniInterface.ConnectionListe
try {
// Here comes our auth token from the Android system.
result = future.getResult();
- String authToken = result.getString(AccountManager.KEY_AUTHTOKEN);
- Log.i("auth", "Received an auth token from system");
-
- mToken = authToken;
-
- mHostListLoader.retrieveHostList(authToken, this);
} catch (OperationCanceledException ex) {
// User canceled authentication. No need to report an error.
} catch (AuthenticatorException ex) {
@@ -327,12 +322,10 @@ public class Chromoting extends Activity implements JniInterface.ConnectionListe
return;
}
- String authToken = result.getString(AccountManager.KEY_AUTHTOKEN);
+ mToken = result.getString(AccountManager.KEY_AUTHTOKEN);
Log.i("auth", "Received an auth token from system");
- mToken = authToken;
-
- mHostListLoader.retrieveHostList(authToken, this);
+ mHostListLoader.retrieveHostList(mToken, this);
}
@Override
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698