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

Commit 1b4b9f7e authored by Polina Bondarenko's avatar Polina Bondarenko Committed by android-build-merger
Browse files

Merge "ril: add a checkNotNull for setAllowedCarriers params."

am: 73c5e76a

Change-Id: I6a08e766c8cbc17151c818979526e3138fbab2b4
parents d175fa57 73c5e76a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ import java.util.concurrent.atomic.AtomicInteger;

import static android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN;
import static com.android.internal.telephony.RILConstants.*;
import static com.android.internal.util.Preconditions.checkNotNull;

/**
 * {@hide}
@@ -5167,6 +5168,8 @@ public final class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void setAllowedCarriers(List<CarrierIdentifier> carriers, Message response) {
        checkNotNull(carriers, "Allowed carriers list cannot be null.");

        RILRequest rr = RILRequest.obtain(RIL_REQUEST_SET_ALLOWED_CARRIERS, response);
        rr.mParcel.writeInt(carriers.size()); /* len_allowed_carriers */
        rr.mParcel.writeInt(0); /* len_excluded_carriers */ /* TODO: add excluded carriers */