Combine getPhoneCount, getSimCount and isMultiSimEnabled.
Bug: 141023026
Test: build
Change-Id: I9007978bc577a24083e0108d02c8b59fd16ae81f
Merged-In: I9007978bc577a24083e0108d02c8b59fd16ae81f
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 7e6e8f4..ee254d7 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -271,9 +271,6 @@
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 @@
/** {@hide} */
@UnsupportedAppUsage
public boolean isMultiSimEnabled() {
- return (multiSimConfig.equals("dsds") || multiSimConfig.equals("dsda") ||
- multiSimConfig.equals("tsts"));
+ return getPhoneCount() > 1;
}
//
@@ -6550,11 +6546,7 @@
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;
- }
+ return getPhoneCount();
}
/**