Settings: Fix duplicated baseband string on all devices.

* CAF has fixed this year-old glitch but it seems like
   only a certain "CT PA" requires it and hence the code
   is guarded (check 4bb2825836dd5099447508d3cb321952e1f7a5fa and a7162edd8e811a1918f66769111f8cbda3a993fe)

 * Let's make the fix available for all dual SIM devices!

Change-Id: Icfc1e54047a0ecc4b52999c798d2e6a580309e46
(cherry picked from commit d7876e1cc4c2284a2b6c167169b0279367fc76f6)
Signed-off-by: Dmitrii <bankersenator@gmail.com>
This commit is contained in:
Adithya R
2020-01-16 21:27:09 +05:30
committed by Joey
parent e6262ead9b
commit 3e40de9cb7

View File

@@ -43,14 +43,15 @@ public class BasebandVersionPreferenceController extends BasePreferenceControlle
@Override @Override
public CharSequence getSummary() { public CharSequence getSummary() {
String baseband = SystemProperties.get(BASEBAND_PROPERTY, String baseBands = SystemProperties.get(BASEBAND_PROPERTY,
mContext.getString(R.string.device_info_default)); mContext.getString(R.string.device_info_default));
for (String str : baseband.split(",")) { if (null != baseBands) {
if (!TextUtils.isEmpty(str)) { String[] baseBandArray = baseBands.split(",");
return str; if ((baseBandArray != null) && (baseBandArray.length > 0)) {
return baseBandArray[0];
} }
} }
return baseband; return baseBands;
} }
} }
// LINT.ThenChange(BasebandVersionPreference.kt) // LINT.ThenChange(BasebandVersionPreference.kt)