Commit Graph

11504 Commits

Author SHA1 Message Date
Chalard Jean
bc1d304dcf Merge "Remove unused methods from LinkProperties." am: 561107dd24
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1448415

Change-Id: I7adcc9920cc2bdebe9a1dc22f32ce0955a4524dd
2020-10-19 09:50:44 +00:00
Chalard Jean
561107dd24 Merge "Remove unused methods from LinkProperties." 2020-10-19 09:37:26 +00:00
Yan Yan
05fa7073b9 Merge changes from topic "new-ipsec-api" am: 3a07def46d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1398433

Change-Id: I074e1cc2d9b8e38d242c4a1c9b2176d3b8338774
2020-10-16 22:52:03 +00:00
Yan Yan
3a07def46d 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
Aaron Huang
9601189364 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
Bernie Innocenti
6baa1bf147 Merge "Stop setting the legacy net.dnsX system properties" am: 61da71aa03
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1229561

Change-Id: Id30674df53eead41a626eef81a0d7e449dfd7c83
2020-10-16 14:03:43 +00:00
Chiachang Wang
4273f77922 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
Chalard Jean
4d6c93d315 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
94e7673031 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
Treehugger Robot
420e60a135 Merge "Add imports to networking test mapping" am: 3956c37ce2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1461982

Change-Id: I835d9c17377cee5adcc5f44cff3e1d4f0774aaa2
2020-10-15 11:07:41 +00:00
Treehugger Robot
3956c37ce2 Merge "Add imports to networking test mapping" 2020-10-15 10:21:25 +00:00
Remi NGUYEN VAN
aabe9cc987 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
Treehugger Robot
29b63c7ccb Merge "Fix a typo in a comment" am: e7be8034b6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1459885

Change-Id: I9174acc91209d83526901587bf4603d61aa30acc
2020-10-14 11:24:43 +00:00
Treehugger Robot
e7be8034b6 Merge "Fix a typo in a comment" 2020-10-14 10:54:25 +00:00
paulhu
2af502226a Replace PendingIntent @hide APIs
Connectivity service module is using some PendingIntent @hide
APIs but they are not able to call after CS becomes a mainline
module. Thus, replace them with similar System APIs.

Bug: 170593746
Test: atest FrameworksNetTests
      Manually test notifications can show normally.
Change-Id: I92ab7216f5fd46d449b6d8f80d3441f8966ac890
2020-10-14 15:23:25 +08:00
Chalard Jean
c9fc48652a Fix a typo in a comment
Test: is not necessary for fixing typos in comments
Change-Id: Idf48d2649e728cafda5c1ca32d21102094cf23f5
2020-10-14 04:56:20 +00:00
paulhu
6f94c0f756 Add a mutability flag to the PendingIntent
It's soon going to be required for apps targeting S+ to specify
explicitly either FLAG_MUTABLE or FLAG_IMMUTABLE when creating
a PendingIntent. Thus, add a mutability flag to the
PendingIntent that doesn't specify it before.

Bug: 170602021
Bug: 170766590
Test: atest FrameworksNetTests
Change-Id: I56581033c0a1b450b6626112cdae5e5d9aac873f
2020-10-14 11:44:39 +08:00
Chiachang Wang
d1fff43886 Merge "Use system api for shell command handling" am: e07b484c22
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456126

Change-Id: I322bbe2f711f8c50efe9d50056787c0e60051fbb
2020-10-13 09:29:47 +00:00
Chiachang Wang
e07b484c22 Merge "Use system api for shell command handling" 2020-10-13 08:41:40 +00:00
Chiachang Wang
77ae8a0bca Use system api for shell command handling
ConnectivityService should not use ShellCommand since it's @hide
which does not accessible in mainline modules. Replace it with
system api for mainline.

Bug: 170598012
Test: adb shell cmd connectivity airplane-mode enable
Test: adb shell cmd connectivity airplane-mode disable
Change-Id: I47e7a371c19eb18eac643fe9a2ab481bec5743c2
2020-10-13 08:41:24 +00:00
TreeHugger Robot
e9320762f1 Merge "Merge ab/6749736 in stage." into stage-aosp-master 2020-10-13 03:31:35 +00:00
Junyu Lai
db624043d5 Merge "Support dynamically update IMSI" am: 59f6e81b10
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1418348

Change-Id: Id06d5d37ad5f12e689643c916548e9a59089eb3b
2020-10-13 03:22:09 +00:00
Junyu Lai
59f6e81b10 Merge "Support dynamically update IMSI" 2020-10-13 02:41:47 +00:00
junyulai
430e11a9f0 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
37c995db19 Merge "Speculatively fix L2TP keepalive issues by reducing mtu" am: 7ade6140ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399646

Change-Id: Iac7fc24c531db663469df1b1161d9f85a4c6f3ee
2020-10-12 01:06:47 +00:00
Lorenzo Colitti
7ade6140ea Merge "Speculatively fix L2TP keepalive issues by reducing mtu" 2020-10-12 00:40:44 +00:00
Xin Li
896aec2ca3 Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a
Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
2020-10-10 20:38:57 -07:00
Treehugger Robot
f7db76b506 Merge "Don't let NAW.mNetworkInfo escape" am: 4fb14d85ce
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1455976

