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

Skip to content
Commit 50a228a2 authored by junyulai's avatar junyulai
Browse files

Implement registerSystemDefaultNetworkCallback replacement in api30

In R framework, while registerSystemDefaultNetworkCallback was
not available, Tethering module used a hacky way to track system
default network, which is to create a NetworkRequest that is
exact the same with the one in ConnectivityService.

In S framework, although we have the new API to track system
default network, but still need to provide backward compatibility
for R devices. Thus, implement the workaround in api30 and
provide unified interface to tethering.

This change also use service name string to get system service,
given that getSystemService(ConnectivityManager.class) cannot be
mocked.

Test: atest TetheringCoverageTests
Bug: 185952829
Change-Id: Iaf21b6b662aa6aba79c2b75379128b8523f81f02
parent 01e4fa96
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