Commit Graph

7 Commits

Author SHA1 Message Date
Lorenzo Colitti
a77d05ec0a Add a registerSystemDefaultNetworkCallback method.
This method allows internal components to track the system
default network. This differs from registerDefaultNetworkCallback
because that method sends callbacks for the default network for
the UID that called it. This may not be the system default
network, for example, when a VPN is up and applies to the UID.

Bug: 173331190
Test: new unit tests in ConnectivityServiceTest
Test: new unit tests in ConnectivityManagerTest
Test: new CTS tests in ConnectivityServiceTest
Test: new CTS tests in HostsideVpnTests in other CL in this topic
Change-Id: Id02748a2183f71b71ff2a53a580466b9dcecaa93
2021-02-09 20:58:28 +09:00
Roshan Pius
a8a477b84e ConnectivityService: Plumb attribution tag for location permission checks
Not currently setting the atttribution tag for location
permission checks. Plumb the attribution tag for all location permision
checks (so that location access is correctly attributed to individual
components within an app)

Bug: 162602799
Test: atest android.net
Test: atest com.android.server
Change-Id: Iee95f05204f51a4f8cb1f36acfb60e8cdeb156f4
2021-02-08 08:13:48 -08:00
James Mattis
e3e711d775 Merge changes Iabad7300,I85363e28
* changes:
  Stubbed setOemNetworkPreference in Connectivity
  Update OemNetworkPreferences to use 1:1 Map
2021-02-06 04:33:51 +00:00
James Mattis
452c6ffa61 Stubbed setOemNetworkPreference in Connectivity
Stubbed setOemNetworkPreference() in ConnectivityService and connected
it to ConnectivityManager.

Bug: 176495254
Bug: 176494815
Test: atest FrameworksNetTests
atest FrameworksNetIntegrationTests
atest CtsNetTestCasesLatestSdk

Change-Id: Iabad7300a8b058e1edcb0defab8a031d21e6433c
2021-02-04 20:12:40 -08:00
Remi NGUYEN VAN
470efc161d Remove legacy network factories
Nothing on the system is using registerNetworkFactory,
unregisterNetworkFactory at the moment.

registerNetworkFactory, unregisterNetworkFactory are protected by
signature permissions, so could not be used by anything outside of the
system.

Remove the two methods and the underlying support for this legacy,
deprecated mechanism.

Bug: 179229316
Test: atest FrameworksNetTests
Change-Id: I7cdc9eed67f846c8774474af038133040aeccab3
2021-02-04 18:04:43 +09:00
Remi NGUYEN VAN
91444cae56 Have connectivity self-register manager classes
As connectivity services are planned to move to a separate module, move
the manager classes registration from SystemServiceRegistry to
ConnectivityServicesRegistrar, using the registerContextAwareService
APIs.

This follows patterns and naming in WifiFrameworkInitializer.

Bug: 171540887
Test: device boots, connectivity working
Change-Id: I62ced1275750c73f209bac8ec3a3204b95695b83
2021-02-01 17:10:39 +09:00
Remi NGUYEN VAN
fbbccbce69 Move module sources to packages/Connectivity
Files that are planned to be part of the connectivity module are grouped
in packages/Connectivity, so they can be built separately and moved in
one operation with their history into packages/modules/Connectivity.

This places the files in the existing framework-connectivity-sources
filegroup instead of the current framework-core-sources filegroup. Both
are used the same way in framework-non-updatable-sources.

Bug: 171540887
Test: m
Change-Id: I62d9d91574ace6f5c4624035d190260c3126b91e
2021-02-01 11:52:14 +09:00