Commit edf193ed authored by Evan Stade's avatar Evan Stade Committed by Chromium LUCI CQ

Remove obsolete try/catch from media code.

This code was only relevant for pre-MR1 Jellybean, whereas Lollipop is
the oldest version of Android still supported.

Bug: none
Change-Id: I305551035a5dc12ce19843fbda22b8226ebd6cde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2551676Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832157}
parent dc58dd03
...@@ -224,16 +224,9 @@ class ChromeMediaNotificationControllerDelegate implements MediaNotificationCont ...@@ -224,16 +224,9 @@ class ChromeMediaNotificationControllerDelegate implements MediaNotificationCont
@Override @Override
public void onMediaSessionUpdated(MediaSessionCompat session) { public void onMediaSessionUpdated(MediaSessionCompat session) {
try { // Tell the MediaRouter about the session, so that Chrome can control the volume
// Tell the MediaRouter about the session, so that Chrome can control the volume // on the remote cast device (if any).
// on the remote cast device (if any). MediaRouter.getInstance(getContext()).setMediaSessionCompat(session);
// Pre-MR1 versions of JB do not have the complete MediaRouter APIs,
// so getting the MediaRouter instance will throw an exception.
MediaRouter.getInstance(getContext()).setMediaSessionCompat(session);
} catch (NoSuchMethodError e) {
// Do nothing. Chrome can't be casting without a MediaRouter, so there is nothing
// to do here.
}
} }
@Override @Override
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment