Commit Graph

8634 Commits

Author SHA1 Message Date
Automerger Merge Worker
e457375dba Merge "Use framework-tethering-stub instead of framework-tethering" am: 7fa9971ec6 am: e67473517a
Change-Id: I42e51c703c47bdb5e589747047b5a4ef77a9ed82
2020-02-19 10:10:15 +00:00
Automerger Merge Worker
e67473517a Merge "Use framework-tethering-stub instead of framework-tethering" am: 7fa9971ec6
Change-Id: I2caaa5f804a510bcc18822b784c129e9b058ea03
2020-02-19 09:54:51 +00:00
Mark Chien
7fa9971ec6 Merge "Use framework-tethering-stub instead of framework-tethering" 2020-02-19 09:46:24 +00:00
Automerger Merge Worker
3d6f91ed37 Merge changes from topic "settings-vpn" am: 70f90282ef am: 1758c298d0
Change-Id: I2e4fdab485b9a94e8b2f121b21269f374b21dcb9
2020-02-19 08:07:41 +00:00
Automerger Merge Worker
45493c1a50 Add always-on VPN support for platform VPNs am: 16e0e33c71 am: 5c1e7a12c5
Change-Id: I4b1d796a7af3a9e421a330fd8ff713556c55dc67
2020-02-19 08:07:38 +00:00
Automerger Merge Worker
1758c298d0 Merge changes from topic "settings-vpn" am: 70f90282ef
Change-Id: If7e8310306889b38527bfab65316a50807814372
2020-02-19 07:51:20 +00:00
Automerger Merge Worker
5c1e7a12c5 Add always-on VPN support for platform VPNs am: 16e0e33c71
Change-Id: I9f600a9ea2002bf9a1ee88137e3a29b2c90b22ac
2020-02-19 07:51:14 +00:00
markchien
2e6ba526c9 Use framework-tethering-stub instead of framework-tethering
The non-updatable part of the platform now is built with
framework-tethering-stub, which is a stub library of
framework-tethering.

Bug: 147200698
Test: m
Change-Id: I97ef83f7f9b4c1376f373713036f5256318f1050
Merged-In: I97ef83f7f9b4c1376f373713036f5256318f1050
2020-02-19 15:10:44 +08:00
Benedict Wong
94d31add64 Add support for starting IKEv2/IPsec VPNs from settings
This commit allows the startLegacyVpn() call to start Platform VPN
profiles, allowing Settings to use the IKEv2/IPsec VPN options

When using an aliased private key, the
Ikev2VpnProfile.KEYSTORE_ALIAS_PREFIX must be prepended to the front of
the alias. This will in turn result in the fromVpnProfile() function to
pull the key from the KeyStore, as opposed to the inline-key that the
VpnManager API uses.

Bug: 148991741
Test: FrameworksNetTests passing, new tests added in subsequent CL
Test: Manually tested
Change-Id: Icbca695c353b2e12e99305676404dbf1a4495949
2020-02-19 02:44:34 +00:00
Benedict Wong
16e0e33c71 Add always-on VPN support for platform VPNs
This commit allows Platform VPNs to be started as part of always-on
mode.

Test: FrameworksNetTests passing, new tests added in subsequent CL
Test: Manually tested.
Change-Id: I5eda88e5b406a0e425eb7424665cf702e0979324
Merged-In: I5eda88e5b406a0e425eb7424665cf702e0979324
2020-02-18 22:13:31 +00:00
Benedict Wong
fb68c52267 Add always-on VPN support for platform VPNs
This commit allows Platform VPNs to be started as part of always-on
mode.

Test: FrameworksNetTests passing, new tests added in subsequent CL
Test: Manually tested.
Change-Id: I5eda88e5b406a0e425eb7424665cf702e0979324
2020-02-18 18:58:54 +00:00
Chalard Jean
333ca0ceec Merge changes I32c12702,I688593cc
* changes:
  [NS D04] Implement a simple speed comparison between scores.
  [NS D03] Migrate the bad wifi avoidance policy
