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

Skip to content
Commit 401e7cf4 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

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
parent 42e2819d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment