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

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

Issue 2632103002: (Android) Replacing deprecated API with current (Closed)
Patch Set: Indentation fix after previous patch set Created 3 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
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 f72d0991ece257c1f8dd386c143494b15dc3e7a6..7b7736e430d7d70d440526e8155130b78dbcb1d9 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
@@ -11,6 +11,7 @@ import android.os.Bundle;
import com.google.android.gms.cast.ApplicationMetadata;
import com.google.android.gms.cast.Cast;
import com.google.android.gms.cast.CastStatusCodes;
+import com.google.android.gms.cast.LaunchOptions;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
@@ -233,10 +234,10 @@ public class CreateRouteRequest implements GoogleApiClient.ConnectionCallbacks,
}
private GoogleApiClient createApiClient(Cast.Listener listener, Context context) {
- Cast.CastOptions.Builder apiOptionsBuilder = Cast.CastOptions
- .builder(mSink.getDevice(), listener)
- // TODO(avayvod): hide this behind the flag or remove
- .setVerboseLoggingEnabled(true);
+ Cast.CastOptions.Builder apiOptionsBuilder =
+ new Cast.CastOptions.Builder(mSink.getDevice(), listener)
+ // TODO(avayvod): hide this behind the flag or remove
+ .setVerboseLoggingEnabled(true);
return new GoogleApiClient.Builder(context)
.addApi(Cast.API, apiOptionsBuilder.build())
@@ -249,7 +250,10 @@ public class CreateRouteRequest implements GoogleApiClient.ConnectionCallbacks,
GoogleApiClient apiClient,
String appId,
boolean relaunchIfRunning) {
- return Cast.CastApi.launchApplication(apiClient, appId, relaunchIfRunning);
+ LaunchOptions.Builder builder = new LaunchOptions.Builder();
+ return Cast.CastApi.launchApplication(apiClient, appId,
+ builder.setRelaunchIfRunning(relaunchIfRunning)
+ .build());
}
// TODO(crbug.com/635567): Fix this properly.

Powered by Google App Engine
This is Rietveld 408576698