Return "" not "null"

Some models such as LDU, WIFI do not have "gsm.version.baseband",
which should return "null" when it is called.
However it returns "" not "null"

Bug: 120685535
Test: Self-Test
Change-Id: Idc1363d45a0ece3a35f46da287e21015ac1387af
This commit is contained in:
Seongho Kim
2018-11-16 13:44:48 +09:00
committed by Jordan Liu
parent c6c06b004e
commit 73273e0caa

3
core/java/android/os/Build.java Normal file → Executable file
View File

@@ -1113,7 +1113,8 @@ public class Build {
* null (if, for instance, the radio is not currently on).
*/
public static String getRadioVersion() {
return SystemProperties.get(TelephonyProperties.PROPERTY_BASEBAND_VERSION, null);
String propVal = SystemProperties.get(TelephonyProperties.PROPERTY_BASEBAND_VERSION);
return TextUtils.isEmpty(propVal) ? null : propVal;
}
private static String getString(String property) {