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

Commit b02d1270 authored by Aleksander Morgado's avatar Aleksander Morgado
Browse files

Use isMobileDataCapable/isVoiceCapable helpers in deviceinfo/baseband

Disabling telephony support may be done either with the
config_show_sim_info config option, or based on whether
TelephonyManager reports data capabilities. The isMobileDataCapable()
helper method ensures both ways are supported.

Additionally, the logic is also updated to explicitly check for voice
support, so that disabling this telephony element happens only when
both mobile data and voice are unsupported.

The unit tests are updated to consider both no-data and no-voice
cases, by mocking both Resources and TelephonyManager.

Bug: 395714454
Test: mm && atest tests/robotests/src/com/android/settings/deviceinfo/firmwareversion/
Flag: EXEMPT bugfix
Change-Id: I355e8be8609cf6c8a0ec72c2754692a128aeceec
parent e0f437c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment