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

Commit d9835f0c authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Change to treat slotId 0 emergency numbers as default.

Emergency numbers are slot specific. This change is to read emergency
numbers for slotId 0 if slotId is unknown/invalid.

Bug: 18656027
Change-Id: Ibaeb720955f6abc421b84d3cb32eb812b6c55a34
parent 951dcdd9
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1823,13 +1823,11 @@ public class PhoneNumberUtils
        String emergencyNumbers = "";
        int slotId = SubscriptionManager.getSlotId(subId);

        if (slotId >= 0) {
        // retrieve the list of emergency numbers
        // check read-write ecclist property first
            String ecclist = (slotId == 0) ? "ril.ecclist" : ("ril.ecclist" + slotId);
        String ecclist = (slotId <= 0) ? "ril.ecclist" : ("ril.ecclist" + slotId);

        emergencyNumbers = SystemProperties.get(ecclist, "");
        }

        Rlog.d(LOG_TAG, "slotId:" + slotId + ", emergencyNumbers: " +  emergencyNumbers);