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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java

Issue 1614833003: [Cast,Android] Fix the RuntimeException crasher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only change behavior of one method Created 4 years, 11 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: chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java
index b061e771ed15fc0382ccec01d72b7c9b93f688ca..59c0b85abed86043ad6f7e33e6b6e5bb36af1c0a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java
@@ -169,7 +169,10 @@ public class CreateRouteRequest implements GoogleApiClient.ConnectionCallbacks,
@Override
public void onResult(Cast.ApplicationConnectionResult result) {
- if (mState != STATE_LAUNCHING_APPLICATION) throwInvalidState();
+ if (mState != STATE_LAUNCHING_APPLICATION
+ && mState != STATE_API_CONNECTION_SUSPENDED) {
+ throwInvalidState();
+ }
Status status = result.getStatus();
if (!status.isSuccess()) {
« 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