Merge "Fix bug that getBaseBandVersion() may write the value incorrectly."

This commit is contained in:
Xiangyu/Malcolm Chen
2020-03-23 21:31:35 +00:00
committed by Gerrit Code Review

View File

@@ -9807,22 +9807,6 @@ public class TelephonyManager {
return getBasebandVersionForPhone(phoneId);
}
/**
* Get baseband version for the default phone using the legacy approach.
* This change was added in P, to ensure backward compatiblity.
*
* @return baseband version.
* @hide
*/
private String getBasebandVersionLegacy(int phoneId) {
if (SubscriptionManager.isValidPhoneId(phoneId)) {
String prop = "gsm.version.baseband"
+ ((phoneId == 0) ? "" : Integer.toString(phoneId));
return SystemProperties.get(prop);
}
return null;
}
/**
* Get baseband version by phone id.
*
@@ -9830,10 +9814,6 @@ public class TelephonyManager {
* @hide
*/
public String getBasebandVersionForPhone(int phoneId) {
String version = getBasebandVersionLegacy(phoneId);
if (version != null && !version.isEmpty()) {
setBasebandVersionForPhone(phoneId, version);
}
return getTelephonyProperty(phoneId, TelephonyProperties.baseband_version(), "");
}