Commit Graph

611 Commits

Author SHA1 Message Date
Orion Hodson
0def2a4e91 Merge "Move to renamed NDK symbol AFileDescriptor_getFd" am: 544989351f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703089

Change-Id: Ia45703aa469fcfb1efcc6b12479254e731dc794b
2021-05-21 08:46:52 +00:00
Orion Hodson
544989351f Merge "Move to renamed NDK symbol AFileDescriptor_getFd" 2021-05-21 08:29:52 +00:00
Chiachang Wang
38b86a2c15 Merge "Add test for NetworkCapabilities.Builder.withoutDefaultCapabilities" am: 32bd81d88b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1712731

Change-Id: I6a5f4681224315c2c63cad24e0defd1abcc25330
2021-05-21 03:56:22 +00:00
Chiachang Wang
32bd81d88b Merge "Add test for NetworkCapabilities.Builder.withoutDefaultCapabilities" 2021-05-21 03:33:23 +00:00
Chiachang Wang
92346fdf33 Add test for NetworkCapabilities.Builder.withoutDefaultCapabilities
Bug: 186061922
Test: atest CtsNetTestCases:android.net.NetworkCapabilitiesTest
Change-Id: I369e71dd6ae85da78e114ea8377967ab0bde787b
2021-05-21 09:57:42 +08:00
Treehugger Robot
ab42076b53 Merge "Use CS identity to update setting while performing factory reset" am: 049dbc5697
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1695309

Change-Id: Ifce6312c750c738a4e4afb93f39522b4a282ae4a
2021-05-21 01:44:13 +00:00
Treehugger Robot
049dbc5697 Merge "Use CS identity to update setting while performing factory reset" 2021-05-21 01:26:05 +00:00
Cody Kesting
7cc1a8b2e7 Merge "Check location permission for ConnDiags last." am: c5f9939bf3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699069

Change-Id: Idfea26523ff297f8be22695dd5a4e5351a7ccda4
2021-05-20 21:46:19 +00:00
Cody Kesting
c5f9939bf3 Merge "Check location permission for ConnDiags last." 2021-05-20 21:27:46 +00:00
Chiachang Wang
bc66712394 Use CS identity to update setting while performing factory reset
When apps try to call factoryReset to do networking reset, it
will result in updating the setting in SettingsProvider.
ContentProvider will verify if the package name of the caller
that initiated the request being processed on the current thread.
The package should belong to the calling UID. The setting update
started from the ConnectivityService context, so the package will
be android but the calling UID will be the calling app. It will
cause a SecurityException. The behavior is fine previously as its
known caller(Settings) shares system UID. But it will be a
problem for other callers, such as CTS. Thus, clear the identity
since the necessary permission check should be examined at the
top of the method. The following actions should be fine to be
proceed from the system itself. Also replace the user restriction
check via hasUserRestrictionForUser with the UserHandle created
from the calling uid to ensure it's verified with correct user.

Bug: 186061922
Test: Factory reset from Settings
Change-Id: If2dd69f702a1eafff331f9e71f6b92aeadfb715d
2021-05-20 10:01:50 +08:00
Remi NGUYEN VAN
625ead50f8 Merge "Move config_apf* resources to NetworkStack" am: 999427e138
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684656

Change-Id: Ie51eae491092389fbc7321491da6129c24c3de00
2021-05-19 02:37:01 +00:00
Remi NGUYEN VAN
999427e138 Merge "Move config_apf* resources to NetworkStack" 2021-05-19 00:58:52 +00:00
Nikita Iashchenko
0dd0180edb Merge "Move IoUtils#deleteContents from CorePlatformApi set to framework" am: fc41cdfd4c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1686657

Change-Id: I2aced35532a572f7912abde832cfdce66c34a3d0
2021-05-18 23:07:28 +00:00
Nikita Iashchenko
fc41cdfd4c Merge "Move IoUtils#deleteContents from CorePlatformApi set to framework" 2021-05-18 22:13:56 +00:00
Les Lee
cd1dab8a12 Merge "Support to query TYPE_WIFI usage with subscriberId" am: ad9e8eeabd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1608057

Change-Id: I753603201bd935af055cf25135e4f8faf436bf2a
2021-05-18 13:35:08 +00:00
Les Lee
1851af8e93 Merge "Add metered filter for API: buildTemplateCarrier" am: 4c7cc726d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699687

