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

Commit d7f38d74 authored by Xiangyu/Malcolm Chen's avatar Xiangyu/Malcolm Chen Committed by Gerrit Code Review
Browse files

Merge "Have getSupportedModemCount always rely on system properties."

parents 634c1080 ee5bfb64
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -431,18 +431,8 @@ public class TelephonyManager {
     * {@link #getActiveModemCount} returns 1 while this API returns 2.
     */
    public @ModemCount int getSupportedModemCount() {
        // TODO: b/139642279 when turning on this feature, remove dependency of
        // PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE and always return result based on
        // PROPERTY_MAX_ACTIVE_MODEMS.
        String rebootRequired = SystemProperties.get(
                TelephonyProperties.PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE);
        if (rebootRequired.equals("false")) {
            // If no reboot is required, return max possible active modems.
            return SystemProperties.getInt(
                    TelephonyProperties.PROPERTY_MAX_ACTIVE_MODEMS, getPhoneCount());
        } else {
            return getPhoneCount();
        }
        return SystemProperties.getInt(TelephonyProperties.PROPERTY_MAX_ACTIVE_MODEMS,
                getActiveModemCount());
    }

    /** {@hide} */