Merge "Have getSupportedModemCount always rely on system properties." am: d7f38d742b
am: 10cf5939c6
Change-Id: I3220634cf014483d8bfbfbf38f628fc22a9a952d
This commit is contained in:
@@ -431,18 +431,8 @@ public class TelephonyManager {
|
|||||||
* {@link #getActiveModemCount} returns 1 while this API returns 2.
|
* {@link #getActiveModemCount} returns 1 while this API returns 2.
|
||||||
*/
|
*/
|
||||||
public @ModemCount int getSupportedModemCount() {
|
public @ModemCount int getSupportedModemCount() {
|
||||||
// TODO: b/139642279 when turning on this feature, remove dependency of
|
return SystemProperties.getInt(TelephonyProperties.PROPERTY_MAX_ACTIVE_MODEMS,
|
||||||
// PROPERTY_REBOOT_REQUIRED_ON_MODEM_CHANGE and always return result based on
|
getActiveModemCount());
|
||||||
// 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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** {@hide} */
|
/** {@hide} */
|
||||||
|
|||||||
Reference in New Issue
Block a user