Lorenzo Colitti
ca72aa0a4f
Merge "Move DnsPacket to libs net" into rvc-dev am: 81f0fe48d2 am: 1ff1653dbb
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862407
Change-Id: I130496147364f798817d7d12e814749e86f0ab0c
2020-06-18 10:47:59 +00:00
Lorenzo Colitti
1ff1653dbb
Merge "Move DnsPacket to libs net" into rvc-dev am: 81f0fe48d2
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862407
Change-Id: Ia19cb44ad56e4358c63564261d481459d1386542
2020-06-18 10:34:11 +00:00
Lorenzo Colitti
81f0fe48d2
Merge "Move DnsPacket to libs net" into rvc-dev
2020-06-18 10:14:47 +00:00
Luke Huang
51221efa45
Move DnsPacket to libs net
...
This class might be used by some mainline modules.
Bug: 151052811
Test: atest DnsPacketTest
Test: atest DnsResolverTest
Change-Id: I8841d91456952ded5efbf8ea221289aecc7746ad
2020-06-18 16:17:04 +08:00
Aaron Huang
a9a2ee5bfc
Merge "Dynamically enable/disable watch for RAT type changes" am: 3fdad73a32 am: cc1d6b13d6 am: c98228cf54
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315574
Change-Id: I5e607bb44b2e97c01da9f9dcc0e89687bd08130f
2020-06-18 04:23:10 +00:00
Aaron Huang
c98228cf54
Merge "Dynamically enable/disable watch for RAT type changes" am: 3fdad73a32 am: cc1d6b13d6
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315574
Change-Id: I5a96774ad2104a6b03c9abab2b105b97195edea8
2020-06-18 04:22:21 +00:00
Aaron Huang
cc1d6b13d6
Merge "Dynamically enable/disable watch for RAT type changes" am: 3fdad73a32
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1315574
Change-Id: Id5c4ad325779322bbf4881816235904a6d454583
2020-06-18 04:09:37 +00:00
Aaron Huang
3fdad73a32
Merge "Dynamically enable/disable watch for RAT type changes"
2020-06-18 03:51:51 +00:00
Luke Huang
7d09ef6560
Merge "Disable sockets and DNS if process lacks INTERNET permission." into rvc-dev am: bbcd3b326b am: f12eff79db
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11881939
Change-Id: Ieeaab8035f6055b93a03abe7451f3ba496bd2285
2020-06-18 03:49:34 +00:00
Luke Huang
f12eff79db
Merge "Disable sockets and DNS if process lacks INTERNET permission." into rvc-dev am: bbcd3b326b
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11881939
Change-Id: I7c285a848ac947e0acf1acc8bc32f3ece3456412
2020-06-18 03:23:46 +00:00
Luke Huang
bbcd3b326b
Merge "Disable sockets and DNS if process lacks INTERNET permission." into rvc-dev
2020-06-18 03:03:06 +00:00
Luke Huang
5a42a4132f
Disable sockets and DNS if process lacks INTERNET permission.
...
This is a Client-only solution.
- Add to NetdClient a per-process std::atomic_boolean
similar to netIdForProcess and netIdForResolv.
- The boolean says whether the process should be
allowed Internet connectivity.
- Add an @hide method to NetUtils.java to set the boolean;
call it from the initialization code of the new
process just after forking from zygote.
- Make netdClientSocket and dnsOpenProxy check the
boolean. If the boolean is false, return EPERM from
socket calls.
Bug: 150028556
Test: atest NetworkUtilsTest
Test: atest CtsAppSecurityHostTestCases:UseProcessTest
Change-Id: If002280fbad493dfc2db3d9d505c0257d49a9056
Exempt-From-Owner-Approval: OWNERS already approved identical patchset 5
2020-06-18 03:02:06 +00:00
TreeHugger Robot
eeaa1490e4
[automerger skipped] Merge "Set correct owner UID for VPN agentConnect()" into rvc-dev am: 65efcc84a0 -s ours am: 3f7a4b9254 -s ours
...
am skip reason: Change-Id Ic979dad73983d722365849fbfb0becfd432b894c with SHA-1 bf004e9830 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11869883
Change-Id: Idd7465eef4ae2cd482f6fe70ca3bee0c3260e74b
2020-06-17 15:48:44 +00:00
TreeHugger Robot
f5e7b367d5
[automerger skipped] Merge "Treat RouteInfo with different interfaces as different routes" into rvc-dev am: 70e3f56147 -s ours am: 49d46b6c1f -s ours
...
am skip reason: Change-Id I57987233d42a0253eaee2e1ca5f28728c2354620 with SHA-1 bc4c5caa4f is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882397
Change-Id: I35e9898e25ff2b74c3876f0a19ce8dd6b6514011
2020-06-17 15:47:56 +00:00
TreeHugger Robot
3f7a4b9254
[automerger skipped] Merge "Set correct owner UID for VPN agentConnect()" into rvc-dev am: 65efcc84a0 -s ours
...
am skip reason: Change-Id Ic979dad73983d722365849fbfb0becfd432b894c with SHA-1 bf004e9830 is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11869883
Change-Id: I7df1004e885ff680a48d57e41987eb12f990875c
2020-06-17 15:35:35 +00:00
TreeHugger Robot
49d46b6c1f
[automerger skipped] Merge "Treat RouteInfo with different interfaces as different routes" into rvc-dev am: 70e3f56147 -s ours
...
am skip reason: Change-Id I57987233d42a0253eaee2e1ca5f28728c2354620 with SHA-1 bc4c5caa4f is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882397
Change-Id: I0b5d3d42ac9310e71262a7e8cf21af51b75837c4
2020-06-17 15:34:30 +00:00
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
0e21a83d94
Merge "Treat RouteInfo with different interfaces as different routes" am: d77e15c125 am: 157191f50f am: 7a49a3b538
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331916
Change-Id: Ia1d52507ad6d04586b9d1df3fc182982639d1218
2020-06-17 13:32:51 +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
973cfd159a
[automerger skipped] Merge "Add unit test for NetworkStatsSubscriptionsMonitor" am: 0543f2328d am: 032d132e50 -s ours am: 43b76f917e -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: I2058092be5426269fc93e209517a0d01c2fab1ec
2020-06-17 09:34:01 +00: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
Automerger Merge Worker
95a4790690
Merge "[automerger skipped] Merge "Test extra info sent to NetworkMonitor" into rvc-dev am: 8202b399da am: 35b7392a08 -s ours" into rvc-d1-dev-plus-aosp
2020-06-16 03:42:40 +00:00
TreeHugger Robot
fbd3829e2e
[automerger skipped] Merge "Test extra info sent to NetworkMonitor" into rvc-dev am: 8202b399da am: 35b7392a08 -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: I7a0a49a16ce67ddcf86ea6ad4d7ccda9f15181e9
2020-06-16 03:42:23 +00:00
TreeHugger Robot
869edf953d
[automerger skipped] Merge "Test extra info sent to NetworkMonitor" into rvc-dev am: 8202b399da -s ours am: c3a780339a -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: Iad71a237e3bac6340747e86a77c5569fea0bfb42
2020-06-16 03:42:22 +00:00
TreeHugger Robot
35b7392a08
Merge "Test extra info sent to NetworkMonitor" into rvc-dev am: 8202b399da
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11862409
Change-Id: Ie8f59a561f7184bcfbbe38e99da78ce092475ff8
2020-06-16 03:28:44 +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
5e26b14de2
Merge "Test extra info sent to NetworkMonitor" am: 9792742ee0 am: 26cd395a9e am: 41b5925f01
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1331060
Change-Id: I52edaf94601620b8b22030e586ae9de0742b3303
2020-06-16 01:16:41 +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
46ba8068c7
Merge "Set correct owner UID for VPN agentConnect()" am: 2f7bb517fd am: bab1782868 am: d01a9458ed
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1326493
Change-Id: Id56df437468962eea48b453c99564f68e3b38756
2020-06-15 17:38:17 +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
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
Chalard Jean
a2689cb888
[automerger skipped] Merge "Document the limitation to a hundred callbacks." into rvc-dev am: df9ce18085 am: 14280d011d -s ours
...
am skip reason: Change-Id I5911d01984695550b6c9afe7a8eb535bf5e320a1 with SHA-1 cece40543e is in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11835429
Change-Id: I7194a4a3a70f93dd510bda107f620e23fb0af19d
2020-06-12 05:12:16 +00:00
Chalard Jean
6b2aeee4eb
[automerger skipped] Merge "Document the limitation to a hundred callbacks." into rvc-dev am: df9ce18085 -s ours am: 51732a8d91 -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: I51aaef47a6e94d53a744b80fc684cd6fda6ec73c
2020-06-12 05:11:29 +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
14280d011d
Merge "Document the limitation to a hundred callbacks." into rvc-dev am: df9ce18085
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11835429
Change-Id: Ic82a23e6f949bd2c74c3dc49da516938f0603e2e
2020-06-12 04:58:27 +00:00
Chalard Jean
df9ce18085
Merge "Document the limitation to a hundred callbacks." into rvc-dev
2020-06-12 04:54:02 +00:00