setOwnerUid() and setAdministratorUids() should run in R+.
Previous logic will skip them in S+. Correct the logic to
what it should be.
Bug: 172183305
Test: atest android.net.NetworkCapabilitiesTest
Change-Id: I46f7dab5eb50cbdcd58aa4c58f43829d10b6c3d8
This follows the model used for the same protos by the Wifi module in
service-wifi.
SystemMessageProto is used by NetworkNotificationManager to define IDs
for notifications that are also counted in system notification metrics.
Bug: 171860710
Test: m
Change-Id: Iec674913fad9ad59c04249714a08b5a0d8ab0f84
Given that ConnectivityService is moving to a mainline module, we need
a @SystemApi for it to listen for changes in blocked status of an uid.
So, we decided to create a new API for this which can provide
ConnectivityService with more info about why an uid is blocked (which
will be useful for adding a new similar onBlockedStatusChanged callback
in CM.NetworkCallback) and also captures data saver restriction without
having out to track it separately.
Currently, NPMS does some redundant computations because we are
calculating both uid rules and blocked reasons separately. In a
follow-up change, we will compute uid rules using blocked reasons
and later possibly remove that onUidRulesChanged callback.
Bug: 176289731
Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest ./tests/net/java/com/android/server/ConnectivityServiceTest.java
Test: atest ./services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Change-Id: Ib9949b8619c6b148f73630b314c4113d76c31ec1
Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
- Use formal API getSystemService to get ConnectivityManager.
- Stop using setProcessDefaultNetworkForHostResolution(), it's
only used for legacy API startUsingNetworkFeature() but
CaptivePortalLoginActivity is used requestNetwork(). So remove
it from CaptivePortalLoginActivity.
Bug: 183068713
Test: atest CarrierDefaultAppUnitTests
Change-Id: Ib3a5dcb70b71ec5b959aeb90a5e3596f3426ceb1
This needed for OEMs that have VPN types not supported by AOSP.
Bug: 171872481
Test: new test coverage in VpnTransportInfoTest
Change-Id: Ic7529bef7f12d2c74a3be5b1a4a2d54fb0d0bfac
Add more connectivity module settings and update all references
to ConnectivitySettingsManager.
Bug: 182538166
Test: atest FrameworksNetTests
Change-Id: Ie96fbd0996ed3acb37099b6270bf3d4c2e558e9a
ConnectivityManager will be a part of incoming connectivity
mainline. Settings will no longer to access the hidden methods.
For those methods that accept the interaction from users, they
should be exposed as formal interface to allow the
functionality. Expose them to API surface.
Bug: 172183305
Test: make update-api
Change-Id: Id4533b94291766bb060af0091b5ccb81a00630fd
Add the link capacity estimate system API.
Remove the system API of getCarrierBandwidth() and CarrierBandwidth as
they are replaced by the new LCE system API in PhoneStateListener.
Bug: 180434672
Bug: 176814680
Test: manual test of the new LCE system API in LinkBandwidthEstimator
Test: atest -c PhoneStateListenerTest
Merged-In: I5899acf02006a164e31f9b82aeaa7974dd6d2869
Change-Id: I5899acf02006a164e31f9b82aeaa7974dd6d2869
There is no definitive API to determine whether a device supports mobile
data; this API fills the gap.
Bug: 146206136
Test: m
Change-Id: I5daa302063ee4e9c27dd9ba1a09d65af80ed9d99
The onStatusChangedLocked removes entries from the ArrayMap. Needs to
iterate in the reverse order.
Test: Vendor testing
Bug: 182876702
Change-Id: I5891f24a25c83f096d23ca5675126889a7d2a61c
This CL updates an OWNERS file to use an include directive instead of an
explicit list of owners.
Test: None
Change-Id: Ibea5a370c43f7b6d9d56275507cb9fb5e226da2a
A stream on the restart queue can cause the StreamManager to
busy-wait. This was introduced by a fix
commit ba04dbe7732bc2d016bf81c81bd349d931de63f2.
Test: Verbose log on StreamManager.cpp, run SoundPool CTS tests.
Bug: 182923919
Merged-In: Iae794bc957869426a4e1e27cd3c088aa9dd83208
Change-Id: Iae794bc957869426a4e1e27cd3c088aa9dd83208
VCN underlying network capabilities should be transport-dependent in
order to allow using anything other than the INTERNET capability for
VCN types that support wifi offload. Specifically, if underlying
network capabilities are not transport-dependent, and Wifi only ever
supports the INTERNET capability, the VCN is unable to utilize wifi
offload together with requiring NET_CAPABILITY_IMS or
NET_CAPABILITY_CBS, since the IMS or CBS capability would be required
for both cellular and wifi underlying networks.
Until such time as a per-transport capability set is allowed, hide
the exposedCapability pieces, and document that all underlying networks
MUST have INTERNET capability in order to be used.
Bug: 182219992
Test: atest FrameworksVcnTests
Test: atest CtsVcnTestCases
Change-Id: I50d7f1be42e0e001f1413a3d5fe8aa4b7afec223
Keystore 2.0 is to replace Keystore. This patch removes
checking the keystore2 enable property and installs the Keystore 2.0 SPI
by default.
Bug: 171563717
Test: N/A
Merged-In: I13a3db8ca736cceb06e864457046ff9ca641322d
Change-Id: I13a3db8ca736cceb06e864457046ff9ca641322d
The library will be included in the connectivity module APEX when
migrating its sources out of framework-minus-apex.
Bug: 171540887
Test: m
Change-Id: I1595521eaced6e6997c076bb56b06ffdd22a4fa0
It's a refactor work for connectivity mainline module. The
hidden methods access is no longer allowed, so the usage for
isNetworkSupported() should be replaced. Settingslib use it to
check if device support telephony service. Use alternative
method to check if device supports such feature.
Bug: 172183305
Test: make RunSettingsLibRoboTests
Change-Id: I713c6410fcf9543d54d9b0057ed7b2ecdab201ee
Merged-In: I713c6410fcf9543d54d9b0057ed7b2ecdab201ee
NetworkRequest is moving into the incoming connectivity mainline
module. The hidden setUids becomes inaccessible outside the
module. Shims for support cts in different API levels will need
to use it to verify the behavior of NetworkRequest. Thus, expose
it to the API surface.
Also, VPN uses getUids and setUids to control network
capabilities. Networkcapabilities is a part of incoming
connectivity mainline module but VPN is not. Thus, exposing these
two methods are needed to allow VPN to continue using it.
Test: make update-api
Bug: 172183305
Change-Id: I107c329d4d7130d488772166eae8b5e7aaa2ff04
UidRange is used in a shared way between ConnectivityService
and VPN through the use of NetworkCapabilities. UidRange will
be part of the ConnectivityService mainline but Vpn.java will
stay in the framework. We need a way to replace the APIs using
UidRange, or to make UidRange system API. The only really
relevant surface here is NetworkCapabilities#{setUids, getUids}.
The need for UidRange could be replaced by an integer Range, so
replace the usage of UidRange by a integer Range in
NetworkCapabilities#{setUids, getUids} and update the relevant
callers.
Bug: 172183305
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Change-Id: I4e5aec6ef1ea02e038fcd7ed117a3b67b69c5cb9
ConnectivityManager and NetworkAgent do not share their handler with any
other component, so there is no reason to use addresses that do not
overlap. Protocol.BASE_* was written to allow for interaction "between
different StateMachine implementations without a conflict", but the
classes do not use StateMachine, and they do not have such interactions.
Bug: 177046265
Test: atest FrameworksNetTests
Change-Id: I18c341d4a2c01cb9559d682a9ad1ff259e6b5855