Commit Graph

10216 Commits

Author SHA1 Message Date
TreeHugger Robot
65efcc84a0 Merge "Set correct owner UID for VPN agentConnect()" into rvc-dev 2020-06-17 15:26:22 +00:00
Treehugger Robot
58897cc491 Treat RouteInfo with different interfaces as different routes
On Android different interfaces usually use different routing tables.
As a result, a change in interface should not be treated as route
update, but rather a remove and an add.

This change fixes a bug in VPN seamless handover where routes
failed to be updated when a new tunnel interface replaces the existing
one within the same network.

Bug: 158696878
Test: atest com.android.cts.net.HostsideVpnTests
Test: atest NetworkStackTests
Test: atest CtsNetTestCases
Test: atest FrameworksNetTests
Original-Change: https://android-review.googlesource.com/1331916
Merged-In: I57987233d42a0253eaee2e1ca5f28728c2354620
Change-Id: I57987233d42a0253eaee2e1ca5f28728c2354620
2020-06-17 13:34:11 +00:00
Treehugger Robot
7a49a3b538 Merge "Treat RouteInfo with different interfaces as different routes" am: d77e15c125 am: 157191f50f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331916

Change-Id: I2f4d88aa74588e8ed27c5d0abcb9a6919f26f27d
2020-06-17 13:21:06 +00:00
Treehugger Robot
157191f50f Merge "Treat RouteInfo with different interfaces as different routes" am: d77e15c125
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331916

Change-Id: Ibe919ea7c2096094fdb48fc91881d9f19678ac50
2020-06-17 13:07:42 +00:00
Treehugger Robot
d77e15c125 Merge "Treat RouteInfo with different interfaces as different routes" 2020-06-17 12:51:08 +00:00
Rubin Xu
bc4c5caa4f Treat RouteInfo with different interfaces as different routes
On Android different interfaces usually use different routing tables.
As a result, a change in interface should not be treated as route
update, but rather a remove and an add.

This change fixes a bug in VPN seamless handover where routes
failed to be updated when a new tunnel interface replaces the existing
one within the same network.

Bug: 158696878
Test: atest com.android.cts.net.HostsideVpnTests
Test: atest NetworkStackTests
Test: atest CtsNetTestCases
Test: atest FrameworksNetTests
Change-Id: I57987233d42a0253eaee2e1ca5f28728c2354620
2020-06-17 12:01:41 +01:00
Aaron Huang
43b76f917e [automerger skipped] Merge "Add unit test for NetworkStatsSubscriptionsMonitor" am: 0543f2328d am: 032d132e50 -s ours
am skip reason: Change-Id I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91 with SHA-1 a8eab54eee is in history

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

Change-Id: I11b25c0832d6959e77bbabbfce53cdedce922279
2020-06-17 09:21:52 +00:00
Aaron Huang
032d132e50 Merge "Add unit test for NetworkStatsSubscriptionsMonitor" am: 0543f2328d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1298476

Change-Id: I1b191cd4706a7409794d382bda95ef6933b019a1
2020-06-17 09:09:13 +00:00
Aaron Huang
0543f2328d Merge "Add unit test for NetworkStatsSubscriptionsMonitor" 2020-06-17 08:52:20 +00:00
Aaron Huang
7558938ce9 Dynamically enable/disable watch for RAT type changes
Add ContentObserver to observe the status of
NETSTATS_COMBINE_SUBTYPE_ENABLED to determine that
NetworkStatsSubscriptionsMonitor start or stop
monitoring data usage per RAT type changes.

Bug: 154080515
Test: atest NetworkStatsServiceTest#testDynamicWatchForNetworkRatTypeChanges
Change-Id: I272d589633c9186b45753228b05aa0b40b7c7b89
2020-06-17 17:09:10 +09:00
android-build-team Robot
0b69cc4548 Snap for 6596975 from 892d269b65e8e840231af6f84e7c8934a17eee46 to rvc-release
Change-Id: Id517a4b1fe2186e0275f6ecf4d893d720e258ea7
2020-06-17 01:12:51 +00:00
Pavel Grafov
7a952773d1 Connectivity: start PAC global proxy after reboot.
Previously, we read the global proxy settings from Settings.Global
database after reboot. This works for manual proxies, but not for
proxies based on PAC rules, as PacManager is never invoked when
ConnectivityService starts up. As a consequence, services required for
PAC-based proxies (PacService and ProxyService) are never started.

