Commit Graph

6555 Commits

Author SHA1 Message Date
Lorenzo Colitti
4aaa394f28 Merge "Store IkeTunnelConnectionParams in Ikev2VpnProfile" am: bc6f905d38 am: 492871c0b1 am: 4d46a14600
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2029924

Change-Id: Iacea8798dd865bd7900a96784a028184c41dbb89
2022-03-19 06:28:36 +00:00
Lorenzo Colitti
bc6f905d38 Merge "Store IkeTunnelConnectionParams in Ikev2VpnProfile" 2022-03-19 05:34:30 +00:00
Benedict Wong
7c3eacb6a7 Merge changes I67470903,Ia80da6d4,I332397f4 am: 7d042ad402 am: f1dacac9ea am: 639c60d696
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030266

Change-Id: Ic90ee169932a8c5db483dea4df64c9cf0129f9a4
2022-03-18 22:32:02 +00:00
Benedict Wong
7d042ad402 Merge changes I67470903,Ia80da6d4,I332397f4
* changes:
  Define and implement getProvisionedVpnProfileState()
  Introduce VpnProfileState
  Define new constants of ACTION_VPN_MANAGER_EVENT
2022-03-18 21:47:47 +00:00
Sarah Chin
f3ecc6182b Merge "Update getSubscriptionPlans documentation" 2022-03-18 21:22:49 +00:00
Sarah Chin
5fe695fbdd 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
Merged-In: I7b232a1a695d1db7cb0d0a177bb1090e9033b805
2022-03-18 09:58:47 -07:00
Neil Fuller
ad7b8429d0 Merge "Add the ability to configure NTP port for tests" am: 72e04a7dc2 am: 53d21a8591 am: 0fa758c3b8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030083

Change-Id: Ib22fde6cf8bfba028d286647b10b1d2885d78c9d
2022-03-18 12:49:40 +00:00
Neil Fuller
72e04a7dc2 Merge "Add the ability to configure NTP port for tests" 2022-03-18 11:48:29 +00:00
lucaslin
0ae29f0cd5 Define and implement getProvisionedVpnProfileState()
CTS-Coverage-Bug: 225010642
Bug: 225010642
Test: CtsNetTestCases:Ikev2VpnTest
Change-Id: I67470903bba2f783e316be47a50c438e049ca856
2022-03-18 11:24:12 +00:00
lucaslin
f306a53e48 Introduce VpnProfileState
This class can provide the state of VPN, session key and the
settings of always-on and lockdown.

CTS-Coverage-Bug: 225010642
Bug: 225010642
Test: N/A
Change-Id: Ia80da6d4c165680f8c8c7cba0aa4246a5c5934da
2022-03-18 11:24:01 +00:00
lucaslin
836a3e3d83 Define new constants of ACTION_VPN_MANAGER_EVENT
CTS-Coverage-Bug: 225010642
Bug: 225010642
Test: N/A
Change-Id: I332397f4f65596740670d96c72c85ad216d2a1bc
2022-03-18 08:08:35 +00:00
Chiachang Wang
41e5cc7039 Store IkeTunnelConnectionParams in Ikev2VpnProfile
IkeTunnelConnectionParams contains more information than the
existing fields inside Ikev2VpnProfile. If the Ikev2VpnProfile
is built from an IkeTunnelConnectionParams, saving it to the
existing fields of Ikev2VpnProfile may cause information lost,
such as IKE options. Thus, store the IkeTunnelConnectionParams
as a field inside Ikev2VpnProfile.

The other Ike options are mutually exclusive with
IkeTunnelConnectionParams. The information such as Preshared
key or username/password may not return expected values if a
profile is built from an IkeTunnelConnectionParams. This may
confuse API callers for using the other getters. Thus, expose
a getter to retrieve IkeTunnelConnectionParams

Bug: 184750836
Test: atest FrameworksNetTests
CTS-Coverage-Bug: 184750836
Change-Id: I61e9a9549b87951956afdcbae2518228994e4729
2022-03-18 10:45:47 +08:00
Neil Fuller
187c975af9 Add the ability to configure NTP port for tests
Add the ability to configure NTP port for tests via the command line and
the associated plumbing / knock-ons.

In-progress CTS tests will run a fake NTP server on the device itself.
Binding to NTP's default port of 123 is restricted. Therefore, we need
to be able to override the port for tests.

adb shell cmd network_time_update_service set_server_config --port 9999
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe false>

adb shell cmd network_time_update_service set_server_config
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe true>

Bug: 213393821
Test: See above
Change-Id: I21e8b735fab268df0d617848b8a562f86560ad16
2022-03-17 11:36:19 +00:00
Frank Li
682c05e0f0 Merge "[DU04-2]Appropriate changes to the NetworkPolicyManager API" am: c48d90e91b am: acb77010ac am: 858f0d75e4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2007132

Change-Id: I7e5dc71e1705a7c205c0fd6a7cb57e75cae5a4fc
2022-03-16 13:20:10 +00:00
Frank Li
c48d90e91b Merge "[DU04-2]Appropriate changes to the NetworkPolicyManager API" 2022-03-16 12:28:24 +00:00
Frank
7c43d8fcac [DU04-2]Appropriate changes to the NetworkPolicyManager API
Divide the NetworkPolicyManager API
notifyStatsProviderWarningOrLimitReached into the following two APIs:
1. notifyStatsProviderWarningReached()
2. notifyStatsProviderLimitReached()

Bug: 216474563
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest OffloadControllerTest
Change-Id: Ic413eb532b5e24d4a7e2afabdcf643ab6607b1ed
2022-03-16 14:23:50 +08:00
Aaron Huang
0d7a846d6b Merge "Create @StringDef for the PREFIX_* values" am: 5e42ca0036 am: 136365ee06 am: c0c3d03595
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2022816

Change-Id: Id111cd658fc5ee877f13946d1bb747f537d050b6
2022-03-15 05:36:50 +00:00
Aaron Huang
2438554348 Create @StringDef for the PREFIX_* values
Bug: 222291489
Test: build, FrameworksNetTests
Change-Id: If54bed41e96a1b1ef169d89a0caa9e4300578374
2022-03-14 11:12:23 +08:00
Chiachang Wang
b8a6ed34bb Merge "Rename getRequiresInternetValidation to isInternetValidationRequired" am: d734ce3202 am: 8344626eba am: 590305ed33
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1990334

Change-Id: Id109413e335e1bb818f0b608927c6ce0feb10dd5
2022-03-03 01:23:15 +00:00
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
Jean Chalard
1028d09146 Merge "Rename EXTRA_TIMESTAMP into EXTRA_TIMESTAMP_MILLIS" am: 9709f513c1 am: 40d78c5b05 am: 59b684a1ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2000591

Change-Id: I6b4b986175cb4ec30002f666acd4adb034fd6199
2022-02-28 21:22:08 +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
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
Treehugger Robot
027b7e9604 Merge "Remove @hide usage and fix NetworkPolicy backup" 2022-02-10 19:37:14 +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
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
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