Change-Id: Iac42f02079de5c0507209741e648b13da667fb94
2021-05-18 13:26:24 +00:00
Les Lee
ad9e8eeabd Merge "Support to query TYPE_WIFI usage with subscriberId" 2021-05-18 13:02:07 +00:00
Les Lee
4c7cc726d1 Merge "Add metered filter for API: buildTemplateCarrier" 2021-05-18 13:01:38 +00:00
Treehugger Robot
cc1fd37a6e Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present" am: 4eedd4ac23
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705390

Change-Id: I0d8dd61da97e675ba70fd7dd5f1e889d8a2e54f7
2021-05-18 09:36:15 +00:00
Treehugger Robot
4eedd4ac23 Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present" 2021-05-18 08:35:06 +00:00
Chiachang Wang
0b80e965ac Merge "Dump only NORMAL priority information if no priority assigned" am: f93d99deae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708333

Change-Id: I7c3bd130b67c40bb8be23073dbfa4aaf85624016
2021-05-18 02:37:13 +00:00
Cody Kesting
8533f883c2 Check location permission for ConnDiags last.
This CL updates ConnectivityService to check location permissions for
ConnectivityDiagnostics callbacks last in the permission check process.
This minimizes misattribution of location access for networks that an
app is not administering.

This CL also updates ConnectivityDiagnosticsManager documentation to
clearly state that location permissions are required in order to receive
callbacks.

Bug: 187310575
Test: atest ConnectivityDiagnosticsManagerTest
Test: atest ConnectivityServiceTest
Change-Id: I2dbeddac6273e2392ccaeae51a1c7776d6d3da75
2021-05-17 19:36:47 -07:00
Chiachang Wang
c13a0a066c Dump only NORMAL priority information if no priority assigned
The legacy design of "dumpsys connectivity" will only dump
information with NORMAL priority. It was updated to provide
both NORMAL and HIGH priority information in order to support
dump in bugreport. However, it will also affect the result
using dumpsys connectivity.

Update design to dump NORMAL priority only to align with legacy
design.

Bug: 188387185
Test: adb shell dumpsys connectivity
Test: adb bugreport and check the result in bugreport
Change-Id: I6825c5038e48e3060c0c3ad1512bd584ef6d10a7
2021-05-17 17:31:07 +08:00
Paul Hu
87938ce71d Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" am: 43864e564b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689573

