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

Commit 947a43ff authored by Amit Mahajan's avatar Amit Mahajan Committed by android-build-merger
Browse files

Merge "Initialize phone type before initializing other objects." into mm-wireless-dev

am: 92a2eb9c

* commit '92a2eb9c':
  Initialize phone type before initializing other objects.
parents 89656c76 92a2eb9c
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -199,7 +199,9 @@ public class GsmCdmaPhone extends Phone {
        super(precisePhoneType == PhoneConstants.PHONE_TYPE_GSM ? "GSM" : "CDMA",
                notifier, context, ci, unitTestMode, phoneId, telephonyComponentFactory);

        initOnce(ci, unitTestMode);
        // phone type needs to be set before other initialization as other objects rely on it
        mPrecisePhoneType = precisePhoneType;
        initOnce(ci);
        initRatSpecific(precisePhoneType);
        mSST = mTelephonyComponentFactory.makeServiceStateTracker(this, this.mCi);
        // DcTracker uses SST so needs to be created after it is instantiated
@@ -218,7 +220,7 @@ public class GsmCdmaPhone extends Phone {
        }
    };

    private void initOnce(CommandsInterface ci, boolean unitTestMode) {
    private void initOnce(CommandsInterface ci) {
        if (ci instanceof SimulatedRadioControl) {
            mSimulatedRadioControl = (SimulatedRadioControl) ci;
        }
@@ -269,7 +271,6 @@ public class GsmCdmaPhone extends Phone {
        mEsn = null;
        mMeid = null;

        //setName gsm/cdma
        mPrecisePhoneType = precisePhoneType;

        TelephonyManager tm = TelephonyManager.from(mContext);