Commit Graph

6461 Commits

Author SHA1 Message Date
Chiachang Wang
d734ce3202 Merge "Rename getRequiresInternetValidation to isInternetValidationRequired" 2022-03-03 00:10:54 +00:00
lifr
c8d48831b9 [SUBID01-0]Grow NetworkIdentity to include a new mSubId field
In the previous design of NSS and NPMS, those only had IMSI to identify
the cell network. Now the telephony has created the "subId" handle,
which is the preferred mechanism for identifying subscribers.

This commit adds NetworkStats support for subscriberId as a part of
the network identity key

Bug: 80526261
Test: atest NetworkTemplateTest NetworkStatsCollectionTest
            NetworkStatsServiceTest NetworkIdentityTest
            NetworkStatsDataMigrationUtilsTest

 (cherry-picked from ag/16825721)

Change-Id: Ie1fe81006555dbcca4b62457fa6c319f04b4576d
Merged-In: Ie1fe81006555dbcca4b62457fa6c319f04b4576d
2022-03-02 11:20:09 +08:00
Chiachang Wang
b1dc9fc8d8 Rename getRequiresInternetValidation to isInternetValidationRequired
Update naming from getRequiresInternetValidation to
isInternedValdiationRequired. This addresses API
review feedback.

Bug: 220129160
Test: atest FrameworksNetTests
CTS-Coverage-Bug: 220129160
Change-Id: I9e25890af6ed73538e9e44381bf05d587808c8de
2022-03-02 01:01:20 +00:00
Chalard Jean
d254813dde Rename EXTRA_TIMESTAMP into EXTRA_TIMESTAMP_MILLIS
Bug: 219820273
Test: m
Change-Id: I3005c045dee958c468e94ced0fac04324b77fca6
2022-02-25 17:00:49 +09:00
Treehugger Robot
027b7e9604 Merge "Remove @hide usage and fix NetworkPolicy backup" 2022-02-10 19:37:14 +00:00
Treehugger Robot
e82d94fde0 Merge "Expose VpnManager events API" 2022-02-10 12:36:37 +00:00
Robert Horvath
932104e096 Merge "Add Low Power Standby firewall chain" 2022-02-10 11:17:44 +00:00
Chalard Jean
b76721bb52 Expose VpnManager events API
Test: atest FrameworksNetTests:VpnTest
Change-Id: I66ed1ca69777ff8d8b0d2438e580282cfd30c9d6
2022-02-10 14:29:36 +09:00
Remi NGUYEN VAN
2f37fabe8c Remove @hide usage and fix NetworkPolicy backup
Remove usage of hidden symbols for network stats APIs, replacing them
with public API alternatives.

Also fix backup of NetworkPolicy when the set of subscriber IDs is
empty. This as not caught because the test used a hidden API builder
that creates a non-empty set containing null.

Bug: 197717846
Test: atest FrameworksCoreTests
  (cherry-picked and fixed merged conflict from ag/16781267)
Change-Id: I45a98795c571ac97bd6025988da156bd06d57e45
Merged-In: I45a98795c571ac97bd6025988da156bd06d57e45
2022-02-10 10:11:35 +08:00
Chiachang Wang
4123af09c9 Merge "Address API review feedback" 2022-02-10 00:50:30 +00:00
Robert Horvath
472ba5c869 Add Low Power Standby firewall chain
Bug: 190822356
Test: atest FrameworksNetTests
Change-Id: If5a61bbd0603c1385ecd2e8e25c8b91e4c6b315f
2022-02-09 21:04:42 +01:00
Treehugger Robot
5e7da1cfc4 Merge "Update VPN event strings for the IKE lib update" 2022-02-09 06:28:39 +00:00
Chiachang Wang
7e34f92ab2 Address API review feedback
Change naming of getExcludeLocalRoutes and setExcludedLocalRoutes
APIs based on API review feedback.

