Bug 1502817 - Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java). r=sdaswani, a=lizzard
authorAndrei Lazar <andrei.a.lazar@softvision.ro>
Fri, 01 Feb 2019 18:36:10 +0000
changeset 515802 d9506222285b1c0e08818aca83bfefa4a5c18a3f
parent 515801 0630d18a7d26772237f829a59f2c1d72ba43f7aa
child 515803 d7e94ba9dbad1189eeb1fbb4ea1f456668b23381
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssdaswani, lizzard
bugs1502817
milestone66.0
Bug 1502817 - Crash in java.lang.NullPointerException: at org.mozilla.gecko.ChromeCastPlayer.toBundle(ChromeCastPlayer.java). r=sdaswani, a=lizzard 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