This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.
Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
NetworkCapabilities#mAdministratorUids is used to track the UIDs that
are administrators of the given Network. This value was previously
stored as List<Integer>. However, general Android API Council guidelines
recommend using Arrays for primitive values. In order to be consistent
with the guidelines, updating the field to use an Array.
Bug: 147903575
Test: atest FrameworksNetTests
Change-Id: I2652a5b0f276b8944454af5cb4b1383a3e054cfa
Merged-In: I2652a5b0f276b8944454af5cb4b1383a3e054cfa
API Council feedback suggests renaming ConnectivityDiagnosticsCallback
'onConnectivityReport' function to be 'onConnectivityReportAvailable'.
Bug: 150598997
Test: atest FrameworksNetTests
Change-Id: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
Merged-In: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
Currently, printing a NetworkAgentInfo results in a very long
string. Make it a bit shorter by:
- Not printing a number of fields in NetworkInfo that are no
longer used.
- Instead of printing flags regardless of whether they are true
false, only print ones that are true. For example, this changes
everCaptivePortalDetected{true} lastCaptivePortalDetected{false} captivePortalValidationPending{false}
to:
everCaptivePortalDetected
- Only printing clat information if clatd is started.
Also, put the long and variable-length fields lp and nc at the
end of the output.
Test: manual
Change-Id: I3312286be307ef1762890cbc6b717f12ce5b2b92
Add test for constructor and parcel
Test: atest CtsNetTestCasesLatestSdk:android.net.NattKeepalivePacketDataTest
on both Q and R devices
Bug: 151402211
Change-Id: I97015365604be1846e3ecbaf60ac99e334705565
This addresses API review comments recommending to use a copy
constructor with additional parameters instead of a dedicated method.
makeSensitiveFieldsParcelingCopy becomes LinkProperties(base, true).
Bug: 150877475
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Change-Id: Ib145ca7f36dcbee6ef47d09862a181fc04a28f03
Some of the API we made @SystemApi won't be used by mainline
module. Removing these from the surface.
Bug: 151266974
Test: atest FrameworksNetTests
atest FrameworksTelephonyTests
atest FrameworksWifiTests
Change-Id: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
Merged-In: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
Add a new static library that compiles against system_current which
includes all the parts needed by the wifi mainline module.
Also,
a) Refactored TcpKeepalivePacketData to use public APIs. The parcel
read/write methods in the base class are @hide and they're not used by
the other child class (NatKeepalivePacketData). So, remove the @hide
method from base class and use it direcly in the child class.
Bug: 145825329
Test: Device boots up & connects to wifi networks.
Change-Id: Ifde69b579cfe5b813766f676acb10e436e64a44c
Merged-In: Ifde69b579cfe5b813766f676acb10e436e64a44c
CONNECTIVITY_ACTION_SUPL is marked as a "temporary hack" and has
never been public. Remove this intent definition since no one is
receiving this intent and should use network callback to know the
connection change.
Bug: 109636544
Test: atest FrameworksNetTests
Change-Id: Ie9e5127742beba04f1c191e894e8a29fe1e704bb
CTS testing for ConnectivityDiagnosticsManager requires registering
TestNetworks with the administrator UIDs set. This sets up the CTS
process to be an administrator over the test network, which allows it to
receive ConnectivityDiagnosticsCallback callbacks.
Bug: 148032944
Test: atest android.net.cts.ConnectivityDiagnosticsManagerTest
Test: atest IpSecManagerTunnelTest
Change-Id: I7a443c368cf1ac470fbe40883ca24bc3143153b0
- Change route to update existing route
- MTU parameter added to AddRoute
Bug: 142892223
Test: unit test
Change-Id: Ie339d0cee5be12c2232a4631fed61219a0facc64
Add srcs to framework and change import path.
Remove the codes which are moved to frameworks/libs/net.
Bug: 139268426
Bug: 135998869
Bug: 138306002
Bug: 143925787
Test: atest FrameworksNetTests
atest FrameworksTelephonyTests
./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Ia5692aade490fbc8a037186fcdfc453e0dd8045b
Merged-In: Ibf2f370c97a602f186e37ea9ffbe177dd2ee0f1c
API Council feedback requested adding documentation for detection method
constants used in DataStallReport to indicate how the Data Stall was
detected.
Bug: 150598997
Test: n/a
Change-Id: Ib08f05562dd4b17973eeee97452d9f56d37e80fe
This class is useless at this point and introduces overhead.
Bug: 113554781
Test: FrameworksNetTests
Change-Id: Ib6da6c1c7f2a0b97c847d2e64e5ce16dd821e1e7
Registering/Unregistering network provider needs NETWORK_FACTORY
which is signature only permission. But mainline modules can't
grant this permission because it's not signed with platform key.
Hence, these APIs should also accept MAINLINE_NETWORK_STACK
permission that allow mainline module to register/unregister
network provider.
Bug: 150733435
Test: atest FrameworksNetTests
Change-Id: Id22113aa0db01244817b4b008f5573c5e7b317f0
Wifi needs to create these objects so it can include them
in the broadcasts.
Bug: 135998869
Test: FrameworksWifiTests
Change-Id: Ic50d9b5c65e8771708620badc3bc242a8ffbb5cc
Merged-In: Ic50d9b5c65e8771708620badc3bc242a8ffbb5cc
Calling IPC in a constructor is unusual and confusing, and can be
considered bad form. There are multiple reasons for this :
• Users can't obtain an instance of the class without calling the
constructor, but they can't always afford an IPC where they need
this, forcing them to know about the implementation detail and
sometimes design around it.
• On a related but generalized note, constructors should usually
be fast for the same range of reasons.
• Having a separate method to register the agent simply gives more
flexibility to the app.
• It's also a lot easier to test.
But also we can't fix it without an update to the API, so here it is.
Another reason for doing this is consistency with the NetworkProvider
API.
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: I1ee5c7b1353d581e487c8a8a159009bebd781643
Merged-In: I1ee5c7b1353d581e487c8a8a159009bebd781643
(clean cherry-pick from internal branch)
Also add methods to set the legacy subtype and the APN name.
These have to be added together because they have to be used
together.
Bug: 138306002
Bug: 139268426
Test: atest FrameworksNetTests FrameworksWifiTests FrameworksTelephonyTests
Change-Id: Ie90b8d290eab490061d5cb066744b67d597b9469
Merged-In: Ie90b8d290eab490061d5cb066744b67d597b9469
(clean cherry-pick from internal branch)
This change adds permission checking to ensure that the following
conditions are enforced in order for apps to receive the owner UID:
1. The app must be the owner of the network
2. The app must hold the FINE_LOCATION permission/appop
3. The user must have their location toggle enabled.
Bug: 142072839
Test: atest FrameworksNetTests
Change-Id: I7a981a82f1219828ee89c8c96eb9d2efd153377f
Add the requestorUid & requestorPackageName fields to
NetworkCapabilities. This is populated by CS when
a new network request is received.
These 2 requestor fields are also optionally used for network
matching. All of the regular app initiated requests will have the
requestor uid and package name set by connectivity service. Network
agents can optionally set the requestorUid and requestorPackageName
to restrict the network created only to the app that requested the network.
This will help removing the necessity for the various specifiers to embed
the uid & package name info in the specifier for network matching.
Note: NetworkSpecifier.assertValidFromUid() is deprecated & removed in
favor of setting the uid/package name on the agent to restrict the
network to a certain app (useful for wifi peer to peer API & wifi aware).
Bug: 144102365
Test: Verified that wifi network request related CTS verifier tests
pass.
Test: Device boots up and connects to wifi networks
Merged-In: I207c446108afdac7ee2c25e6bbcbc37c4e3f6529
Change-Id: I58775e82aa7725aac5aa27ca9d2b5ee8f0be4242