Commit Graph

2110 Commits

Author SHA1 Message Date
James Mattis
07ae51bd26 Merge "Add OEM_PRIVATE NetworkCapability" am: 7415f6f9b5 am: 32fbc09bd0 am: 73877e08a8 am: 0829a6ac61
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1472326

Change-Id: I33da7fd0b61eb0d5a6b45b4ba2140b39c377e15a
2020-10-28 00:38:12 +00:00
James Mattis
b3b4899980 Add OEM_PRIVATE NetworkCapability
Adding network capability to be used with networks to be only used by
OEM apps.

Bug: 171505922
Test: atest CtsNetTestCasesLatestSdk:NetworkCapabilitiesTest
Change-Id: Ib55ebec0e178b6317d92f17e1aff060dacdfb2b1
2020-10-27 13:14:06 -07:00
Lucas Lin
752bba2382 Merge "Using Context#getSystemService instead of ServiceManager#checkService" am: d769b3863e am: bb6fc081c2 am: 884546597e am: c93771dde5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1463902

Change-Id: If50e3be30fa1ba34c945736ed9a8a83fbe122b48
2020-10-23 05:01:48 +00:00
lucaslin
f0d393d530 Using Context#getSystemService instead of ServiceManager#checkService
ConnectivityService is going to be a mainline module, it can only
use formal APIs or @SystemApi. So use public API -
Context#getSystemService() instead of hidden API -
ServiceManager#checkService().

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I9824caa7aec57e70f0ba405fcce39f9bc068732d
2020-10-23 03:07:07 +00:00
Treehugger Robot
17ab9135eb Merge "Address comments on aosp/1448415" am: bc7602e296 am: bafa575166 am: 1f4d324fc7 am: f44fb38d88
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1465505

Change-Id: If14a6913d9d721f0fa680afe0ee51e089fddb749
2020-10-21 08:32:11 +00:00
Chiachang Wang
4dae969c59 Merge "Do not use hidden SystemProperties.set" am: 93961f7b21 am: d7146b6742 am: b2d82398a6 am: 84ea88acb2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460971

Change-Id: Ie125f2d0d5605180189fa1dfbef70286ad79c23e
2020-10-21 08:31:09 +00:00
Treehugger Robot
bc7602e296 Merge "Address comments on aosp/1448415" 2020-10-21 07:05:49 +00:00
Chiachang Wang
93961f7b21 Merge "Do not use hidden SystemProperties.set" 2020-10-21 07:00:56 +00:00
Chalard Jean
c8b4e0124d Address comments on aosp/1448415
Adds the necessary jarjar rules to FrameworksTestNet and
removes the test for CompareResult which has moved to its
right place.

Test: FrameworksTestNet
Change-Id: I50e51e72268e432a65a831aa5eebd606584ac721
2020-10-21 13:54:02 +09:00
Chiachang Wang
a6d08e9723 Merge "Remove unused MockableSystemProperties from DnsManager constructor" am: 3e23d7271b am: 250a9d3d20 am: 672ee3eef5 am: 67fcddf4f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1466231

Change-Id: Id0b0b33e8156831222968ca68f289d206787d635
2020-10-20 21:22:27 +00:00
Chiachang Wang
c43d68f0d0 Do not use hidden SystemProperties.set
ConnectivityService is going to become a mainline module, and
it will not able to use hidden method anymore. Thus, use
alternative new sysprop as API to control the tcp init rwnd
value.

Bug: 170917042
Test: adb shell getprop net.tcp_def_init_rwnd and check if
      value is set correctly
Test: atest FrameworksNetTests
Change-Id: If9e99c88de50b6829721b0dfacc430a3b53c7728
2020-10-20 19:35:01 +08:00
Chiachang Wang
6710686910 Remove unused MockableSystemProperties from DnsManager constructor
DnsManager does not use MockableSystemProperties to communicate
with netd to configure the dns server anymore. ConnectivityService
does not need to take it into DnsManager as a parameter. Thus,
clean up the unused code.

Bug: 33308258
Test: atest FrameworksNetTests
Change-Id: I2ac89944391f7d1fd5d67f26cf7f2b11a4a4cf84
2020-10-20 15:46:30 +08:00
Aaron Huang
4a19a57729 Merge "Create service-connectivity.jar" 2020-10-20 06:09:41 +00:00
Chalard Jean
64db0ea5b0 Merge "Remove unused methods from LinkProperties." am: 88e32a8ae6 am: f812dc9b77 am: 57899a690d am: c703b02538
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1448415

