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

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

Issue 2760373003: [Remoting Android] Fix crash caused by fetchAuthToken() (Closed)
Patch Set: Created 3 years, 9 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/jni/JniInterface.java
diff --git a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
index 3a4fcf15ebc17f16f9aaf48573c27852c6071669..8f9f6b3ee3775afab8e99399538c778bff835424 100644
--- a/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
+++ b/remoting/android/java/src/org/chromium/chromoting/jni/JniInterface.java
@@ -59,7 +59,11 @@ public class JniInterface {
@CalledByNative
private static void fetchAuthToken() {
if (sAccount == null) {
- throw new IllegalStateException("Account is not set before fetching the auth token.");
+ // It is safe to ignore this request since setAccountForLogging() will be called later
+ // and will request the auth token. Logs will be queued up and sent once the auth token
+ // is set.
+ Log.w(TAG, "Account is not set before fetching the auth token.");
+ return;
}
sLoggerTokenConsumer.consume(sAccount, new OAuthTokenFetcher.Callback() {
@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