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

Commit 3230afe5 authored by Omkar Kolangade's avatar Omkar Kolangade
Browse files

IMS: Add null-check for call forwarding

Check if ICCrecords are present, before setting the call
forwarding flag in ICCrecrods.

Change-Id: I21afcdcd8b3cd974c7b2c008a5e2ebc8af595dd3
parent 0e664d8c
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -1656,7 +1656,10 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {


    public void setVoiceCallForwardingFlag(int line, boolean enable, String number) {
    public void setVoiceCallForwardingFlag(int line, boolean enable, String number) {
        setCallForwardingIndicatorInSharedPref(enable);
        setCallForwardingIndicatorInSharedPref(enable);
        mIccRecords.get().setVoiceCallForwardingFlag(line, enable, number);
        IccRecords r = mIccRecords.get();
        if (r != null) {
            r.setVoiceCallForwardingFlag(line, enable, number);
        }
    }
    }


    protected void setVoiceCallForwardingFlag(IccRecords r, int line, boolean enable,
    protected void setVoiceCallForwardingFlag(IccRecords r, int line, boolean enable,