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

Commit f6da7466 authored by Malcolm Chen's avatar Malcolm Chen
Browse files

Combine getPhoneCount, getSimCount and isMultiSimEnabled.

Bug: 141023026
Test: build
Change-Id: I9007978bc577a24083e0108d02c8b59fd16ae81f
Merged-In: I9007978bc577a24083e0108d02c8b59fd16ae81f
parent 118b02f6
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -271,9 +271,6 @@ public class TelephonyManager {
    private SubscriptionManager mSubscriptionManager;
    private TelephonyScanManager mTelephonyScanManager;

    private static String multiSimConfig =
            SystemProperties.get(TelephonyProperties.PROPERTY_MULTI_SIM_CONFIG);

    /** Enum indicating multisim variants
     *  DSDS - Dual SIM Dual Standby
     *  DSDA - Dual SIM Dual Active
@@ -433,8 +430,7 @@ public class TelephonyManager {
    /** {@hide} */
    @UnsupportedAppUsage
    public boolean isMultiSimEnabled() {
        return (multiSimConfig.equals("dsds") || multiSimConfig.equals("dsda") ||
            multiSimConfig.equals("tsts"));
        return getPhoneCount() > 1;
    }

    //
@@ -6550,11 +6546,7 @@ public class TelephonyManager {
    public int getSimCount() {
        // FIXME Need to get it from Telephony Dev Controller when that gets implemented!
        // and then this method shouldn't be used at all!
        if(isMultiSimEnabled()) {
        return getPhoneCount();
        } else {
            return 1;
        }
    }

    /**