Bug: 217742354
Test: atest FrameworksNetTests
Change-Id: Ia330b571726f93fb38dc24341cc6b748269ccb61
2022-02-09 14:28:12 +08:00
Jean Chalard
cbb2fa2f00 Merge "Allow VPN apps to ask for running the validation checks" 2022-02-09 06:03:45 +00:00
Lucas Lin
f0524f1698 Merge "Add a new API startProvisionedVpnProfileSession()" 2022-02-09 01:12:03 +00:00
Chiachang Wang
3fc98d5ebd Allow VPN apps to ask for running the validation checks
Expose an API to allow VPNs app to ask for running the validation
check on the VPN network built from Ikev2VpnProfile.

Bug: 184750836
Test: New test in Ikev2VpnTest
      Also FrameworksNetTests
Change-Id: I385bb887b6c697d8f5d87af750dbd2aab44afca6
CTS-Coverage-Bug: 184750836
 (but CTS is in the same topic, just not detected by the tool)
2022-02-09 02:19:15 +09:00
Chalard Jean
87d4c529e0 Update VPN event strings for the IKE lib update
With a recent update, the IKEv2 library exposed the internal
errors happening on the link. This had us realize one error
code was a little bit ill-named and the other can't be exposed
because the system doesn't know about it happening.

Update the name of the events for this.

Test: m
Change-Id: I228b8309acbb5f599b908633923b16cd09e9c0af
2022-02-08 11:18:24 +09:00
Lorenzo Colitti
b5e914a343 Delete DhcpResults from frameworks/base.
This class is only used by NetworkStack, so move it to the
NetworkStack project.

Test: m
Change-Id: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
Merged-In: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
2022-02-07 06:03:11 +00:00
junyulai
07c4c8657d [MS59.3] Expose NetworkStatsDataMigrationUtils
Test: TH
Bug: 204830222
Change-Id: I15a45fbadeb69b70a0e983b00de9e934d29749d6
2022-01-28 11:03:53 +00:00
lucaslin
110b5a96d5 Add a new API startProvisionedVpnProfileSession()
Add a new API to return a unique key corresponding to a specific
VPN session, so that when VPN sends ACTION_VPN_MANAGER_ERROR
intent, the app can know if this intent is sent for the session
that the app is using.

Bug: 191413541
Test: atest CtsNetTestCases
Change-Id: I372308f7f4d20acf3ea17a322bc5f39e0bac460f
2022-01-27 19:04:15 +08:00
Chiachang Wang
377dd020fe Merge "Expose local route exclusion APIs" 2022-01-27 09:52:26 +00:00
Jean Chalard
b083799699 Merge "Support building Ikev2VpnProfile from an IkeTunnelConnectionParams" 2022-01-27 09:45:24 +00:00
Chiachang Wang
7e15818350 Expose local route exclusion APIs
Bug: 184750836
Test: make update-api
Test: atest FrameworksNetTests
Change-Id: I70470ab3a945570a23607e39d18f9825d9e1d7aa
CTS-Coverage-Bug: 184750836
2022-01-27 03:35:36 +00:00
Junyu Lai
44f61309c9 [MS59.1] Add NetworkStatsDataMigrationUtils
Once the data usage part moves into the module, the OEM would
lose the ability to modify the code, thus we need a mechanism
to prevent data loss during migration. Hence, provide a
helper class to read old version of persistent network
statistics, the implementation is intended to be modified
by OEM partners to accommodate their custom changes.

This interface will be invoked by NetworkStatsService during
the boot up phase in the migration process which will be
introduced in follow-up changes.

