shill: cellular: simplify code related to roaming property
This CL simplifies the code in Cellular and CellularCapability* related
to the roaming property as follows:
1. CellularCapability::allow_roaming_property() is redundant as it simply
calls through Cellular::allow_roaming_property() and there is no
reason we can't use the latter directly.
2. All subclasses of CellularCapability except CellularCapabilityCDMA
implements CellularCapability::AllowRoaming() based on
Cellular::provider_requires_roaming() and
Cellular::allow_roaming_property(), but CellularCapabilityCDMA only
checks Cellular::allow_roaming_property(). Such discrepency shouldn't
exist.
3. With (1) and (2), the implementations of
CellularCapability::AllowRoaming() can simply be consolidated and
moved to Cellular. The method is also renamed to
Cellular::IsRoamingAllowedOrRequired() to better describe what it
actually means.
BUG=None
TEST=Run unit tests.
Change-Id: I1ddd06008eaa1581f993f24bf3866245d1525151
Reviewed-on: https://chromium-review.googlesource.com/446630
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
13 files changed