Age | Commit message (Collapse) | Author |
|
networkAttributes is a legacy configuration that is now only used to
configure which legacy type networks are supported, and what the restore
timer is for that network type, for the deprecated
startUsingNetworkFeature API.
Use a dedicated resource for the restore timers, and build supported
legacy network types using hasSystemFeature for wifi, wifi p2p,
bluetooth, proxy types, and TelephonyManager.isDataCapable for the
mobile types.
Bug: 146206136
Test: atest FrameworksNetTests
Change-Id: I3a771d3de6c5e912f18d2834e3a50af797ac4991
|
|
|
|
|
|
As attested by numerous TODOs in the code, a new way of
representing network quality and policy is needed instead
of an int.
An int representing the quality of the network requires
all parties using it to know how all other parties are
using it, and implementation details about the decision
algorithm. For all intents and purposes, the selection
is left to individual network factories who try to
achieve a desired result while piecing together all
possible states of the system.
As the number of such cases and desires increases, this
becomes both intractable and unmaintainable. Indeed, at
this time in the codebase nobody can really predict exactly
how a given change in score will affect selection across
the board, and it is essentially impossible to figure out
the behavior of network selection by inspecting the code
because the moving parts are scattered throughout the
entire codebase.
Having an object encapsulating policy and quality values
will let us centralize the selection and make it again
possible to maintain without knowledge of all behaviors
of all network factories. It will also provide better
guarantees of respecting policy, and allow bugfixes that
were not possible before because they'd touch too many
parts of the code.
Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests
Change-Id: I3185a6412b9b659798faf0c6882699e9c63cc115
|
|
|
|
|
|
|
|
-Connectivity is becoming a mainline module in S but mainline
modules are not allowed to use non-formal APIs. Thus, replace
non-formal API InetAddress#parseNumericAddress to
InetAddresses#parseNumericAddress.
- Add deprecated method legacyParseIpAndMask() for IpPrefix and
LinkAddress. Because InetAddresses#parseNumericAddress has
a little different behavior in some case, but these two classes
should keep working as before. So these two classes will use
the new deprecated method.
Bug: 181756157
Test: FrameworksNetTests
Change-Id: I1c96b75f0b8d5e93304a39b4a8c8849964e5e810
|
|
* changes:
[VCN12] Expose setSubIds/getSubIds APIs
[VCN04] Add Subscription Id set into NetworkCapabilities
|
|
|
|
|
|
* changes:
Use new API - getIpSecNetIdRange() in IpSecService
Add a new API to get the network ID range of IPSec tunnel interface
|
|
Create the ServiceConnectivityResources package, which contains
resources Connectivity unbundled from platform resources.
Migrate the first few resources from ConnectivityService that have no
RRO in AOSP. To avoid boot time impact, avoid loading the resources in
the ConnectivityService constructor.
Bug: 182125649
Test: atest FrameworksNetTests
Merged-In: I77ac6f4303c54acc96f16e18ef02add30298ff3d
Change-Id: I77ac6f4303c54acc96f16e18ef02add30298ff3d
|
|
Existing NetworkCallback users will get NetworkCapabilities with
location sensitive data removed (except for ownerUid which will be
added for existing apps for backwards compatibility). Apps
have to opt-in to receive location sensitive data.
Note: This was chosen because WifiInfo is the only TransportInfo tha
has location sensitive info & that was added only in Android 12. If we
choose to default to true, all existings apps retrieving
NetworkCapabilities for wifi networks will be blamed for location access
unnecessarily.
Changes:
i) Add a flag in NetworkCallback creation to retrieve
NetworkCapabilities with location sensitive info in their callback.
(More flags are being planned for NetworkCallback for throttling
callback frequency, etc)
ii) For NetworkCapabilities.getOwnerUid(), we will continue to send the
data for apps targeting older SDK (since this is an existing field and
the new flag defaults location sensitive data to off).
Bug: 156867433
Test: atest android.net
Test: atest com.android.server
Change-Id: If70b5ea6f5c8885f0c353c8df08a826d55fe7f7a
|
|
* changes:
Fix common tests on Q and R
Add Ethernet, TestNetworkSpecifier API
|
|
This CL changes the policy listener API to be
VcnNetworkPolicyChangeListener (it was previously
VcnNetworkPolicyListener) per API Council guidance.
This CL also requires permission NETWORK_FACTORY for removing registered
policy listeners.
Bug: 181562364
Test: atest FrameworksVcnTests
Change-Id: I026eaefa62d8f64b9180fc182a7cf0605d83bf97
Merged-In: I026eaefa62d8f64b9180fc182a7cf0605d83bf97
(cherry picked from commit a96ec13821b9888b4a1b8232e808b74b5449d2c8)
|
|
- Add a new API to get the network ID range of IPSec tunnel
interface.
- Use the new API in IpSecServiceTest to make sure the result is
the same. Follow-up commit will change the logic in
IpSecService#reserveNetId(), the modified test can ensure the
correctness of the new change.
Bug: 172183305
Test: atest FrameworksNetTests:IpSecServiceTest
Change-Id: Ic605e48941fc9d6482cdcd01a8adcdc9b6d586a6
|
|
This is a generic way to request networks that has different
subId but belongs to the same carrier. For example, cellular
networks with different SIM card, or carrier Wifi that
provided by the operator.
Test: atest NetworkCapabilitiesTest#testSubIds
Test: m doc-comment-check-docs -j
Test: atest CtsNetTestCases
Bug: 175662146
Change-Id: Ifca766f5acc73c285948d6251ec31506d9bb0bcb
|
|
The common tests cannot reference EthernetNetworkSpecifier,
as it did not exist in Q and R yet.
Bug: 179329291
Merged-In: Iec8ef874a3ca6dcc65944bbbaa3575a5ae0f4989
Change-Id: Iec8ef874a3ca6dcc65944bbbaa3575a5ae0f4989
Test: atest CtsNetTestCasesLatestSdk
|
|
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only
production user), and make it module-lib API.
The original StringNetworkSpecifier file is actually kept to satisfy
some invalid dependencies; it will be removed separately.
This allows specifying an Ethernet interface with a non-deprecated API:
until this change the only way to do so would be to use
NetworkRequest#setSpecifier(String), which is deprecated.
Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to
replace previous usage of StringNetworkSpecifier. TestNetworkManager is
module API, so TestNetworkSpecifier should be module API too. This
allows tests to request the test interface specifically, without using
the deprecated NetworkRequest#setSpecifier(String).
Bug: 179329291
Test: m
Merged-In: Iee569f5c8bbdc4bc979610e1191308281f3d4620
Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620
|
|
Test: atest FrameworksNetTests android.net.cts.ConnectivityManagerTest
Bug: 175662146
Change-Id: Iac9487e8de8bfdd87fc7a0153b228ae2a7ba4e19
|
|
Test: atest ConnectivityServiceTest#testRegisterBestMatchingNetworkCallback
Bug: 175662146
Change-Id: Ifa411c7b53da789c74fff7e1a95f9c9ebf5bd05c
|
|
|
|
|
|
- Replace the PackageManagerInternal#getPackageList() with
receiving PACKAGE_{ADDED|REMOVED} intent.
- Also remove the onPackageChanged method because the traffaic
permissions(INTERNET, UPDATE_DEVICE_STATS) are not changed after
package changed(Disable or enable package).
Bug: 176788468
Test: atest FrameworksNetTests
Change-Id: I5505d1c77db66a7e65fc336ea0e99846e78c6b36
|
|
|
|
|
|
* changes:
Declare VCN exposed networks as NOT_VCN_MANAGED
Allow underlying cell without unwanted NOT_VCN_MANAGED capability
Override network and use config IKE session
Remove usage of hidden Connectivity APIs
|
|
This change marks VCN-exposed networks as generic use, NOT_VCN_MANAGED
networks. This is the result of changes to the default NetworkCapability
set, where NOT_VCN_MANAGED was removed from the default capabilities.
Bug: 182212201
Test: atest FrameworksVcnTests
Change-Id: Iad296830201d7317537fac6bea53c79d4e41cae3
|
|
Fix: 182333299
Test: new unit tests
Change-Id: Ic15dc4fff6a13aa916e3d2dc6203829e96ddeda4
|
|
These were broken by aosp/1553463, which made filterNetworkInfo
unconditionally call setDetailedState with a reason of "" and an
extraInfo of null.
Fix both synchronous getter APIs (e.g., getNetworkInfo) and
CONNECTIVITY_ACTION broadcasts by calling a new
filterForLegacyLockdown method that behaves similarly to how the
now-deleted LockdownVpnTracker#augmentNetworkInfo used to behave.
While I'm at it, move back to private a method that was public
only because LockdownVpnTracker used it.
Fix: 181855958
Test: new unit test coverage
Change-Id: I2c7b88fcec9dd36b45cb51db8d19b3ee8bad44a6
|
|
|
|
This makes the test more realistic, since telephony always puts
the APN name in the extraInfo field. It also makes it easy to
test that various APIs properly return the extra info without
plumbing a new parameter through TestNetworkAgentWrapper,
NetworkAgentWrapper, and InstrumentedNetworkAgent.
Also make the extraInfo and the legacyType available to tests.
This will be used in future tests that assert the contents of
extraInfo.
Bug: 181855958
Test: test-only change
Change-Id: If4eddb6cd9e70bb33e10d72aceebaea843244246
|
|
This is needed for FrameworksNetTests because it inculdes
service-connectivity. Without this library, the service-connectivity
is already jarjar-ed which will cause the util classes couldn't be
found when running the tests. So let the tests inculde the pre-jarjar
version and service-connectivity applies the jarjar to this library.
Bug: 177046265
Test: FrameworksNetTests
Change-Id: I1acd95ff9bec99b918646e8ec3a57f3ef156e2ca
Merged-In: I1acd95ff9bec99b918646e8ec3a57f3ef156e2ca
|
|
* changes:
Support converting VcnControlPlaneIkeConfig to/from PersistableBundle
Support converting IKE Options to/from PersistableBundle
Support converting IkeConfigRequest to/from PersistableBundle
Support converting IkeAuthEapConfig to/from PersistableBundle
Support converting IkeAuthDigitalSignConfig to/from PersistableBundle
Support converting IkeAuthConfig to/from PersistableBundle
Support converting IkeSessionParams to/from PersistableBundle
|
|
|
|
This change updates the UnderlyingNetworkTracker to rely on the
TelephonyNetworkSpecifier for selecting underlying networks. This
ensures that there is always a cellular NetworkRequest filed for
Cellular to bring up an underlying Network.
Bug: 182211364
Test: FrameworksVcnTests
Change-Id: I826711bb671440054c2090793315a5f1d57596c0
|
|
|
|
Adding a seperate test tag into postsubmit so as to identify which tests
we want to run for automotive builds.
Test: atest --test-mapping [src]:auto-postsubmit
bug: 179917339
Change-Id: I3860fb6bf4f4174fad26cce5f7d6b43fd6494c0f
|
|
This change ensures the IKE configs are used with the correct network
Bug: 163604823
Test: FrameworksVcnTests
Change-Id: Ieb2a9b202204577f6e6969ef30245baed6382aa6
|
|
This CL updates VCN error callbacks to return the exposed capabilities
for a gateway connection for identification purposes. Previously, the
required underlying capabilities were returned (which are not meaningful
to the caller for identification purposes).
Bug: 182281888
Test: atest FrameworksVcnTests
Change-Id: Ic62bd0b524f24f2577d9abc7635112a6419d35ed
|
|
Currently ConnectivityService calls the methods in
BatteryStatsService through BatteryStatsManager so
IBatteryStats can be removed from ConnectivityService.
Bug: 171686421
Test: FrameworksNetTests
Change-Id: I559369c9900e8100cdae187bc9cec603ed85a131
|
|
* changes:
[Telephony] Use TelephonyCallback instead of PhoneStateListener part1
[PhoneStateListener] Redesign PhoneStateListener: Use TelephonyCallback
|
|
* changes:
Communicate with BatteryStatsService through BatteryStatsManager
Add a new API in BatteryStatsManager for connectivity service
|
|
NetworkAgentInfos cache the list of requests they satisfy,
and that list is used to send callbacks. Therefore, when
the TRACK_DEFAULTs are copied, this list needs to be
updated.
The best way to do this is to figure out what was the old
active request and find which requests corresponds to it
in the new list, and then upon registering adding the
active request to the relevant satisfier if present.
A few other ways can be considered like replacing the
request as it gets added, but this would temporarily
increase the number of callbacks allocated to the app
and risks crashing it for no good reasonĀ ; furthermore
the call to remove would have to be eschewed somehow
for those requests that are replaced. This is much
simpler.
Test: new test for this. This also passes the future
tests for per-profile default network preference.
Change-Id: I001351e5c478c2c77cbf2844abca77b205291778
|
|
LocationPermissionChecker was written to be used by multiple
connectivity modules, so it belongs in the frameworks/libs/net library.
The file is moved as-is with minor modifications in the test to avoid
usage of the privileged ActivityManager.getCurrentUser API.
Bug: 181837977
Test: atest NetworkStaticLibTests
Change-Id: I63bce35ba87c45138b3aaf6244367e982dfec455
|
|
Mainline connectivity service is only allowed to use formal
APIs. Use new system API in BatteryStatsManager instead of
calling BatteryStatsService directly.
Bug: 171686421
Test: FrameworksNetTests
Change-Id: I1d1f0d2d456003e842ad77519667c0532995610d
Merged-In: I1d1f0d2d456003e842ad77519667c0532995610d
|
|
This CL updates VCN instances to exit Safe Mode when they receive a
new VcnConfig. When a VCN exits Safe Mode, they will re-register a
request listener to receive all cached requests and start the
needed VcnGatewayConnections.
Bug: 179429339
Test: atest FrameworksVcnTests
Change-Id: Id1c2dc287e1ec56f37821cf0ae77f066f22d22bb
|
|
This CL updates VcnManagementService to notify VcnStatusCallbacks when a
VCN is started or stopped. VcnStatusCallbacks will also be notified for
config changes that cause a VCN to exit Safe Mode.
Bug: 180659281
Test: atest FrameworksVcnTests
Change-Id: I4168c868185880621333855dfcb51e46cb662741
|
|
Since the redesign of PhoneStateListener, use TelephonyCallback to get the callback of EVENT_*
Bug: 167684594
Test: make
Change-Id: Ia3b777b12142b104b5798804f50b34748f9bf28c
Merged-In: Ia3b777b12142b104b5798804f50b34748f9bf28c
|