Change-Id: If352718bf7de1c6446f291710c2b114ffd57abc6
2021-05-17 07:31:32 +00:00
junyulai
9ef2350d50 [VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present
Test: atest NetworkRequestTest#testBypassingVcn
Fix: 176939355
Change-Id: I98dd3f4652dc067eb5c4666e952db6c854bcbb10
2021-05-17 07:04:13 +00:00
Paul Hu
43864e564b Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" 2021-05-17 06:45:52 +00:00
Paul Hu
8aa632a19e Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor" am: 8665f56ca1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689572

Change-Id: I5515f041b783e36ca439e2b7b1d77e93ee329be0
2021-05-17 03:28:16 +00:00
Paul Hu
8665f56ca1 Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor" 2021-05-17 03:04:59 +00:00
Chiachang Wang
f27534ba53 Merge "Replace clearAll with withoutDefaultCapabilities" am: b4c624aece
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708330

Change-Id: Ibb29c90f818ca6f447d91f0eda0abe0ef82363dd
2021-05-17 02:29:35 +00:00
Chiachang Wang
b4c624aece Merge "Replace clearAll with withoutDefaultCapabilities" 2021-05-17 01:56:52 +00:00
paulhu
f11da7e205 Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer
PermissionMonitor register APPS_ALLOWED_ON_RESTRICTED_NETWORKS
setting observer to listen setting changed callback. Then update
or revoke permission for those apps.

Bug: 185149952
Test: atest FrameworksNetTests
Change-Id: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520
2021-05-16 15:52:36 +00:00
paulhu
a7b9535fde Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor
Let PermissionMonitor read APPS_ALLOWED_ON_RESTRICTED_NETWORKS
setting and grant netd system permission to uids whose package
name is listed in setting.

Bug: 185149952
Test: atest FrameworksNetTests
Change-Id: I856b545c0339a262abbe9d432cfda125bc82dc12
2021-05-16 23:48:55 +08:00
lesl
614551c3b6 Support to query TYPE_WIFI usage with subscriberId
Previous the API ignores subscriberId when network type is WIFI.
Allow caller to call querySummaryXXXX with TYPE: WIFI
+ subscriberId: IMSI to get carrier merged wifi usage which matches the wifi
network with the given IMSI.

Bug: 176396812
Test: atest -c NetworkStatsServiceTest
Change-Id: Ia033521a24e2bb56182d74a41bb2b39710571782
2021-05-16 22:18:32 +08:00
Junyu Lai
c8cdc6917c Merge changes I3ba50cbd,I970ee365 am: 2a7ab18c0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620859

Change-Id: I2cf4ea0abb1ff7bc74302cce16cbe8041b08d321
2021-05-15 16:53:30 +00:00
Junyu Lai
2a7ab18c0b Merge changes I3ba50cbd,I970ee365
* changes:
  [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots
  [FUI27] Fix internal naming of notifyNetworkStatus
2021-05-15 16:21:38 +00:00
Jayachandran Chinnakkannu
f84276bde1 Merge "QOS filter matching support based on remote address and port number for connected sockets" am: 6c5553aaaa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1687813

Change-Id: Ibd70a86d82d4810425288694f2e3904d471a2d24
2021-05-14 20:28:38 +00:00
Jayachandran Chinnakkannu
6c5553aaaa Merge "QOS filter matching support based on remote address and port number for connected sockets" 2021-05-14 20:02:30 +00:00
junyulai
5744432f28 [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots
Test: atest FrameworksNetTests
Bug: 174123988
Change-Id: I3ba50cbd8a7f60779c69ba85e10dc3cc8a52f8b1
2021-05-14 19:48:17 +08:00
junyulai
07f3432fab [FUI27] Fix internal naming of notifyNetworkStatus
Test: TH
Bug: 174123988
Change-Id: I970ee365ca221956ee85788005d331374b5fa71a
2021-05-14 19:48:17 +08:00
Junyu Lai
e5929c073c Merge "[FUI26] Address comments on aosp/1560408" am: 8f03f1e788
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1618845

Change-Id: Idde0e161d6241a5c45c0b751e1fca912ed10c7a8
2021-05-14 11:48:14 +00:00
Junyu Lai
8f03f1e788 Merge "[FUI26] Address comments on aosp/1560408" 2021-05-14 11:34:09 +00:00
Chiachang Wang
cf6e5210ba Replace clearAll with withoutDefaultCapabilities
As the feedback from API review, the clearAll method in Builder
does not match the actual usage. Thus, remove it and replace
with withoutDefaultCapabilities to provide clearer usage.

Bug: 184735772
Test: make update-api ; m
Change-Id: Ida8d25d57504864f046e3403f593cc606fbfe982
Merged-In: Ida8d25d57504864f046e3403f593cc606fbfe982
2021-05-14 10:36:37 +00:00
Paul Hu
38544887c7 Merge "Address [set|get]RestrictedAllowedApps API review feedback" am: 16c34f0d8b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708327

Change-Id: I0c9966c379e956fbf8a01d81d5f1dd0e68662763
2021-05-14 10:25:37 +00:00
Paul Hu
16c34f0d8b Merge "Address [set|get]RestrictedAllowedApps API review feedback" 2021-05-14 10:00:39 +00:00
Aaron Huang
c0ad457264 Merge "Rename *Iface* APIs to *Interface*" am: 7bb6abb413
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1693585

Change-Id: I62fa0403c8b2d78e7e7a90be8ac804576ec27456
2021-05-14 09:36:36 +00:00
Aaron Huang
7bb6abb413 Merge "Rename *Iface* APIs to *Interface*" 2021-05-14 09:11:29 +00:00
Treehugger Robot
68413f8a69 Merge "Reference unreachable netId from INetd" am: 01be14fd53
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1708326

Change-Id: Iedbf9e9b150c95aa0da6a7b20af0dd1412703e2b
2021-05-14 08:39:18 +00:00
Treehugger Robot
01be14fd53 Merge "Reference unreachable netId from INetd" 2021-05-14 08:08:08 +00:00
junyulai
c6422b78ea [FUI26] Address comments on aosp/1560408
Test: TH
Bug: 174123988
Change-Id: I949eeb8903e903d8ede90521442b1f917d5cdfeb
2021-05-14 15:57:44 +08:00
paulhu
257a5cf7ad Address [set|get]RestrictedAllowedApps API review feedback
- Rename [set|get]RestrictedAllowedApps to
  [set|get]AppsAllowedOnRestrictedNetworks
- Remove the regex of validate package name check

Bug: 188085693
Test: m update-api && m
Change-Id: I07966fb66093523a67e1e6a1ecfa05cc399e22f2
2021-05-14 15:27:36 +08:00