Fix getHalVersion overriding UNSUPPORTED version
Setting up mock modem wipes out UNSUPPORTED setting (in case device is e.g. data-only, so doesn't have IRadioVoice). After restoring non-mock modem, the setting stays UNKNOWN and never gets restored. This breaks some CtsTelephonyTestCases tests ran after TelephonyManagerTestOnMockModem. This gets fixed by additional isRadioServiceSupported check in getRadioServiceProxy, but while I was debugging this issue, I also noticed mHalVersion hits incorrect intermediary steps, e.g. UNSUPPORTED -> 1_6 -> 1_5 -> 1_4 -> "IRadio <1.4 is no longer supported." error -> UNKNOWN. I fixed these by checking both upper and lower bounds of HalVersion (added `between` method). At last, I extended HalVersion toString with human-readable magic versions UNSUPPORTED and UNKNOWN. Bug: 353979854 Test: atest CtsTelephonyTestCases Flag: EXEMPT bugfix Change-Id: I7b49dc1cb677acf386d941cb3533ad1ec5c2ff1b
Loading
Please register or sign in to comment