Bug 1502817 - Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java). r=sdaswani, a=RyanVM
☠☠ backed out by b6b545883295 ☠ ☠
authorAndrei Lazar <andrei.a.lazar@softvision.ro>
Fri, 01 Feb 2019 18:36:10 +0000
changeset 509637 d39043c99ca9
parent 509636 1499c0543d3c
child 509638 f981e28b584e
push id1935
push userryanvm@gmail.com
push dateMon, 11 Feb 2019 16:39:10 +0000
treeherdermozilla-release@be2b97abeeff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssdaswani, RyanVM
bugs1502817
milestone65.0.1
Bug 1502817 - Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java). r=sdaswani, a=RyanVM Replaced deprecated method which returns null if device is on an IPv6-only network with a newer one that can return IPv6 address. Depends on D18324 Differential Revision: https://phabricator.services.mozilla.com/D18326
mobile/android/base/java/org/mozilla/gecko/ChromeCastPlayer.java
--- a/mobile/android/base/java/org/mozilla/gecko/ChromeCastPlayer.java
+++ b/mobile/android/base/java/org/mozilla/gecko/ChromeCastPlayer.java
@@ -193,17 +193,17 @@ class ChromeCastPlayer implements GeckoM
         if (device == null) {
             return null;
         }
 
         final GeckoBundle obj = new GeckoBundle(7);
         obj.putString("uuid", route.getId());
         obj.putString("version", device.getDeviceVersion());
         obj.putString("friendlyName", device.getFriendlyName());
-        obj.putString("location", device.getIpAddress().toString());
+        obj.putString("location", device.getInetAddress().toString());
         obj.putString("modelName", device.getModelName());
         obj.putBoolean("mirror", canMirror);
         // For now we just assume all of these are Google devices
         obj.putString("manufacturer", "Google Inc.");
         return obj;
     }
 
     @Override