2020-02-18 10:51:26 +00:00
Chalard Jean
1355c8b255 [NS D04] Implement a simple speed comparison between scores.
This is not used yet to avoid making the change too big to review,
but D05 will use this. Refer to D05 for how this is going to be
used.

Test: ConnectivityServiceTest
Change-Id: I32c12702c8bce959682b02f157946d3f37b12a0c
2020-02-18 16:15:22 +09:00
Chalard Jean
66f497c907 [NS D03] Migrate the bad wifi avoidance policy
Test: ConnectivityServiceTest
Bug: 113554781

Change-Id: I688593cc0379a0d2042e30fbe83e549dcb02723e
2020-02-18 16:06:10 +09:00
Benedict Wong
ea18b70ca6 Merge changes Ide9daebc,Id47ada57 am: d07db8a8da am: 3dbd79190c am: 6ed815786c
Change-Id: Iaacfbe8b221d79e3d06d0d7ea81528db13e4611a
2020-02-18 06:35:06 +00:00
Chalard Jean
d2f82a2cc3 Merge "[NS D02] Mix in the ignore on wifi policy." 2020-02-18 05:46:33 +00:00
Benedict Wong
6ed815786c Merge changes Ide9daebc,Id47ada57 am: d07db8a8da am: 3dbd79190c
Change-Id: I712e6e42cc754db2513321b3498018b21b94161e
2020-02-17 22:23:15 +00:00
Benedict Wong
3dbd79190c Merge changes Ide9daebc,Id47ada57 am: d07db8a8da
Change-Id: Ied52fed05566a0d75e82007170210205db7832a8
2020-02-17 22:01:24 +00:00
Benedict Wong
d07db8a8da Merge changes Ide9daebc,Id47ada57
* changes:
  Ensure all VPN runners clean up state when exiting
  Enforce restricted user, getConnectionOwnerUid checks
2020-02-17 21:30:35 +00:00
Lorenzo Colitti
ea93a0ff8a Merge changes from topics "capport_dhcpresults", "nm_cb_capport" am: e777d054f4 am: 816695b23c am: b9d201b003
Change-Id: Ie27e5dfd51b38194fa104cbd73f9bbe7c4395e0f
2020-02-17 14:20:04 +00:00
Chiachang Wang
4467aed179 Merge "Update state in NetworkInfo when network resumes" am: 9e3dd9a78f am: 3a59735669 am: b96514076d
Change-Id: I98e64e6197c5e79e6425f39053981f7bf389a895
2020-02-17 14:18:56 +00:00
Isabelle Taylor
918be71821 [automerger skipped] Merge "Revert "Remove framework code that has moved to frameworks/libs/net"" am: 50e2cbde28 am: a4474bd4d0 am: 6b81d3101c -s ours
am skip reason: skipped by user taylori

Change-Id: If1e7e8719516855f6ad77afdb472ed96c2d0703e
2020-02-17 11:37:15 +00:00
Aaron Huang
cbc0897c96 [automerger skipped] Merge "Remove framework code that has moved to frameworks/libs/net" am: 0122cf102f am: 2deb148476 am: f331b80dec -s ours
am skip reason: skipped by user huangaaron

Change-Id: I7f5c1c3a41a779512658008fafe108b1e99182ec
2020-02-17 11:31:07 +00:00
Chalard Jean
7a56387e2c [NS D02] Mix in the ignore on wifi policy.
Ultimately ConnectivityService and its satellites should mix in
some measurements to NetworkScore, but in the immediate future
they'll just use this to mix in at the new format the policy it
used to managed in an ad-hoc way.

As a first mix-in, this adds mixing in the IGNORE_ON_WIFI policy,
which so far used to be handled in Connectivity as the avoidBadWifi
bit. Ultimately this should move to Telephony.

