Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af763233 authored by Bruno Martins's avatar Bruno Martins
Browse files

BasebandVersionPreferenceController: Trim baseband if needed

Some Qualcomm MSIM devices report the baseband version twice.
Handle it gracefully, similarly to CAF.

Change-Id: I93bd071f31fed120c20185c4e0ec40edb7ca342b
parent c3326062
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -41,7 +41,12 @@ public class BasebandVersionPreferenceController extends BasePreferenceControlle

    @Override
    public CharSequence getSummary() {
        return SystemProperties.get(BASEBAND_PROPERTY,
        String baseband = SystemProperties.get(BASEBAND_PROPERTY,
                mContext.getString(R.string.device_info_default));
        String[] basebandArray = baseband.split(",");
        if (basebandArray != null && basebandArray.length > 0) {
            return basebandArray[0];
        }
        return baseband;
    }
}