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

Commit d01b6d9c authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Android (Google) Code Review
Browse files

Merge "Combine getPhoneCount, getSimCount and isMultiSimEnabled."

parents 3649bbe4 8c8f1131
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -270,9 +270,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
@@ -432,8 +429,7 @@ public class TelephonyManager {
    /** {@hide} */
    @UnsupportedAppUsage
    public boolean isMultiSimEnabled() {
        return (multiSimConfig.equals("dsds") || multiSimConfig.equals("dsda") ||
            multiSimConfig.equals("tsts"));
        return getPhoneCount() > 1;
    }

    //
@@ -6625,11 +6621,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;
        }
    }

    /**