Change-Id: I01ef40f341c653a524ee4565c3d9bf2564e0f98f
2020-10-09 10:48:42 +00:00
Treehugger Robot
4fb14d85ce Merge "Don't let NAW.mNetworkInfo escape" 2020-10-09 10:33:47 +00:00
Chalard Jean
ae98b5f35f 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
Remi NGUYEN VAN
7abe3e15e8 Merge "Move IpUtils to frameworks/libs/net" am: 39b995b2e1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440234

Change-Id: Ibd41a02a9a185667a7fe332213ef692c4d8bf515
2020-10-09 00:30:36 +00:00
Remi NGUYEN VAN
39b995b2e1 Merge "Move IpUtils to frameworks/libs/net" 2020-10-09 00:13:40 +00:00
Paul Hu
9cb49e226b Merge "Remove unused ACTION_PACKAGE_ADDED intent." am: 19ef22905d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450335

Change-Id: I53a20a48053889357e62f29799e091d22a3ffc59
2020-10-08 02:19:12 +00:00
Paul Hu
19ef22905d Merge "Remove unused ACTION_PACKAGE_ADDED intent." 2020-10-08 02:05:17 +00:00
Chiachang Wang
b110236ee5 Merge "Update to positive logic to better match the method naming" am: 1c7bc039ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1450336

Change-Id: Ib01ae19fb846fdd75cf792e85dc1776a4a6876ee
2020-10-07 09:22:49 +00:00
Chiachang Wang
974fc87852 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
paulhu
00cd326271 Remove unused ACTION_PACKAGE_ADDED intent.
ConnectivityService doesn't handle ACTION_PACKAGE_ADDED intent
now. So remove the intent from filter to prevent wtf log
happened.

Bug: 169573829
Test: atest FrameworksNetTests
Change-Id: Ifb0ae0b2e811defdecb37d3489ab3208db397331
2020-10-06 14:48:29 +08:00
Remi NGUYEN VAN
7f3a7512b5 Move IpUtils to frameworks/libs/net
The utility classes are useful for mainline modules and their tests, for
example IpClientIntegrationTest.

Bug: 168868607
Test: m && atest NetworkStaticLibTests
Change-Id: If2b1613aa18a7990391e2d31cc2951ca93f1cf3c
2020-10-05 14:38:19 +09:00
Benedict Wong
7d5baee37f 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
TreeHugger Robot
02b5f8eb32 [automerger skipped] Merge "Provide more feedback to Settings when sessions fail" into rvc-qpr-dev am: 9fbb751935 -s ours
am skip reason: Change-Id I2e8c6f421d2898f97b0ac422b2276edf9ef923f1 with SHA-1 20f3d02a1a is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12701448

Change-Id: Iff4190dde59508f35ae1b5b7d0ac982bc6e137e2
2020-09-26 05:50:40 +00:00
Benedict Wong
6cdf2a4ab6 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
Merged-In: I2e8c6f421d2898f97b0ac422b2276edf9ef923f1
(cherry picked from commit 0be82d4f4cb215e05ca62df80f6a9e652d1d1aa9)
2020-09-25 19:38:39 +00:00
Benedict Wong
bce4b65659 Merge "Provide more feedback to Settings when sessions fail" am: 6194869dfb am: 00a8a719cf am: 2be0c9dfc0 am: 346c22fece
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399645

Change-Id: I3c39f3ad1394ffab3cb37c4c73a1e3914e957a47
2020-09-25 19:19:15 +00:00
Benedict Wong
346c22fece Merge "Provide more feedback to Settings when sessions fail" am: 6194869dfb am: 00a8a719cf am: 2be0c9dfc0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399645

Change-Id: Ibe4fcec14650e38f40bf916f46960585a5af548c
2020-09-25 19:09:27 +00:00
Benedict Wong
2be0c9dfc0 Merge "Provide more feedback to Settings when sessions fail" am: 6194869dfb am: 00a8a719cf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399645

Change-Id: Ifd27daeac7a9852fe1f00fbbdcf3c60faf385ce4
2020-09-25 18:51:19 +00:00
Benedict Wong
00a8a719cf Merge "Provide more feedback to Settings when sessions fail" am: 6194869dfb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1399645

Change-Id: Ide2b6fc5954b703df96e954062dcde58d8551dbf
2020-09-25 18:30:28 +00:00
Benedict Wong
6194869dfb Merge "Provide more feedback to Settings when sessions fail" 2020-09-25 17:25:02 +00:00
Benedict Wong
20f3d02a1a 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
11084f9d25 Merge "Skip stop if keepalive is already in stopping state" am: 719a65577d am: 077f2edd0d am: 709c386524 am: fd274ba713
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424190

Change-Id: I9c7dc3cd59394d0d7bab8efeec08fa066f468927
2020-09-24 04:34:49 +00:00
Junyu Lai
fd274ba713 Merge "Skip stop if keepalive is already in stopping state" am: 719a65577d am: 077f2edd0d am: 709c386524
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424190

Change-Id: I0d55c6f7e876a786cbe7f301d0caecbe6456af36
2020-09-24 04:19:43 +00:00
Junyu Lai
709c386524 Merge "Skip stop if keepalive is already in stopping state" am: 719a65577d am: 077f2edd0d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1424190

Change-Id: I31a6290db41be9f003646067e76c7ed901ade7ae
2020-09-24 04:03:12 +00:00