In this CL, we make sure PacManager is called during boot, so that PAC
rules will take effect.

Bug: 35943997
Test: set a PAC proxy and observe it still works after reboot
Change-Id: I69edb5fcd3e84663d338ff4b93c40fd5ee2c8c51
2020-06-17 00:18:34 +01:00
android-build-team Robot
65db387f1d Make change and version bump to r_aml_300801700 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ie3a0a9efb7b092ee585abb28e50502077e44ee3e
2020-06-16 07:16:41 +00:00
TreeHugger Robot
c3a780339a [automerger skipped] Merge "Test extra info sent to NetworkMonitor" into rvc-dev am: 8202b399da -s ours
am skip reason: Change-Id I4f827664c528bea30cc957a0a617dd37693f4460 with SHA-1 301bc7b40a is in history

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

Change-Id: I63ad698bb29d3770e879f27b155a9fc656a80836
2020-06-16 03:28:39 +00:00
Chiachang Wang
1182d5a7fc Test extra info sent to NetworkMonitor
Test extra info sent to NetworkMonitor correctly if network
agent is created through new NetworkAgent constructor without
legacy network info taken as parameter.

Bug: 156173829
Test: atest FrameworkNetTests
Merged-In: I4f827664c528bea30cc957a0a617dd37693f4460
Change-Id: I4f827664c528bea30cc957a0a617dd37693f4460
2020-06-16 01:57:46 +00:00
Benedict Wong
b001522433 Set correct owner UID for VPN agentConnect()
This commit changes agentConnect to set the owner UID as the mOwnerUid
field instead of the Binder.getCallingUid().

Binder.getCallingUid() can return incorrect results for platform VPNs,
as agentConnect() is called under a clean calling UID.

Additionally, this relaxes the ownerUid sanitization check to allow a
VPN network's owner to see it's own ownership information.

Vpn.mOwnerUid is guaranteed to be correct, as all VPNs MUST have called
prepareInternal() at some previous point, which sets mOwnerUid as the
package's UID (or SYSTEM_UID if this is legacy VPN).

Bug: 150135470
Test: CTS tests showing ownership information
Merged-In: Ic979dad73983d722365849fbfb0becfd432b894c
Change-Id: Ic979dad73983d722365849fbfb0becfd432b894c
(cherry picked from commit e29bf99a7fc1067c546d7fa6cbcb9001fb110d16)
2020-06-16 01:42:48 +00:00
Chiachang Wang
41b5925f01 Merge "Test extra info sent to NetworkMonitor" am: 9792742ee0 am: 26cd395a9e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331060

Change-Id: Ice048df853589411ee1f1c935b929994af1c525b
2020-06-16 01:02:52 +00:00
Chiachang Wang
26cd395a9e Merge "Test extra info sent to NetworkMonitor" am: 9792742ee0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331060

Change-Id: If48de0d3fe326d72170b13ec6a9477dfc8dc48ff
2020-06-16 00:52:01 +00:00
Chiachang Wang
9792742ee0 Merge "Test extra info sent to NetworkMonitor" 2020-06-16 00:38:58 +00:00
Benedict Wong
d01a9458ed Merge "Set correct owner UID for VPN agentConnect()" am: 2f7bb517fd am: bab1782868
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1326493

Change-Id: I5ff673d97fe4558da77575b2cc8c43b87e3673f6
2020-06-15 17:33:33 +00:00
Benedict Wong
bab1782868 Merge "Set correct owner UID for VPN agentConnect()" am: 2f7bb517fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1326493

Change-Id: I04609b41c9e878e1e3ca8f128d86290012d4ede7
2020-06-15 17:18:15 +00:00
Benedict Wong
2f7bb517fd Merge "Set correct owner UID for VPN agentConnect()" 2020-06-15 17:09:46 +00:00
Aaron Huang
b0e7dca43e Add unit test for NetworkStatsSubscriptionsMonitor
Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
(copy from ag/11788484 but getActiveAndHiddenSubscriptionIdList() since it's renamed
in internal)
Change-Id: Ia162f36efe96d90b2f6f70190d9fa855bba34484
Merged-In: I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91
2020-06-15 07:05:19 +00:00
android-build-team Robot
89abfd4467 Snap for 6586393 from a840c1f3ea1e9c3cde2ee985212f80864ff1e8d7 to rvc-release
Change-Id: I2ee507de15484671c09c996a38d5a0a47564658e
2020-06-13 01:09:12 +00:00
Chiachang Wang
301bc7b40a Test extra info sent to NetworkMonitor
Test extra info sent to NetworkMonitor correctly if network
agent is created through new NetworkAgent constructor without
legacy network info taken as parameter.