Change-Id: I7e97ed89636e22553c6b2a3a759d2bdcbed9ba24
2020-10-19 10:50:44 +00:00
Chalard Jean
88e32a8ae6 Merge "Remove unused methods from LinkProperties." 2020-10-19 09:37:26 +00:00
Yan Yan
85c79d51d4 Merge changes from topic "new-ipsec-api" am: 644a034eed am: e0dd7159d5 am: 24c72089d7 am: a818c55e65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398433

Change-Id: I18748127d0c97d9473c96678d556b03ad6048808
2020-10-17 00:09:20 +00:00
Yan Yan
644a034eed Merge changes from topic "new-ipsec-api"
* changes:
  Expose new algorithms as public API
  Add new mandatory IPsec algorithms
2020-10-16 22:30:37 +00:00
Bernie Innocenti
26b8ea83f0 Merge "Stop setting the legacy net.dnsX system properties" am: 61da71aa03 am: ab60aa4add am: 5e29d0c679 am: d8422c8eb4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1229561

Change-Id: I78ef627fdf0312cf84de53aa8da5f0bca466a6f3
2020-10-16 15:23:18 +00:00
Aaron Huang
925d09b779 Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.

Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.

Bug: 158268939
Test: make target-java, make host-java
      atest FrameworksNetIntegrationTests
      atest FrameworksNetTests
      make, device can boot,
      atest CtsStrictJavaPackagesTestCases
      wifi and mobile data work.
Change-Id: I99401772ba9c1c34adca20040da3c7c72d86ddd9
Merged-In: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
2020-10-16 22:46:14 +08:00
Chiachang Wang
e62f378b9c Stop setting the legacy net.dnsX system properties
These have been locked down via SELinux for a while and thus
they should be safe to delete at this point.

Test: atest FrameworksNetTest
Bug: 33308258
Bug: 148724751
Change-Id: I3a1e9c6ad92c8d2367e0048e5d6cd7d06bbc6e80
2020-10-16 08:19:25 +00:00
Aaron Huang
42fe792772 Merge "Create service-connectivity.jar" 2020-10-16 07:03:33 +00:00
Chalard Jean
badc37d4fe Remove unused methods from LinkProperties.
LinkProperties.compare{Dnses,ValidatedPrivateDnses,AllRoutes,
AllInterfaceNames} actually have no users.

Test: LinkPropertiesTest
Change-Id: Ic54ab3c5520fbbc2be1309aeaf1e5a7857dbd194
2020-10-16 15:32:19 +09:00
Yan Yan
2274995a29 Add new mandatory IPsec algorithms
This CL adds new mandatory IPsec algorithms and allows
OEM to enable them on old devices using resource overlay

Bug: 161716062
Test: FrameworksNetTests:IpSecAlgorithmTest
Change-Id: Ib827b05ea27dbe61b14ad236e858f825293ed994
2020-10-15 17:35:17 -07:00
Aaron Huang
dfba5d17fe Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.

Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.

Bug: 158268939
Test: make target-java, make host-java
      atest FrameworksNetIntegrationTests
      atest FrameworksNetTests
      make, device can boot,
      atest CtsStrictJavaPackagesTestCases
      wifi and mobile data work.
Change-Id: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
2020-10-16 02:29:04 +08:00
Treehugger Robot
5e308f61e4 Merge "Add imports to networking test mapping" am: a9d1392d0b am: a2558cbfc2 am: 1bb4204e60 am: eaaa95983c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461982

Change-Id: Ib665e3d7e2ad6058c36c5d93fdc67131d2f670b5
2020-10-15 12:39:49 +00:00
Remi NGUYEN VAN
1932b12535 Add imports to networking test mapping
Ensure that appropriate networking tests are triggered when submitting
changes in the frameworks/base directories.

Change-Id: Ibf8b567fa7721299120b0a6c6836dd770d92a9fc
Test: treehugger runs TEST_MAPPING tests
2020-10-15 09:16:40 +00:00
Junyu Lai
4475546bb0 Merge "Support dynamically update IMSI" am: 2d74c2e267 am: e981a87c00 am: 36b8c1d919 am: a33114824f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1418348

