Commit Graph

6529 Commits

Author SHA1 Message Date
Frank Li
489f6d9d36 Merge "[SUBID01-0]Grow NetworkIdentity to include a new mSubId field" 2022-02-11 06:19:49 +00:00
Robert Horvath
90305697d1 Merge "Block network access in Low Power Standby" 2022-02-10 22:05:10 +00:00
lifr
c496554d12 [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
Change-Id: Ie1fe81006555dbcca4b62457fa6c319f04b4576d
2022-02-10 22:49:05 +08:00
Treehugger Robot
ed3cc1bb75 Merge "Expose VpnManager events API" am: e82d94fde0 am: 756a66d3fe am: 9107933dc6 am: 965f6b8900
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976227

Change-Id: I2bd5eb312d7f6a05e064d433f9cb4faf1d699562
2022-02-10 13:44:44 +00:00
Robert Horvath
452ab99df9 Block network access in Low Power Standby
Bug: 190822356
Test: atest NetworkPolicyManagerServiceTest LowPowerStandbyControllerTest
Change-Id: I6c554df71b12bcf06f1c98ef70c35242bc90a689
2022-02-10 13:53:05 +01:00
Treehugger Robot
e82d94fde0 Merge "Expose VpnManager events API" 2022-02-10 12:36:37 +00:00
Robert Horvath
b31ca5fa92 Merge "Add Low Power Standby firewall chain" am: 932104e096 am: 6a38e544a2 am: dea24df0a7 am: 5acb0b1646
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1916097

Change-Id: Ifafc22e788361e668061e7dc94cc0c617f996a68
2022-02-10 11:54:25 +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
Chiachang Wang
6e7c4e7dc6 Merge "Address API review feedback" am: 4123af09c9 am: 1dedf4a69d am: af72438c7d am: 32f716b417
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976446

Change-Id: I9935a6a937d7e9cb953e68e34afa738598ed1ea5
2022-02-10 01:39:12 +00: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
5f07972554 Merge "Update VPN event strings for the IKE lib update" am: 5e7da1cfc4 am: 09831a1aaa am: e4e049c4f9 am: 6df12a625b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1976226

Change-Id: I33e2fbae504bd3b01c71708ef94af956dbae7c12
2022-02-09 07:09:40 +00:00
Jean Chalard
993c5e1003 Merge "Allow VPN apps to ask for running the validation checks" am: cbb2fa2f00 am: 64ba50411e am: 1f929d9bd5 am: aac1b3a307
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962928

Change-Id: Iab6157c17d9f4c6554ba65296443eec42dd21e71
2022-02-09 06:57:05 +00: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
e7d6aeeb26 Merge "Add a new API startProvisionedVpnProfileSession()" am: f0524f1698 am: f6bf9b14d0 am: fed12c46a7 am: 6f1fdda01e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906011

Change-Id: Iab1f1ace8f8685fc36dfce2e85bb36b2d2b2fb7b
2022-02-09 02:22:46 +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
TreeHugger Robot
d44f10236a Merge changes from topic "no-dhcpresults"
* changes:
  [automerge] Delete DhcpResults from frameworks/base. 2p: a2ea37e61e
  Delete DhcpResults from frameworks/base.
2022-02-07 05:53:10 +00:00
Remi NGUYEN VAN
e839e63d21 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
Change-Id: I45a98795c571ac97bd6025988da156bd06d57e45
2022-02-07 11:45:12 +09:00
TreeHugger Robot
72d07fb822 Merge "Ensure SubscriptionPlans can be removed" 2022-02-05 02:56:21 +00:00
Sarah Chin
e6f17feb77 Ensure SubscriptionPlans can be removed
Add a duration that the plans last and don't read to/write from disk
for plans. Make non-duration setSubscriptionPlans API deprecated.

Test: atest SubscriptionManagerTest, NetworkPolicyManagerServiceTest
Bug: 210696427
Change-Id: I93aece78eda324c333fbf9f1adbedcf46e4864f0
2022-02-04 15:49:10 -08:00
Presubmit Automerger Backend
d316c590ab [automerge] Delete DhcpResults from frameworks/base. 2p: a2ea37e61e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16781268

Change-Id: I7c98eeef9b2a92dbce1014ce51eaca19d19e40d8
2022-02-03 15:52:01 +00:00
Lorenzo Colitti
a2ea37e61e Delete DhcpResults from frameworks/base.
This class is only used by NetworkStack, so move it to the
NetworkStack project.

Test: m
Change-Id: I356ee7b24613e84b8a90ddccd6d25d0742d13ae7
2022-02-04 00:51:11 +09:00
TreeHugger Robot
3a241a4dc9 Merge "Update getSubscriptionPlans documentation" 2022-01-31 21:59:07 +00:00
Sarah Chin
8e5d992fa4 Update getSubscriptionPlans documentation
getSubscriptionPlans can return null if a plan has not been set for the
given subId yet. Change the annotation from @NonNull -> @Nullable and
update the documentation. SubscriptionManager#getSubscriptionPlans will
return the @NonNull plans instead.

Test: build
Bug: 213896944
Change-Id: I7b232a1a695d1db7cb0d0a177bb1090e9033b805
2022-01-31 18:16:54 +00:00
Junyu Lai
45e6bebaed Merge "[MS59.3] Expose NetworkStatsDataMigrationUtils" am: 853b6f6ede am: cfb860d019 am: 7cdd324483 am: 9beb86bd45
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1961599

Change-Id: Ie96aa4f519816b3c76f6f9e4dc2400070f4d326b
2022-01-29 05:26:20 +00:00
junyulai
07c4c8657d [MS59.3] Expose NetworkStatsDataMigrationUtils
Test: TH
Bug: 204830222
Change-Id: I15a45fbadeb69b70a0e983b00de9e934d29749d6
2022-01-28 11:03:53 +00:00
Chiachang Wang
dd512633c4 Merge "Expose local route exclusion APIs" am: 377dd020fe am: 8a26f53a68 am: 5417b89233 am: d9ff943b80
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1962799

Change-Id: I0331f6a0bfd41990ffd22d06eb2b62ddf2c7f612
2022-01-27 11:42:06 +00:00
Jean Chalard
43aee0df67 Merge "Support building Ikev2VpnProfile from an IkeTunnelConnectionParams" am: b083799699 am: 5f01f6cb66 am: e5550847ee am: 599fe55867
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1958911

Change-Id: I71891242e13bf3183c14e3a11969c16c38c3b3c9
2022-01-27 11:40:44 +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
Junyu Lai
8b33a21870 Merge "[MS59.1] Add NetworkStatsDataMigrationUtils" am: c428b10a74 am: a5beb8b8f9 am: b7a3ae056c am: 93feaa875e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1951480

Change-Id: Ieff101d7da2bdc533873b3ed1b63fb0c609243db
2022-01-27 10:47:40 +00: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
d422e42c86 Merge changes from topics "bluetooth-localsocket-from-filedescriptor", "localsocket-from-filedescriptor" am: 63c3c1f3d4 am: 35dda7049d am: ca3d992029 am: 89826ba131
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959006

Change-Id: I8f981549f0a4bdcf04332fc1f05d1e12a6b1893f
2022-01-25 16:55:20 +00:00
Lorenzo Colitti
a9a140e2d4 Add a module-lib API for constructing a LocalSocket from an fd. am: 8093d78d1c am: 15bf48abb2 am: 39000cbc73 am: 40f1545d92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954386

Change-Id: I83768a1f22fc70d004cb54548c8d2d99cecdaa4b
2022-01-25 16:54:49 +00:00
Lorenzo Colitti
15bf48abb2 Add a module-lib API for constructing a LocalSocket from an fd. am: 8093d78d1c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954386

Change-Id: I9fe0e6a22859a82b128b163bc1036712737aa946
2022-01-25 16:00:32 +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
9649474755 Merge "Improve the API doc for setVcnUnderlyingNetworkPriorities" am: b85c5d7634 am: e6286ba332 am: 59bb050977 am: 2580f4afc2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945490

Change-Id: I567de4b56f6b92a1f0f28ca2da23924f84571db8
2022-01-24 19:59:08 +00: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
fd9fb85bc4 Merge "Move Ethernet related files to f/b/packages/ConnectivityT." am: 487a9cc8a4 am: bf089a8cd1 am: 738edf5e07 am: 33f4958b4b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934465

Change-Id: I3c77b13525165ef3376b143485ad0a6671ce9ceb
2022-01-24 13:50:35 +00:00