Commit 424dbc38 authored by Thomas Guilbert's avatar Thomas Guilbert Committed by Commit Bot

Add empty check to RemotePlayback app ID

"Invalid Application ID" crashes have surfaced now that the new
RemotePlayback pipeline is turned on by default in M72. The custom app
ID fetched from the AndroidManifest should never be empty in theory, but
in practice it seems like it can be.

This CL fixes the issue by adding an empty check, and falling back to
the default media receiver if ever we aren't able to fetch a valid
app ID.

Bug: 902871
Change-Id: I573f9a11433c1394cee99459a3154539be8d7081
Reviewed-on: https://chromium-review.googlesource.com/c/1354570Reviewed-by: default avatarZhiqiang Zhang <zqzhang@chromium.org>
Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612027}
parent d28e2536
......@@ -106,7 +106,7 @@ public class RemotingMediaSource implements MediaSource {
// Should never happen, implies a corrupt AndroidManifest.
}
sApplicationId = (customAppId != null)
sApplicationId = (customAppId != null && !customAppId.isEmpty())
? customAppId
: CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID;
}
......
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