Change-Id: I5e5fc106aaab1b55302c38717cad9dbf1281baec
2020-10-13 04:46:38 +00:00
Junyu Lai
2d74c2e267 Merge "Support dynamically update IMSI" 2020-10-13 02:41:47 +00:00
junyulai
c822fe5e07 Support dynamically update IMSI
Currently, NetworkStatsSubscriptionsMonitor will skip the
listener registration until the IMSI is available to deal
with SIM PIN locked case. However, this solution can only
handle the case that IMSI changes from/to null. And it also
relies on the assumption that IMSI never changes for a subId.

Thus, support dynamically update IMSI to handle IMSI changes
more robustly.

This patch also address leftover comments at ag/12400327.

Test: enable SIM PIN and manually test
Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdUnavailable
Test: atest NetworkStatsSubscriptionsMonitorTest#testSubscriberIdChanged
Test: ./out/host/linux-x86/bin/statsd_testdrive 10082
Bug: 160941101

Change-Id: I625a5b10ee4806f6fee99c2d9d6c5e7977ff785e
2020-10-12 15:31:02 +08:00
Lorenzo Colitti
052fe66496 Merge "Speculatively fix L2TP keepalive issues by reducing mtu" am: f67e00b803 am: d3bf9a15a0 am: 23a036cd42 am: e9e92b80ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399646

Change-Id: Iba6098badc018fa64b1c5fc20177b97a81a2e685
2020-10-12 01:48:18 +00:00
Lorenzo Colitti
f67e00b803 Merge "Speculatively fix L2TP keepalive issues by reducing mtu" 2020-10-12 00:40:44 +00:00
Treehugger Robot
8cec12f482 Merge "Don't let NAW.mNetworkInfo escape" am: 6e8c64b349 am: 497eab9a18 am: a6fa1d584b am: 04f8105750
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1455976

Change-Id: I239201986987a07c09321d7be7e0feae7eaf9f15
2020-10-09 12:04:45 +00:00
Chalard Jean
c8c06be939 Don't let NAW.mNetworkInfo escape
Thankfully this has no users.

This agent needs to be migrated to the modern API for
NetworkAgent, which does not have NetworkInfo at all
so this would be a hindrance

Test: FrameworksNetTests NetworkStackTests
Change-Id: I091a6ca8cdf18860f23832ae1008fa02cf0472e8
2020-10-09 17:06:30 +09:00
Chiachang Wang
9611a3ad54 Merge "Update to positive logic to better match the method naming" am: 1c7bc039ea am: 37fc16ad0a am: 656901d024 am: 40bf5f95e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450336

Change-Id: I111b7fa8eaecbec7e65357f7b9aa9b3f369d00c9
2020-10-07 10:19:15 +00:00
Chiachang Wang
8cdc2856b7 Update to positive logic to better match the method naming
The method checkInterfacePresent seems that should return if the
interface is present or not, but it actually return an opposite
result. It may confuse the caller. E.g. The override method in
VpnTest assume it always returns true in the test. It will fail
the vpn start flow due to interface gone.

Bug: 169215213
Test: atest FrameworksNetTess
Change-Id: I3e9a64f0900336b8205674b94db68f090b4e9ff9
2020-10-07 06:48:15 +00:00
Eran Messeri
ab20969835 Refactoring: Use explicit methods for checking DO/PO
Do not use USES_POLICY_PROFILE_OWNER / USES_POLICY_DEVICE_OWNER.
Instead, use explicit methods for checking if the caller is
the Device Owner or Profile Owner.

USES_POLICY_PROFILE_OWNER is confusing since internally in the
DevicePolicyManagerService, it implied a Device Owner is also a
Profile Owner, which is not always what the caller expected.

This is the first phase of the refactoring, removing external calles'
dependency on these constants. The next phase will remove them
internally completely in favour of an implementation that
accesses mOwners directly.

There are no functional changes in this CL.

Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I57c8465d190a3b4b130d57fd622cc93eaeb9c717
2020-10-06 10:34:23 +01:00
TreeHugger Robot
59c9b6e8ef Merge "Revert "Move module utils to the module package."" 2020-10-02 03:54:37 +00:00
Hridya Valsaraju
33b04d38e6 Revert "Move module utils to the module package."
Revert "Move util classes to their destination package"

