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

Commit bec13874 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Fix null-check for SPN rule

Change-Id: I882512609be2427fa4edd32303357488fc22ae67
parent 636d7071
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -754,6 +754,16 @@ public class RIL extends BaseCommands implements CommandsInterface {

    // FIXME This API should take an AID and slot ID
    public void setDataAllowed(boolean allowed, Message result) {
        if(mRilVersion < 10 && mInstanceId == null) {
            if (result != null) {
                CommandException ex = new CommandException(
                    CommandException.Error.REQUEST_NOT_SUPPORTED);
                AsyncResult.forMessage(result, null, ex);
                result.sendToTarget();
            }
            return;
        }

        RILRequest rr = RILRequest.obtain(RIL_REQUEST_ALLOW_DATA, result);
        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
                + " " + allowed);
+1 −1
Original line number Diff line number Diff line
@@ -1612,7 +1612,7 @@ public class SIMRecords extends IccRecords {
    @Override
    public int getDisplayRule(String plmn) {
        int rule;
        if (mContext.getResources().getBoolean(
        if (mContext != null && mContext.getResources().getBoolean(
                com.android.internal.R.bool.def_telephony_spn_spec_enabled)) {
            rule = SPN_RULE_SHOW_SPN;
            return rule;