Test: atest NetworkStatsDataMigrationUtilsTest
Bug: 204830222
Change-Id: I4a9c8a04761b530ce0b31869f0d7fc191b00438f
2022-01-26 16:58:55 +00:00
Chiachang Wang
3981eb6376 Support building Ikev2VpnProfile from an IkeTunnelConnectionParams
Add a new builder constructor in Ikev2VpnProfile.Builder to allow
building Ikev2VpnProfile from a IkeTunnelConnectionParams object.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I586e7b24c35a777d39402148036d25606a733e85
CTS-Coverage-Bug: 184750836
2022-01-26 06:54:36 +00:00
William Escande
63c3c1f3d4 Merge changes from topics "bluetooth-localsocket-from-filedescriptor", "localsocket-from-filedescriptor"
* changes:
  Delete LocalSocket#createConnectedLocalSocket.
  Add a module-lib API for constructing a LocalSocket from an fd.
2022-01-25 15:41:08 +00:00
Lorenzo Colitti
d1c5580940 Delete LocalSocket#createConnectedLocalSocket.
The only caller of this method was BluetoothSocket, and that is
being removed in this topic.

Test: m
Bug: 200200870
Change-Id: Ic211448bc805c6f74852a8813317444bfb33c9dd
2022-01-25 10:01:04 +09:00
Yan Yan
b85c5d7634 Merge "Improve the API doc for setVcnUnderlyingNetworkPriorities" 2022-01-24 18:37:31 +00:00
Lorenzo Colitti
8093d78d1c Add a module-lib API for constructing a LocalSocket from an fd.
This allows constructing a LocalSocket from a FileDescriptor
referring to an already-connected socket. The LocalSocket can
then be used to exchange ancillary filedescriptors and fetch
peer socket credentials for the existing FD.

The fd is not dup'd or closed by the API, and the caller is
responsible for closing it. This is consistent with the
constructor of the related LocalServerSocket class, which also
takes an fd and does not manage its lifecycle.

Bug: 200200870
Test: atest CoreTests:android.net.LocalSocketTest CtsNetTestCases:android.net.cts.LocalSocketTest
Change-Id: I86448ba80475c4563194a4a2d9a0c0bbd0b76444
2022-01-25 00:56:44 +09:00
Xiao Ma
824840d16d Move Ethernet related files to f/b/packages/ConnectivityT.
ethernet-service is going to be moved into Connectivity mainline module.
Notice that below sources are also only used in the ethernet framework
during compiling the filegroup: framework-connectivity-ethernet-sources.
Move them from f/b to f/b/packages/ConnectivityT as well.

Ethernet framework only related files:
    - IInternalNetworkManagementListener.aidl
    - InternalNetworkManagementException.java
    - InternalNetworkManagementException.aidl
    - InternalNetworkUpdateRequest.java
    - InternalNetworkUpdateRequest.aidl

Ethernet service only related files:
    - DelayedDiskWrite.java(IpConfigStore imports this class)

Bug: 210586283
Test: build pass
      atest FrameworksNetTests
      atest EthernetServiceTests
