This is a partial cherry-pick of change:
I5eedb571c9d78862115dfdc5dae1cf2a35343580
for connectivity classes.
Bug: 170883422
Test: m
Merged-In: I5eedb571c9d78862115dfdc5dae1cf2a35343580
Change-Id: I7dc661863b73f4198ddb4f3a1566583d0f07db3c
Deduce the NET_CAPABILITY_NOT_VCN_MANAGED capability from other
capabilities and user intention, which includes:
1. For the requests that don't have anything besides
VCN_SUPPORTED_CAPABILITIES, add the NOT_VCN_MANAGED to
allow the callers automatically utilize VCN networks
if available.
2. For the requests that explicitly add or remove
NOT_VCN_MANAGED, do not alter them to allow user fire
request that suits their need.
Test: atest NetworkRequestTest#testBypassingVcnForNonInternetRequest
Bug: 175662146
Change-Id: I9936894b9530a22fb186cfd25cbee0fced65b72b
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
The NetworkUtils.getNetworkPart() method is used by Settings
and wifi. NetworkUtils is inside the incoming connectivity
module. It will become inaccessible outside the module, so
move the shared methods to shared lib and also move the
related helper method.
The corresponding usgae is also updated.
Bug: 172183305
Test: atest FrameworksNetTests
Change-Id: I47410afa27aad61f63759df41be959f323c1d100
Add getProxyForNetwork to the public API, and use ConnectivityManager
APIs from ActivityThread (instead of hidden APIs) to get/set the proxy
for an app process.
getProxyForNetwork allows clients to find which proxy applies, which can
be a global proxy setting or a per-network proxy.
The default proxy is now initialized with getDefaultProxy instead of
getProxyForNetwork(null); this should not make a difference, as nothing
should have called bindProcessToNetwork at that point yet.
Bug: 174436414
Test: m; device boots
Change-Id: Ifb516194ecde1567cea4b6806946091cdcf2f015
Both of readArraySet and writeArraySet are hidden APIs inside
Parcel, so reimplement those two methods inside NetworkCapabilities
to prevent calling hidden APIs.
Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I70f75c1a0db92c6a5575c6a9917843d783dfaeea
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
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
All sources for the connectivity module are being moved to
frameworks/base/packages/Connectivity, so that they can all be moved to
packages/modules/Connectivity in one move keeping history.
INetworkAgent and INetworkAgentRegistry were created in
packages/modules/Connectivity directly, but this makes managing the
sources until the move harder as the module needs to pull sources from
two different locations. Considering that they do not have history to
move, just move them to frameworks/base/packages/Connectivity without
the commit history.
Bug: 171540887
Test: m
Change-Id: Ic4353115a98b6235c2b5d5ce24741223e618d0a6
All sources for the connectivity module are being moved to
frameworks/base/packages/Connectivity, so that they can all be moved to
packages/modules/Connectivity in one move keeping history.
INetworkAgent and INetworkAgentRegistry were created in
packages/modules/Connectivity directly, but this makes managing the
sources until the move harder as the module needs to pull sources from
two different locations. Considering that they do not have history to
move, just move them to frameworks/base/packages/Connectivity without
the commit history.
Bug: 171540887
Test: m
Change-Id: I1c7e83267014bff29eb938c002d6441332101248
Use two oneway binder interfaces instead.
The interfaces post messages to handlers as was implemented before, but
provide a more strictly defined interface, with less hops between
NetworkAgent, AsyncChannel, and ConnectivityService.
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Merged-In: Ica51d0179bcb3b4e314d2c3e85709aead6ca5657
Change-Id: Ica51d0179bcb3b4e314d2c3e85709aead6ca5657