Revert "Move PacketReader and FdEventReader"

Revert "Move static utils to a module package"

Revert "Move static utils to a module package"

Revert submission 12698912-move_packetreader

Reason for revert: Broke presubmit on git_master, b/169861635
Reverted Changes:
If5d1e4a58:Move module utils to the module package.
I44ffaad3d:Move PacketReader and FdEventReader
I93e9cfd96:Move util classes to their destination package
Ia84d64130:Move static utils to a module package
Iaac2810c7:Move static utils to a module package

Change-Id: Ibbe59075cd7bc4c38e0707ea6ae3b3703b40986f
2020-10-01 20:12:46 +00:00
Benedict Wong
b29fb3654a Speculatively fix L2TP keepalive issues by reducing mtu
This change reduces MTU/MRU values for racoon/pppd from 1400 to 1388 in
an attempt to fix keepalive issues experienced in the field.

Bug: 119076193
Test: Speculative change, original issues were not reproducible.
Change-Id: I7731503260fdc8bcbc6c5fcda6991ead6fb7c52e
2020-09-28 20:55:55 -07:00
Chalard Jean
1ebc5306ab Merge "Move module utils to the module package." 2020-09-28 13:22:23 +00:00
Chalard Jean
9db4f74fb8 Move module utils to the module package.
Test: builds
Change-Id: If5d1e4a58fb2d6d9544e6d01995dabe445cf1f25
(cherry picked from commit 046bf639eb7728504be35e30e3dd49af3d029728)
2020-09-26 14:12:10 +09:00
Benedict Wong
fe2e477071 Merge "Provide more feedback to Settings when sessions fail" am: d8957b5481 am: abed0e275d am: 38c5012bfa am: 707f9b2d1e am: a8f5cba0d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399645

Change-Id: I9a2a801100d3965d38e95c80ece5f4bc0b35cbc8
2020-09-25 19:51:16 +00:00
Benedict Wong
d8957b5481 Merge "Provide more feedback to Settings when sessions fail" 2020-09-25 17:25:02 +00:00
Benedict Wong
fdebd3d644 Provide more feedback to Settings when sessions fail
This change updates the VPN state when IKEv2 sessions fail, and when
configuration errors occur.

Bug: 162289824
Test: Manual testing with IKEv2/PSK
Change-Id: I2e8c6f421d2898f97b0ac422b2276edf9ef923f1
2020-09-24 23:32:09 -07:00
Junyu Lai
6f0864e3be Merge "Skip stop if keepalive is already in stopping state" am: 57b79f463d am: e1d31ea908 am: 4a3701853a am: 58caa343cb am: 01851b58ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424190

Change-Id: I46a3c91dd56d806fc06388ad448bd641a0db0ae4
2020-09-24 04:52:57 +00:00
junyulai
e30a5c2730 Skip stop if keepalive is already in stopping state
In current design, crash has been generated when stop function
has been re-entered to catch unexpected behavior. However,
it is possible to re-enter stop function if the network
disconnection occurs after stopping.

Thus, skip stop if keepalive is already in stopping state.

Test: atest ConnectivityServiceTest#testNattSocketKeepalives \
      --rerun-until-failure 60000
Bug: 167332570
Change-Id: Ic7068ad3dc990e957c37b8d87d48ebb6469b101f
2020-09-17 19:51:34 +08:00
Xin Li
4037c36d47 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Junyu Lai
37f7a3e160 Merge "Notify the keepalive is stopped after the slot has been released" am: 09a0f57f87 am: b5e1feccbe am: d1804f87dc am: c1d0f670f5 am: 0453d9b955
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1112851

Change-Id: I86b9c01f99eaa9497acbd4e3e481c7330cf05667
2020-08-28 12:30:17 +00:00
Junyu Lai
d1804f87dc Merge "Notify the keepalive is stopped after the slot has been released" am: 09a0f57f87 am: b5e1feccbe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1112851

Change-Id: Icdd61fb39ebd14963f4ec6e591b3a245e6b999b2
2020-08-28 11:09:43 +00:00
Junyu Lai
09a0f57f87 Merge "Notify the keepalive is stopped after the slot has been released" 2020-08-28 10:12:44 +00:00