Change-Id: I1ec2d1d182c04f3f2acc9b757d5061ca749a4a3c
2022-01-24 04:15:14 +00:00
Frank Li
df246f3c62 Merge "[DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService" 2022-01-19 05:32:05 +00:00
Junyu Lai
6dc2fbcf27 Merge "[MS60] Remove TrafficStats.TAG_SYSTEM_APP dependency" 2022-01-17 23:59:10 +00:00
lifr
c1d2e899ac [DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService
Expose system APIs for use by NetworkStatsService.

Bug: 211843446
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest
Change-Id: I56a066b7f4b4c2c8fefdd185c2e50de63b1e2629
2022-01-18 03:16:51 +08:00
Junyu Lai
c4c1949aa2 [MS60] Remove TrafficStats.TAG_SYSTEM_APP dependency
Replace with system Api.

Test: TH
Bug: 204830222
Change-Id: If2ef0dbb058c4360f046b1c16fdf467594249b03
2022-01-17 16:18:18 +00:00
Frank Li
d15c37c0e0 Merge "[DU04]Remove NetworkPolicyManagerInternal from NetworkStatsService" 2022-01-15 23:14:16 +00:00
Aaron Huang
3498c7a5cc Merge "Add PolicyDirection InfDef annotation to IpSecManager" 2022-01-15 06:08:32 +00:00
lifr
0bd4952f49 [DU04]Remove NetworkPolicyManagerInternal from NetworkStatsService
NetworkStatsService is using NetworkPolicyManagerInternal APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 211843446
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest
Change-Id: I0f3f02d1dc014967fab27ffcf37dd1918dbef5e0
2022-01-15 14:06:31 +08:00
Benedict Wong
e6b79e2923 Merge changes I61c84693,I929428f7
* changes:
  Expose entry/exit bandwidth criteria APIs for VCN templates
  Add minimum required bandwidth to network templates
2022-01-14 17:12:13 +00:00
Yan Yan
6391ebe715 Improve the API doc for setVcnUnderlyingNetworkPriorities
Bug: 205343355
Test: make
Change-Id: Ib1cb4b2e05f1e769b4ccb4a45b6abd7589d35a07
2022-01-13 16:39:39 -08:00
Treehugger Robot
3cca242ec3 Merge "Add constants of VpnManager events" 2022-01-13 19:40:03 +00:00
lucaslin
7cb77f7347 Add constants of VpnManager events
Bug: 191413541
Test: N/A
Change-Id: I1db1419d701940ba74b59f61d510878f08e64c91
2022-01-13 08:19:14 +00:00
Benedict Wong
073e1ac89b Expose entry/exit bandwidth criteria APIs for VCN templates
This change adds additional criteria for bandwidth in both the
upstream and downstream directions, ensuring that a minimum quality
bar can be guaranteed for VCN underlying networks. Both directions
support separate entry/exit criterion to allow for hysteresis.

Bug: 205343355
Test: atest FrameworksVcnTests
CTS-Coverage-Bug: 209498272
Change-Id: I61c8469380551e673d91f9a4428d21a40f164841
2022-01-13 05:44:56 +00:00
Benedict Wong
ee22e0d57d Add minimum required bandwidth to network templates
This change adds a minimum required bandwidth to the VCN network
templates, ensuring that a minimum bar of throughput can be required of
underlying networks.

Bug: 211008106
Test: atest FrameworksVcnTests
Change-Id: I929428f75e5e543966a03061d13f300dd8b0956f
2022-01-13 05:35:50 +00:00
Aaron Huang
314e2b37f2 Add PolicyDirection InfDef annotation to IpSecManager
IpSec is going to be moved into Connectivity module and it needs to
use PolicyDirection annotation. Add PolicyDirection IntDef annotation
so that it can be used in the module.

Bug: 204153604
Test: FrameworksNetTests
Change-Id: Ib411d8c436d67574bfaf7f3aba43e5f31e7487e2
2022-01-13 10:43:54 +08:00
James Mattis
1f21e4acf4 Merge "Making NetworkCapabilities @NonNull" 2022-01-12 17:43:22 +00:00
Taras Antoshchuk
bc8f256721 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" 2022-01-12 15:27:30 +00:00
Benedict Wong
179826efdc Merge changes Ib7d51cf1,I92bd2831
* changes:
  Expose APIs to configure underlying network priority
  Update setter/getters to configure underlying network priority
2022-01-12 05:21:03 +00:00
Jean Chalard
649c2ea2d2 Merge "Add documentation about VpnProfile#setExcludeLocalRoutes" 2022-01-12 01:30:41 +00:00
Chiachang Wang
657656b460 Only set excludeLocalRoutes in the bypassable VpnProfile
fromVpnProfile() will be called in the system server directly.
If the input VpnProfile does not set excludeLocalRoute with a
bypassable VPN, it will crash system server. Thus, only set
the excludeLocalRoutes in the bypassable VpnProfile.

Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: I311cc7e3c46ab4f6721f477f227e76ba4c0712f6
2022-01-11 13:46:47 +00:00
Chiachang Wang
eaa3fc76a8 Merge "Allow excludeLocalRoutes set only in bypassable profile" 2022-01-11 08:56:38 +00:00