Commit e14e5850 authored by Thomas Guilbert's avatar Thomas Guilbert Committed by Commit Bot

Propagate cast application stop

Currently, if a cast application is stopped from a different device that
started the application, RemotePlayback is not properly torn down. This
is because the cast application listener is never given a reference to
the session that it should tear down.

This CL fixes the issue, and adds a pre-emptive null check.

Bug: 790766
Change-Id: I6fa67ca87a05efd135c57b396d6d09e69065a6f3
Reviewed-on: https://chromium-review.googlesource.com/c/1327605Reviewed-by: default avatarZhiqiang Zhang <zqzhang@chromium.org>
Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607035}
parent 1f73e646
......@@ -146,6 +146,7 @@ public class ChromeCastSessionManager {
mSession = session;
mSessionLaunching = false;
mCurrentSessionListener.onSessionStarted(session);
mListener.setSession(session);
}
/**
......@@ -173,7 +174,7 @@ public class ChromeCastSessionManager {
* Stops the current session.
*/
public void stopApplication() {
mSession.stopApplication();
if (mSession != null) mSession.stopApplication();
}
/**
......
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