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

Commit 36b04c7c authored by Malcolm Chen's avatar Malcolm Chen Committed by Xiangyu/Malcolm Chen
Browse files

Move getPhoneCount implementation back to TelephonyManager.

Moving it inside iTelephony creates problems. Some components call
getPhoneCount during initialization while iTelephony service is not
even running, which will cause phone process to crash.

Bug: 123667461
Test: manual
Change-Id: I097d4694a1b0957420ba4636ed8b4b1b89d63500
Merged-In: I097d4694a1b0957420ba4636ed8b4b1b89d63500
parent 24640f8f
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -179,28 +179,6 @@ public class PhoneConfigurationManager {
        }
    }

    /**
     * Get how many sims have been activated on the phone
     * NOTE: In order to support more than 3 sims, we need to change this method.
     */
    public int getNumOfActiveSims() {
        String mSimConfig =
                SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG);
        int numOfSims;
        switch (mSimConfig) {
            case TSTS:
                numOfSims = 3;
                break;
            case DSDA:
            case DSDS:
                numOfSims = 2;
                break;
            default:
                numOfSims = 1;
        }
        return numOfSims;
    }

    /**
     * Get whether reboot is required or not after making changes to modem configurations.
     * Return value defaults to true