Bug: 156173829
Test: atest FrameworkNetTests
Change-Id: I4f827664c528bea30cc957a0a617dd37693f4460
2020-06-12 18:13:00 +08:00
Remi NGUYEN VAN
c3884937e1 Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.

Also refine comments in DhcpResults following feedback in previous
change.

Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Change-Id: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f
2020-06-12 17:04:06 +09:00
android-build-team Robot
a0e68431ce Make change and version bump to r_aml_300801400 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I9c9f527416459b38c32ccf5b65f4054cea5b586f
2020-06-12 07:21:50 +00:00
Chalard Jean
51732a8d91 [automerger skipped] Merge "Document the limitation to a hundred callbacks." into rvc-dev am: df9ce18085 -s ours
am skip reason: Change-Id I5911d01984695550b6c9afe7a8eb535bf5e320a1 with SHA-1 a5ff113bff is in history

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

Change-Id: I819ea5e14c6eaf108ac7252768014aa5d33891b3
2020-06-12 04:58:29 +00:00
Chalard Jean
df9ce18085 Merge "Document the limitation to a hundred callbacks." into rvc-dev 2020-06-12 04:54:02 +00:00
Aaron Huang
65556318aa Merge "Add unit test for NetworkStatsSubscriptionsMonitor" into rvc-dev am: 70afc75769
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11788484

Change-Id: Iac633487b359d751206e06b2352a2a9cb475811e
2020-06-12 02:11:29 +00:00
Aaron Huang
70afc75769 Merge "Add unit test for NetworkStatsSubscriptionsMonitor" into rvc-dev 2020-06-12 01:58:59 +00:00
android-build-team Robot
b5926e69c5 Snap for 6582636 from 5c71678253626384497367f67c2a17f045485921 to rvc-release
Change-Id: I58bbd14c18bdd555bf30da5fbe16d2d9df033454
2020-06-12 01:09:56 +00:00
Chalard Jean
cece40543e Document the limitation to a hundred callbacks.
Some developers have been surprised by this limitation and had trouble
figuring out what the issue was. Add documentation to address this.

This also includes a drive-by removal of a duplicate check.

Bug: 149867479
Test: doc-only change
Original-Change: https://android-review.googlesource.com/1313813
Merged-In: I5911d01984695550b6c9afe7a8eb535bf5e320a1
Change-Id: I5911d01984695550b6c9afe7a8eb535bf5e320a1
2020-06-12 00:35:39 +00:00
Mark Chien
977a7aa9db [automerger skipped] Merge "Cleanup config_mobile_hotspot_provision_app usage" into rvc-dev am: ef24e2121d -s ours
am skip reason: Change-Id I030871c2bc46bc09c4e52970b4995f98d31bb90e with SHA-1 e9aad6fa2b is in history

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

Change-Id: I03e5cf0b7950726825c781dda3b5efdc613e2dcf
2020-06-11 15:42:35 +00:00
markchien
f949ec251f Cleanup config_mobile_hotspot_provision_app usage
config_mobile_hotspot_provision_app would be move out of framework and
only private for tethering only.
enforceTetherChangePermission is no longer needed because its only
caller PanService already gate by other privileged permission
(BLUETOOTH_PRIVILEGED).

Bug: 146918263
Test: m

Change-Id: I030871c2bc46bc09c4e52970b4995f98d31bb90e
Merged-In: I030871c2bc46bc09c4e52970b4995f98d31bb90e
2020-06-11 13:32:12 +00:00
Chalard Jean
1fa0eab021 Merge "Document the limitation to a hundred callbacks." am: f60ed54d33 am: 363fb9fef9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1313813

Change-Id: I84b1e39503feddc914b61d4e8bd35953e92ac270
2020-06-11 13:03:37 +00:00
Chalard Jean
363fb9fef9 Merge "Document the limitation to a hundred callbacks." am: f60ed54d33
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1313813

