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

Skip to content
Commit cf71e74f authored by Evan Laird's avatar Evan Laird
Browse files

Update Utils#isInService() to better reflect intent

Historically, the check defined in SettingsLib was like this. Consider a
service state to be IN_SERVICE if:

  - The voice registration stae is IN_SERVICE or
  - Voice registration is OOS/EMERGENCY_ONLY && the data registration
    state is IN_SERVICE && !iwlan.

In the above logic, IWLAN was being checked for by querying the
NetworkRegistrationInfo from the service state for DOMAIN_PS +
TRANSPORT_TYPE_WLAN. If that registration was considered in service,
then we considered that network to be on IWLAN and would exclude it from
the overall inService check.

This CL makes a change to only check for the DOMAIN_PS +
TRANSPORT_TYPE_WWAN NetworkRegistrationInfo from the service state, and
checking specifically if _that_ reg info reports IN_SERVICE. Since WWAN
in this context means essentially a cellular connection rather than
wi-fi, this should be a simpler check for seeing if the cellular
connection is in service.

Test: UtilsTest.java
Bug: 288479957
Change-Id: I7dc9c7586858fae1a4ebb1e6f32057392547c39e
parent a76fc627
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