Paul Hu
ec1e785bbd
Merge "[RFPM04] Adjust hasRestrictedNetworkPermission method" am: 89ca9dd063 am: b541b5fecf am: c5241a3cd1 am: 9675f2fa72 am: 6a065b325e
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1321322
Change-Id: I6b0e7531effbb8c627697b3d7c475de3394b7f52
2020-08-03 12:20:18 +00:00
Paul Hu
c5241a3cd1
Merge "[RFPM04] Adjust hasRestrictedNetworkPermission method" am: 89ca9dd063 am: b541b5fecf
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1321322
Change-Id: Id91c6de75e524080d15e2508007d5de997c7fd92
2020-08-03 11:18:31 +00:00
Paul Hu
89ca9dd063
Merge "[RFPM04] Adjust hasRestrictedNetworkPermission method"
2020-08-03 10:37:52 +00:00
Peter Wang
8ba18c0508
Merge "[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and guard with permission"
2020-07-31 08:43:44 +00:00
Chalard Jean
96650db000
Merge "Move utils from network stack to libs." am: 21be4fabb5 am: bfadef51df am: 7a3454f47e am: 29826a7a2f am: c970ae31d6
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083
Change-Id: I55c36bb60ea81f86daa193e9dff738846984e1e7
2020-07-31 01:34:46 +00:00
Chalard Jean
7a3454f47e
Merge "Move utils from network stack to libs." am: 21be4fabb5 am: bfadef51df
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1350083
Change-Id: Ia163bc416e16ce56fc96855c1111a9905b712843
2020-07-31 01:09:46 +00:00
Chalard Jean
db2934f3cc
Move utils from network stack to libs.
...
This package is using some common utilities from
a library that used to live in the network stack.
A better home for these utilities is frameworks/libs,
so this topic moves the files ther and also changes
the package of some utilities.
See aosp/1350222 and aosp/1350182 for a detailed
description of the specific files that moved.
Test: checkbuild
Change-Id: I76a9b7790f3997e3e6b3c2f75ba6308286457cde
2020-07-29 21:15:48 +09:00
Paul Hu
154341cb4b
Merge "[RFPM03] Check permission by uid." am: ce4d7d9493 am: a33a3a3a74 am: 608d002021 am: f6d7721f63 am: c6ec125732
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1320375
Change-Id: Iee10248986fe1bda9fa97e6ae387e5ca4ec557c6
2020-07-29 06:46:16 +00:00
paulhu
29100e8892
[RFPM04] Adjust hasRestrictedNetworkPermission method
...
There are two parts in hasRestrictedNetworkPermission method.
One is carryover package check and one is uid permission
check. Seperate carryover package check part to another method
to be clearer the usage of hasRestrictedNetworkPermission method.
Bug: 132784544
Test: atest FrameworksNetTests
Change-Id: Iab0609fcaa52acb0dfcb31ca957f22bfe8d62392
2020-07-29 14:14:27 +08:00
Paul Hu
608d002021
Merge "[RFPM03] Check permission by uid." am: ce4d7d9493 am: a33a3a3a74
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1320375
Change-Id: I80406643e4797b1e269b4f7c5711339371fa533b
2020-07-29 05:53:25 +00:00
Paul Hu
ce4d7d9493
Merge "[RFPM03] Check permission by uid."
2020-07-29 05:41:32 +00:00
Junyu Lai
62b56d26ef
Merge "Gracefully handle integer overflows." am: a308f79353 am: aeddf47458 am: a2a1e552cf am: 85c6bdbbeb am: 076ffecd31
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1316217
Change-Id: I7c04b66f75f64c214bd0c8d27bb5dbeda13094ce
2020-07-29 02:58:33 +00:00
Junyu Lai
a2a1e552cf
Merge "Gracefully handle integer overflows." am: a308f79353 am: aeddf47458
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1316217
Change-Id: I0bba17d0367ebf4e1c868a8cc7471366bc7a4408
2020-07-29 01:55:23 +00:00
Junyu Lai
a308f79353
Merge "Gracefully handle integer overflows."
2020-07-29 01:19:07 +00:00
Chiachang Wang
bf875c99aa
Merge "Update language to comply with Android's inclusive language guidance" am: 19c3b6dd6c am: 55c0d6e638 am: 41d7c54142 am: 7583a24fd3 am: c08f23849a
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1373160
Change-Id: Ideecaaaa12e82c5771e75d0c743228f6478e1ca3
2020-07-28 12:03:04 +00:00
Chiachang Wang
41d7c54142
Merge "Update language to comply with Android's inclusive language guidance" am: 19c3b6dd6c am: 55c0d6e638
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1373160
Change-Id: I9318abb0233e7b8847466914724eeaae769ea9c8
2020-07-28 11:19:47 +00:00
Chiachang Wang
19c3b6dd6c
Merge "Update language to comply with Android's inclusive language guidance"
2020-07-28 10:51:53 +00:00
paulhu
ab4ad20eef
[RFPM03] Check permission by uid.
...
PermissionMonitor check permission by each package name but only
update the uid permission to netd. It's better to check
permission by uid directly. Thus, use
ActivityManager#checkUidPermission to check permissions for each
uid.
Bug: 132784544
Test: atest FrameworksNetTests
Change-Id: I057d34383b4dc408b2773e4c6b146774ba0c5eb2
2020-07-28 18:23:38 +08:00
Chiachang Wang
9da868b59a
Update language to comply with Android's inclusive language guidance
...
See https://source.android.com/setup/contribute/respectful-code
for reference.
Bug: 161896447
Test: m
Change-Id: I6c3c03c0c2d1302af6d5245486823c13a3432900
2020-07-28 15:36:30 +08:00
Pavan Kumar M
3708b68405
Gracefully handle integer overflows.
...
Avoid recording negative data by doing integer-based
math as much as possible, but switch to double-based
math if we detect that we'd end up causing an overflow.
Test :
- Builds, Boots
- High data throughput scenarios
- NetworkStatsHistoryTest, NetworkStatsCollectionTest,
NetworkStatsTest
Bug: 119527458
Change-Id: I55d4aa649bea3ae201ad513074ff2b71cb918dad
2020-07-28 11:36:49 +05:30
Treehugger Robot
2c50b0efd7
Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: 88f47d4d32 am: 416911a122
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364497
Change-Id: Idef0dd6e0e0486b76c0067540e580d444e97d6a0
2020-07-16 12:09:04 +00:00
junyulai
20b027ed2b
Attribute data usage to virtual RAT type for 5G non-standalone mode
...
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071
Merged-In: I8753e68140c0993773017c9a49bd8a666a364071
(cherry-picked from ag/12167624)
2020-07-16 18:22:09 +08:00
Peter Wang
c061cdf467
[Telephony Mainline] Rename getActiveAndHiddenSubscriptionIdList and
...
guard with permission
Bug: 150878235
Fix: 150878235
Test: Build
Change-Id: I7f3b1f5170e032336d9b39b322c49e2b92573586
Merged-In: I7f3b1f5170e032336d9b39b322c49e2b92573586
2020-07-16 02:01:06 -07:00
junyulai
1b6ad1403b
Attribute data usage to virtual RAT type for 5G non-standalone mode
...
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I8753e68140c0993773017c9a49bd8a666a364071
2020-07-16 15:32:01 +08:00
Treehugger Robot
02d2922f84
Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: 56df7e2c1a am: add913a0ae am: d53e749e8a am: 2fc2a3b3a3
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157
Change-Id: I6dfb1ec8e41adf39dce5361389e471e83425bc4e
2020-07-10 06:17:03 +00:00
Treehugger Robot
add913a0ae
Merge "Revert "Attribute data usage to 5G for 5G non-standalone mode"" am: 13c5ee8313 am: 56df7e2c1a
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1360157
Change-Id: If052329128326fba72ff27c024a2c6652b7bb1ef
2020-07-10 05:41:05 +00:00
Junyu Lai
bacab2c04b
Merge "Attribute data usage to 5G for 5G non-standalone mode" am: c987a53a93 am: b2cd1cf130 am: 09b7371d80 am: bf8e96d3ec am: 57b7cba0ca
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359203
Change-Id: Ifde023200e39995411932a44716a3eeb6daea542
2020-07-10 03:45:23 +00:00
Junyu Lai
b6dc1c1f92
Revert "Attribute data usage to 5G for 5G non-standalone mode"
...
This reverts commit edcaa70be2 .
Reason for revert: Revert and wait for the design is settled down.
Change-Id: I10fdfc37d6456678de1886698cd6ad08bf8aa810
2020-07-10 03:43:19 +00:00
Junyu Lai
09b7371d80
Merge "Attribute data usage to 5G for 5G non-standalone mode" am: c987a53a93 am: b2cd1cf130
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1359203
Change-Id: I860b0226157ee31f0488d6b2252ae157e86dc5eb
2020-07-10 03:10:15 +00:00
junyulai
edcaa70be2
Attribute data usage to 5G for 5G non-standalone mode
...
Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Bug: 160727498
Change-Id: I563df14500caeb3602b381479afaf5163ad8e6a1
2020-07-09 16:56:54 +08:00
Paul Hu
07be735444
Merge "[RFPM02] Add Dependencies class for injection in tests." am: b95025b2ba am: a99e0b1b95 am: 95f39d34d4 am: 472d6dfa22 am: 5fc8e40e15
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318291
Change-Id: I487c0a86d7b572b568c0b91b20624b234668e164
2020-07-08 11:15:40 +00:00
Paul Hu
95f39d34d4
Merge "[RFPM02] Add Dependencies class for injection in tests." am: b95025b2ba am: a99e0b1b95
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318291
Change-Id: If53e1521327c8d9f1fd2a5debb94c58ed25b2880
2020-07-08 10:35:21 +00:00
paulhu
d7c5c46776
[RFPM02] Add Dependencies class for injection in tests.
...
Add Dependencies class in PermissionMonitor for injection
in tests easily.
Bug: 132784544
Test: atests FrameworksNetTests
Change-Id: Ibb84d548908f7a955fa0ff206794486733259978
2020-07-08 15:30:42 +08:00
Chalard Jean
ca36871d15
Merge "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."" am: 1c108ffb25 am: f806795991 am: 23ce57f73e am: 9b4373b519 am: 160d1f0233
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353491
Change-Id: Ifd265eda7e5cd9c9d66cd19394bdb3c881dc5d16
2020-07-01 06:08:18 +00:00
Chalard Jean
23ce57f73e
Merge "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."" am: 1c108ffb25 am: f806795991
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353491
Change-Id: Ibc8d633a6e04f7cd0f4c1a0d02ae586232cc0c6a
2020-07-01 05:33:41 +00:00
Chalard Jean
3740bfadad
Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."
...
Revert "Add new network quirk parcelable in the NetworkAttributes."
Revert submission 1323251-ipv6_prov_loss_quirk_parcelable
Reason for revert: Breaks CtsStrictJavaPackagesTestCases
Reverted Changes:
I18e05c09f:Add new network quirk parcelable in the NetworkAtt...
I8dbff2377:Test IPv6ProvisioningLossParcelable in the Network...
Change-Id: Ie906919b344131cd768fbed787248d3caac2f74d
2020-07-01 01:46:26 +00:00
Xiao Ma
4619e486e5
Merge "Test IPv6ProvisioningLossParcelable in the NetworkAttributes." am: a4ddee215e am: a577c275d5 am: eb4cdbfe9c am: 309aa2d33d am: be3028ac5b
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322637
Change-Id: I39c6ea15ae901c7ad6a90bee5caa6064ac09847b
2020-06-29 12:56:08 +00:00
Paul Hu
a973eb60e3
Merge "[RFPM01] Merge package added/removed methods" am: 97c80a0e2f am: 97133b97ae am: 1d59118500 am: befbe7f72c am: a523acbda4
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317236
Change-Id: I8b789c3cb90357a6d408565201d80a13fad92587
2020-06-29 12:54:41 +00:00
Xiao Ma
eb4cdbfe9c
Merge "Test IPv6ProvisioningLossParcelable in the NetworkAttributes." am: a4ddee215e am: a577c275d5
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322637
Change-Id: Iaf964024c44e6b78ccb3b8fcf3fc131479747a81
2020-06-29 12:17:26 +00:00
Paul Hu
1d59118500
Merge "[RFPM01] Merge package added/removed methods" am: 97c80a0e2f am: 97133b97ae
...
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317236
Change-Id: Ida8f82d2ec5be1040a2bdf2aa65a94d53f68ea6c
2020-06-29 12:16:47 +00:00
Xiao Ma
fc889a6dd0
Test IPv6ProvisioningLossParcelable in the NetworkAttributes.
...
Bug: 157534516
Test: atest FrameworksNetTests
Change-Id: I8dbff2377457bb8fd0f447be0a3cda9af952f2a2
2020-06-29 11:57:32 +00:00
Paul Hu
97c80a0e2f
Merge "[RFPM01] Merge package added/removed methods"
2020-06-29 11:50:57 +00:00
Luke Huang
bea02c1460
Merge "Disable sockets and DNS if process lacks INTERNET permission."
2020-06-24 18:42:08 +00:00
Luke Huang
3cd122f485
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
(cherry-pick from internal branch, ag/11881939)
Merged-In: If002280fbad493dfc2db3d9d505c0257d49a9056
Change-Id: If002280fbad493dfc2db3d9d505c0257d49a9056
2020-06-24 11:58:57 +00:00
Luke Huang
f08f9d4bd7
Move DnsPacket to libs net
...
This class might be used by some mainline modules.
Bug: 151052811
Test: atest DnsPacketTest
Test: atest DnsResolverTest
(clean cherry-pick from internal branch)
Merged-In: I8841d91456952ded5efbf8ea221289aecc7746ad
Change-Id: I8841d91456952ded5efbf8ea221289aecc7746ad
2020-06-24 11:32:26 +00:00
paulhu
679ff2b501
[RFPM01] Merge package added/removed methods
...
There are two methods to handle package added/removed from
two differnt listeners. It can use one of listener to handle the
changes. Thus, keep PackageManagerInternal#PackageListObserver
but remove the listening from ConnectivityService.
Bug: 132784544
Test: atests FrameworksNetTests
Change-Id: Ib2db85e4108f9fda731bf6667d0af0610fc79fea
2020-06-23 16:10:03 +08:00
TreeHugger Robot
5d8ff46bda
Merge "Update DnsManagerTest for AIDL interface change" into rvc-dev am: ee9ca628ca am: e585912db3 am: 84f2eb10e7 am: 9260b81d86
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11954238
Change-Id: I21129279b6ac94bebb55e0798e0da12ef5a0b5eb
2020-06-22 16:00:44 +00:00
TreeHugger Robot
e585912db3
Merge "Update DnsManagerTest for AIDL interface change" into rvc-dev am: ee9ca628ca
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11954238
Change-Id: I1327794e6b8201d3c47c39838cfa516812cf273d
2020-06-22 15:18:45 +00:00
Ken Chen
0dcddd3b06
Update DnsManagerTest for AIDL interface change
...
Check one more parameter enforceDnsUid in ResolverOptionsParcel in
DnsManagerTest.
Bug: 159587277
Test: atest
com.android.server.connectivity.DnsManagerTest#testSendDnsConfiguration
Change-Id: Ic53f42b968626294c851dac252a70769846ba427
Merged-In: Ic53f42b968626294c851dac252a70769846ba427
2020-06-22 15:10:12 +00:00
TreeHugger Robot
ee9ca628ca
Merge "Update DnsManagerTest for AIDL interface change" into rvc-dev
2020-06-22 15:09:54 +00:00