Bug: 113554781
Test: ConnectivityServiceTest
Change-Id: I4869d5eb9ea74679e57c087005ed3d9b8119fed2
2020-02-17 14:58:31 +09:00
Chalard Jean
237563d377 Merge "[NS D01] Remove candidates that don't satisfy the request." 2020-02-17 02:49:34 +00:00
Lorenzo Colitti
b9d201b003 Merge changes from topics "capport_dhcpresults", "nm_cb_capport" am: e777d054f4 am: 816695b23c
Change-Id: Ife1b2c42dede9258e1f74d52583a63eb49a2e1a0
2020-02-15 17:51:12 +00:00
Lorenzo Colitti
816695b23c Merge changes from topics "capport_dhcpresults", "nm_cb_capport" am: e777d054f4
Change-Id: I22bbbb598aaca6ba6c73ab37d34e855ec0def48f
2020-02-15 17:36:37 +00:00
Lorenzo Colitti
e777d054f4 Merge changes from topics "capport_dhcpresults", "nm_cb_capport"
* changes:
  Add CaptivePortalApiUrl to DhcpResults
  Send LinkProperties update on new capport data
2020-02-15 17:22:18 +00:00
Chiachang Wang
b96514076d Merge "Update state in NetworkInfo when network resumes" am: 9e3dd9a78f am: 3a59735669
Change-Id: I12a729034e65d94f133cd3f3122064071cc6867e
2020-02-15 03:41:46 +00:00
Chiachang Wang
3a59735669 Merge "Update state in NetworkInfo when network resumes" am: 9e3dd9a78f
Change-Id: I26e4b318f7acacde38ee5cf0977fd63fc5567d79
2020-02-15 03:31:36 +00:00
Chiachang Wang
9e3dd9a78f Merge "Update state in NetworkInfo when network resumes" 2020-02-15 03:16:31 +00:00
Roshan Pius
eae2b1f35d [automerger skipped] Merge "RELAND: NetworkRequest: Embed requestor uid & packageName" am: 02d8578fc3 -s ours am: 3d517a35aa am: d20fd46f6f
Change-Id: I499c41c4a635ed521094d45e817859298e6ee2c7
2020-02-14 20:19:30 +00:00
Benedict Wong
691b793de5 [automerger skipped] Merge "Implement Ikev2VpnRunner" am: 02e9b56db8 am: 2af84b64bb am: 6f9f57f106 -s ours
am skip reason: skipped by user benedictwong

Change-Id: Ie1f6f8dbd10161342a7f14935def73820a68b057
2020-02-14 20:11:15 +00:00
Remi NGUYEN VAN
36f258eb33 Update NetworkMonitor integration test constructor
Add the service manager argument that is added for the notification
manager.

Test: atest FrameworksNetIntegrationTests
Bug: 139269711
Change-Id: Ie657687000a068b3892d04440b20b3408e875a00
2020-02-15 05:00:35 +09:00
Remi NGUYEN VAN
45e11181b4 Send LinkProperties update on new capport data
When new CaptivePortalData is received from NetworkMonitor, send a
LinkProperties updated callback.
The updated LinkProperties only contain CaptivePortalData if the
receiver has NETWORK_SETTINGS or MAINLINE_NETWORK_STACK permissions, as
defined in the current callback code.

Test: atest FrameworksNetTests
Bug: 139269711

Change-Id: I68595a519171b31792259849efff5f58c43cacd4
2020-02-15 05:00:17 +09:00
Chalard Jean
a19115d482 [NS D01] Remove candidates that don't satisfy the request.
This is exactly equivalent to the previous version (though a bit
more expensive) but is useful for followup changes. See [NS D03]
to see a sample of how this will be used.

Bug: 113554781
Test: FrameworksNetTests
Change-Id: I39f3c248bd2f23f7b22bd89d2e1e031653fe9ddb
2020-02-14 23:40:49 +09:00
Isabelle Taylor
6b81d3101c Merge "Revert "Remove framework code that has moved to frameworks/libs/net"" am: 50e2cbde28 am: a4474bd4d0
Change-Id: I82f49f1256bd5f81049d8b6f224ef507e63a48fb
2020-02-14 14:00:39 +00:00
Isabelle Taylor
a4474bd4d0 Merge "Revert "Remove framework code that has moved to frameworks/libs/net"" am: 50e2cbde28
Change-Id: I5e0b4e50352428ca5886a808b5667daffb4f2e4c
2020-02-14 13:51:45 +00:00
Isabelle Taylor
50e2cbde28 Merge "Revert "Remove framework code that has moved to frameworks/libs/net"" 2020-02-14 13:42:37 +00:00
Isabelle Taylor
175627fafb Revert "Remove framework code that has moved to frameworks/libs/net"
Revert "Use createRandomUnicastAddress from MacAddressUtils"

