Bug 1055012 - Verify sessions we're killed before starting load on Chromecast. r=mfinkle a=sylvestre
authorWes Johnston <wjohnston@mozilla.com>
Wed, 27 Aug 2014 12:06:17 -0700
changeset 217703 da558e9dcae3cad396091315751a7f4a2dc4a997
parent 217702 55c9365701e5a074c490b7a10bc947de1b5e200c
child 217704 284044e0c3f21b74acaa754a82a05bc6ae83918a
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, sylvestre
bugs1055012
milestone33.0a2
Bug 1055012 - Verify sessions we're killed before starting load on Chromecast. r=mfinkle a=sylvestre
mobile/android/base/ChromeCast.java
--- a/mobile/android/base/ChromeCast.java
+++ b/mobile/android/base/ChromeCast.java
@@ -82,16 +82,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();