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

Commit 28d92afc authored by John Wang's avatar John Wang Committed by Android Git Automerger
Browse files

am 2ac78a2d: Merge "Add getImei() to Phone interface." into honeycomb-LTE

* commit '2ac78a2d':
  Add getImei() to Phone interface.
parents 0814a9aa 2ac78a2d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1429,6 +1429,11 @@ public interface Phone {
     */
    String getMeid();

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

    /**
     * Retrieves the PhoneSubInfo of the Phone
     */
+4 −0
Original line number Diff line number Diff line
@@ -685,6 +685,10 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.getMeid();
    }

    public String getImei() {
        return mActivePhone.getImei();
    }

    public PhoneSubInfo getPhoneSubInfo(){
        return mActivePhone.getPhoneSubInfo();
    }
+5 −0
Original line number Diff line number Diff line
@@ -135,6 +135,11 @@ public class CDMALTEPhone extends CDMAPhone {
        return mIccRecords.getIMSI();
    }

    @Override
    public String getImei() {
        return mImei;
    }

    @Override
    protected void log(String s) {
        if (DBG)
+9 −0
Original line number Diff line number Diff line
@@ -122,6 +122,8 @@ public class CDMAPhone extends PhoneBase {
    //keep track of if phone is in emergency callback mode
    private boolean mIsPhoneInEcmState;
    private Registrant mEcmExitRespRegistrant;
    protected String mImei;
    protected String mImeiSv;
    private String mEsn;
    private String mMeid;
    // string to define how the carrier specifies its own ota sp number
@@ -489,6 +491,11 @@ public class CDMAPhone extends PhoneBase {
        return mSST.getImsi();
    }

    public String getImei() {
        Log.e(LOG_TAG, "IMEI is not available in CDMA");
        return null;
    }

    public boolean canConference() {
        Log.e(LOG_TAG, "canConference: not possible in CDMA");
        return false;
@@ -987,6 +994,8 @@ public class CDMAPhone extends PhoneBase {
                    break;
                }
                String[] respId = (String[])ar.result;
                mImei = respId[0];
                mImeiSv = respId[1];
                mEsn  =  respId[2];
                mMeid =  respId[3];
            }
+4 −0
Original line number Diff line number Diff line
@@ -855,6 +855,10 @@ public class GSMPhone extends PhoneBase {
        return mImeiSv;
    }

    public String getImei() {
        return mImei;
    }

    public String getEsn() {
        Log.e(LOG_TAG, "[GSMPhone] getEsn() is a CDMA method");
        return "0";
Loading