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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java

Issue 1376703002: Presentation API: reject screen availability observing on Android low ram devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.media.router.cast; 5 package org.chromium.chrome.browser.media.router.cast;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.support.v7.media.MediaRouter; 8 import android.support.v7.media.MediaRouter;
9 9
10 import org.chromium.chrome.browser.media.router.DiscoveryDelegate; 10 import org.chromium.chrome.browser.media.router.DiscoveryDelegate;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 194 }
195 195
196 @Nullable 196 @Nullable
197 private static MediaRouter getAndroidMediaRouter(Context applicationContext) { 197 private static MediaRouter getAndroidMediaRouter(Context applicationContext) {
198 try { 198 try {
199 // Pre-MR1 versions of JB do not have the complete MediaRouter APIs, 199 // Pre-MR1 versions of JB do not have the complete MediaRouter APIs,
200 // so getting the MediaRouter instance will throw an exception. 200 // so getting the MediaRouter instance will throw an exception.
201 return MediaRouter.getInstance(applicationContext); 201 return MediaRouter.getInstance(applicationContext);
202 } catch (NoSuchMethodError e) { 202 } catch (NoSuchMethodError e) {
203 return null; 203 return null;
204 } catch (NoClassDefFoundError e) {
205 // Happens with Robolectric.
mark a. foltz 2015/10/01 18:33:28 This comment didn't make sense to me, maybe it doe
206 return null;
204 } 207 }
205 } 208 }
206 209
207 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698