Bug 1055012 - Verify sessions we're killed before starting load on Chromecast. r=mfinkle
authorWes Johnston <wjohnston@mozilla.com>
Wed, 27 Aug 2014 12:06:17 -0700
changeset 223630 8591ca11b95071b6d22316ad22ffc7d4ce599724
parent 223629 4ed05a6cb24a999567418af4f35d57eff341e4da
child 223631 0ab80c637571d0555719be9b9428ecf4d42bc8dd
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1055012
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1055012 - Verify sessions we're killed before starting load on Chromecast. r=mfinkle
mobile/android/base/ChromeCast.java
--- a/mobile/android/base/ChromeCast.java
+++ b/mobile/android/base/ChromeCast.java
@@ -84,16 +84,19 @@ class ChromeCast implements GeckoMediaPl
         public void onResult(ApplicationConnectionResult result) {
             Status status = result.getStatus();
             debug("ApplicationConnectionResultCallback.onResult: statusCode" + status.getStatusCode());
             if (status.isSuccess()) {
                 remoteMediaPlayer = new RemoteMediaPlayer();
                 remoteMediaPlayer.setOnStatusUpdatedListener(this);
                 remoteMediaPlayer.setOnMetadataUpdatedListener(this);
                 mSessionId = result.getSessionId();
+                if (!verifySession(callback)) {
+                    return;
+                }
 
                 try {
                     Cast.CastApi.setMessageReceivedCallbacks(apiClient, remoteMediaPlayer.getNamespace(), remoteMediaPlayer);
                 } catch (IOException e) {
                     debug("Exception while creating media channel", e);
                 }
 
                 startPlayback();