Change-Id: Id2f70609c46ec6252b7e734c1e5838016314400f
2020-06-11 12:46:15 +00:00
Chalard Jean
f60ed54d33 Merge "Document the limitation to a hundred callbacks." 2020-06-11 12:31:09 +00:00
Chalard Jean
a5ff113bff Document the limitation to a hundred callbacks.
Some developers have been surprised by this limitation and had trouble
figuring out what the issue was. Add documentation to address this.

This also includes a drive-by removal of a duplicate check.

Bug: 149867479
Test: doc-only change
Change-Id: I5911d01984695550b6c9afe7a8eb535bf5e320a1
2020-06-11 12:30:21 +00:00
Mark Chien
b4e92e60f1 Merge "Cleanup config_mobile_hotspot_provision_app usage" am: 443092b9a8 am: 921d8c0fb5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1329014

Change-Id: Ib3bb0129419ffd55df6c2c53cce3ad7e9155e854
2020-06-11 08:03:56 +00:00
Mark Chien
921d8c0fb5 Merge "Cleanup config_mobile_hotspot_provision_app usage" am: 443092b9a8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1329014

Change-Id: I3d265ab9806605e18384fa6321452f7c96f3f48b
2020-06-11 07:40:27 +00:00
android-build-team Robot
cf4404ac33 Make change and version bump to r_aml_300801300 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: Ia261164ce399e211f9136fa36b6d28f9aea918d1
2020-06-11 07:16:12 +00:00
android-build-team Robot
bb3c76bbc5 Snap for 6578268 from 11b584739778d1b86235c5ba844652adc438c842 to rvc-release
Change-Id: Ie92c8ccd61e1a1d06c1f5ace09067fe398bcaaa1
2020-06-11 01:08:47 +00:00
markchien
e9aad6fa2b Cleanup config_mobile_hotspot_provision_app usage
config_mobile_hotspot_provision_app would be move out of framework and
only private for tethering only.
enforceTetherChangePermission is no longer needed because its only
caller PanService already gate by other privileged permission
(BLUETOOTH_PRIVILEGED).

Bug: 146918263
Test: m

Change-Id: I030871c2bc46bc09c4e52970b4995f98d31bb90e
2020-06-10 15:52:24 +00:00
Lorenzo Colitti
e7a3528bbf [automerger skipped] Merge "Update extra info before registering" into rvc-dev am: 4720606b02 -s ours
am skip reason: Change-Id Ieaad8cbf1a28af3b97c7f98f74358e417fcad661 with SHA-1 9774ceb3ea is in history

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

Change-Id: Iee50671a7363ed0e820494cbbb06b71063d01f6a
2020-06-10 15:33:04 +00:00
Lorenzo Colitti
4720606b02 Merge "Update extra info before registering" into rvc-dev 2020-06-10 15:17:38 +00:00
android-build-team Robot
b50cfcec3d Make change and version bump to r_aml_300801100 for mainline module file: packages/Tethering/apex/manifest.json
Change-Id: I06126d269aa431f5c9f6cd38f403ddfd3f12d489
2020-06-09 07:17:51 +00:00
android-build-team Robot
adf81959c7 Snap for 6570104 from 31b2931b9f8009629f4010434f8eeada4757df71 to rvc-release
Change-Id: Ia1317fb0597642ef5e323ad9826dee47ba85958c
2020-06-09 01:09:58 +00:00
Benedict Wong
bf004e9830 Set correct owner UID for VPN agentConnect()
This commit changes agentConnect to set the owner UID as the mOwnerUid
field instead of the Binder.getCallingUid().

Binder.getCallingUid() can return incorrect results for platform VPNs,
as agentConnect() is called under a clean calling UID.

Additionally, this relaxes the ownerUid sanitization check to allow a
VPN network's owner to see it's own ownership information.

Vpn.mOwnerUid is guaranteed to be correct, as all VPNs MUST have called
prepareInternal() at some previous point, which sets mOwnerUid as the
package's UID (or SYSTEM_UID if this is legacy VPN).

Bug: 150135470
Test: CTS tests showing ownership information
Change-Id: Ic979dad73983d722365849fbfb0becfd432b894c
2020-06-08 14:33:01 -07:00
Aaron Huang
a8eab54eee Add unit test for NetworkStatsSubscriptionsMonitor
Bug: 154080205
Test: atest FrameworksNetTests:com.android.server.net.NetworkStatsSubscriptionsMonitorTest
Change-Id: I4ef3f1ab2e5ea1322133edd80db3ccd0022e9c91
2020-06-09 00:40:36 +08:00