Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 014495e4 authored by Sandeep Gutta's avatar Sandeep Gutta
Browse files

Fix NullPointerException during setupDataCall

To Avoid NPE do not send null ArrayList to IRadio.setupDataCall().

Change-Id: I448e513fa13ba6e2b9750a3d89db0fa7ecb4e8f7
parent ad8f0fdd
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1146,14 +1146,12 @@ public class RIL extends BaseCommands implements CommandsInterface {
                            dpi, dataProfile.isModemCognitive(), allowRoaming, isRoaming);
                } else {
                    // IRadio V1.2
                    ArrayList<String> addresses = null;
                    ArrayList<String> dnses = null;
                    ArrayList<String> addresses = new ArrayList<>();
                    ArrayList<String> dnses = new ArrayList<>();
                    if (linkProperties != null) {
                        addresses = new ArrayList<>();
                        for (InetAddress address : linkProperties.getAddresses()) {
                            addresses.add(address.getHostAddress());
                        }
                        dnses = new ArrayList<>();
                        for (InetAddress dns : linkProperties.getDnsServers()) {
                            dnses.add(dns.getHostAddress());
                        }