Revert "Add net-utils-framework-net to telephony-common"

Revert submission 1191997-net-utils-framework-net

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_qt-qpr1-dev-plus-aosp&target=aosp_taimen-userdebug&lkgb=6208131&lkbb=6208273&fkbb=6208273, bug b/149551544
Reverted Changes:
Ib1c807d64:Use createRandomUnicastAddress from MacAddressUtil...
I9e0f297e0:Add net-utils-framework-net to telephony-common
Ieb8927f9a:Remove framework code that has moved to frameworks...

Change-Id: I2824f781babd9f7e0bb9df524dadf6b8397dcaa1
2020-02-14 13:09:16 +00:00
Aaron Huang
f331b80dec Merge "Remove framework code that has moved to frameworks/libs/net" am: 0122cf102f am: 2deb148476
Change-Id: Ic03b259e256f935c2c625f294bea497b82b6317e
2020-02-14 10:20:07 +00:00
Aaron Huang
2deb148476 Merge "Remove framework code that has moved to frameworks/libs/net" am: 0122cf102f
Change-Id: I20b8398f1fe410819f18a0afcd8646c75c594fb8
2020-02-14 09:53:36 +00:00
Aaron Huang
0122cf102f Merge "Remove framework code that has moved to frameworks/libs/net" 2020-02-14 09:42:49 +00:00
Chiachang Wang
aa88bca82b Update state in NetworkInfo when network resumes
State override is only handled when state is changed from
CONNECTED to SUSPENDED but not reverse path. Handle both ways
for SUSPENDED state.

Bug: 148678431
Test: FrameworkNetTests
Change-Id: I9333f865d61bbf008fdb8ca162ad17dfdffd1d67
2020-02-14 16:41:33 +08:00
Benedict Wong
0bd4bba07a Enforce restricted user, getConnectionOwnerUid checks
This CL adds checks to ensure restricted users cannot change or
start/stop platform VPNs. In addition, this also adds checks to the
ConnectivityManager#getConnectionOwnerUid() to ensure that only
VpnService based VPNs can identify connections

Bug: 148040659
Test: FrameworksNetTests run
Change-Id: Id47ada5766036bfc84f3ba47f66f2d2683af916d
2020-02-14 00:09:47 -08:00
Roshan Pius
d20fd46f6f [automerger skipped] Merge "RELAND: NetworkRequest: Embed requestor uid & packageName" am: 02d8578fc3 -s ours am: 3d517a35aa
Change-Id: I810f30663bfe7be230b99da7d546a552c3ef078b
2020-02-14 02:25:02 +00:00
Roshan Pius
3d517a35aa [automerger skipped] Merge "RELAND: NetworkRequest: Embed requestor uid & packageName" am: 02d8578fc3 -s ours
am skip reason: Change-Id I207c446108afdac7ee2c25e6bbcbc37c4e3f6529 with SHA-1 d499517306 is in history

Change-Id: Ib90134e63ac00f6b377d27d1d8f2a125a247d724
2020-02-14 02:09:17 +00:00
Roshan Pius
02d8578fc3 Merge "RELAND: NetworkRequest: Embed requestor uid & packageName" 2020-02-14 01:57:49 +00:00
Benedict Wong
6f9f57f106 Merge "Implement Ikev2VpnRunner" am: 02e9b56db8 am: 2af84b64bb
Change-Id: I0048c33ac9b5b60d2f64a90d7c5d9e5e829cf24d
2020-02-13 21:46:13 +00:00
Benedict Wong
2af84b64bb Merge "Implement Ikev2VpnRunner" am: 02e9b56db8
Change-Id: I9b966b52f78fa54dca9d8c3032ec26ed853ad572
2020-02-13 21:31:28 +00:00