Commit Graph

8 Commits

Author SHA1 Message Date
Junyu Lai
65b4d74237 Merge changes I3ba50cbd,I970ee365
* changes:
  [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots
  [FUI27] Fix internal naming of notifyNetworkStatus
2021-05-15 16:21:38 +00:00
Jayachandran Chinnakkannu
02dabf7bb6 Merge "QOS filter matching support based on remote address and port number for connected sockets" 2021-05-14 20:02:30 +00:00
junyulai
1df306006e [FUI27] Fix internal naming of notifyNetworkStatus
Test: TH
Bug: 174123988
Change-Id: I970ee365ca221956ee85788005d331374b5fa71a
2021-05-14 19:48:17 +08:00
junyulai
369be87265 [FUI26] Address comments on aosp/1560408
Test: TH
Bug: 174123988
Change-Id: I949eeb8903e903d8ede90521442b1f917d5cdfeb
2021-05-14 15:57:44 +08:00
Aaron Huang
3c4e669929 Rename *Iface* APIs to *Interface*
Address API review feedback, other APIs have been refering to
these as "interface" instead of "iface" so migrate the APIs named
*Iface* to *Interface*.

(cherry-picked from ag/14326779)
Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Merged-In: I38b476e762fb57fa88c4a789092d0af6f5330d80
Change-Id: I38b476e762fb57fa88c4a789092d0af6f5330d80
2021-05-14 11:05:22 +08:00
Jayachandran C
b533550b06 QOS filter matching support based on remote address and port number for connected sockets
This CL adds APIs for telephony to perform filter matching based on
remote address if the socket is connected. Additional checks will be
performed on the state of socket to avoid the future callbacks in a
separate CL.

Bug: 181916576
Test: Manually verified in live T-Mobile network
      atest ConnectivityServiceTest
      atest com.android.internal.telephony.dataconnection.QosCallbackTrackerTest

Change-Id: I6fbd4e84c76bc4acbf4e59f06f8e86e0237bae29
2021-05-13 09:50:13 -07:00
Lorenzo Colitti
6424cf294f Do not automatically redact TransportInfo objects.
Currently, NetworkCapabilities always redacts the TransportInfo
objects it contains whenever a defensive copy is made. This makes
it impossible to make a defensive copy on a TransportInfo
parcelled from another process without redacting it.

Stop redacting by default; instead rely on ConnectivityService
explicitly calling NetworkCapabilities' redacting constructor
when it returns a NetworkCapabilities object to an app via a
callback or synchronous call. This is currently done by
- createWithLocationInfoSanitizedIfNecessaryWhenParceled, which
  is called from callCallbackForRequest, getNetworkCapabilities,
  and getDefaultNetworkCapabilitiesForUser.
- getNetworkCapabilitiesWithoutUids, which is used when sending
  ConnectivityDiagnosticsManager callbacks. In this method,
  unconditionally redact all information, which is what the code
  did previously due to the default redaction setting for empty
  NetworkCapabilities objects being REDACT_ALL.

Bug: 183938194
Test: atest NetworkCapabilitiesTest
Test: atest FrameworksNetTests CtsNetTestCases HostsideVpnTests
Change-Id: I3108ee94cb0930958e071ba678c3554525b0db82
2021-05-13 20:24:19 +09:00
Remi NGUYEN VAN
5ed250d90a Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
2021-05-13 08:30:33 +00:00