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

Commit 7332ab22 authored by xinhe's avatar xinhe Committed by Android (Google) Code Review
Browse files

Merge "Sprint: MMS proxy authorization does not include NAI" into lmp-mr1-dev

parents f8a5a95e 2351b17a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1411,6 +1411,11 @@ public interface Phone {
     */
    String getImei();

    /**
     * Retrieves Nai for phones. Returns null if Nai is not set.
     */
    String getNai();

    /**
     * Retrieves the PhoneSubInfo of the Phone
     */
+4 −0
Original line number Diff line number Diff line
@@ -205,6 +205,10 @@ public abstract class PhoneBase extends Handler implements Phone {
        return mName;
    }

    public String getNai(){
         return null;
    }

    /**
     * Return the ActionDetached string. When this action is received by components
     * they are to simulate detaching from the network.
+5 −0
Original line number Diff line number Diff line
@@ -1038,6 +1038,11 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.getImei();
    }

    @Override
    public String getNai() {
        return mActivePhone.getNai();
    }

    @Override
    public PhoneSubInfo getPhoneSubInfo(){
        return mActivePhone.getPhoneSubInfo();
+8 −0
Original line number Diff line number Diff line
@@ -78,6 +78,14 @@ public class PhoneSubInfo {
        return mPhone.getImei();
    }

    /**
     * Retrieves the NAI.
     */
    public String getNai() {
        mContext.enforceCallingOrSelfPermission(READ_PHONE_STATE, "Requires READ_PHONE_STATE");
        return mPhone.getNai();
    }

    /**
     * Retrieves the software version number for the device, e.g., IMEI/SV
     * for GSM phones.
+11 −0
Original line number Diff line number Diff line
@@ -58,6 +58,17 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
        }
    }

    public String getNaiForSubscriber(long subId) {
        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
            return phoneSubInfoProxy.getNai();
        } else {
            Rlog.e(TAG,"getNai phoneSubInfoProxy is null" +
                      " for Subscription:" + subId);
            return null;
        }
    }

    public String getImeiForSubscriber(long subId) {
        PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
        if (phoneSubInfoProxy != null) {
Loading