Commit Graph

1129 Commits

Author SHA1 Message Date
Treehugger Robot
6eeaa90005 Merge "Use CS identity to update setting while performing factory reset" am: 049dbc5697 am: ab42076b53
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1695309

Change-Id: I7c23d33349e7f28a6fc17f5191e973f60e1eb96d
2021-05-21 02:08:51 +00: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
31cee3ca28 Merge "Check location permission for ConnDiags last." am: c5f9939bf3 am: 7cc1a8b2e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699069

Change-Id: I6ca0b27d9280e9246fbf6ea105f18d6f1d073388
2021-05-20 22:18: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
TreeHugger Robot
57c89d0810 Merge "Add more unit tests for ConnectivityManager S APIs" into sc-dev am: f9d1bbb566
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14640282

Change-Id: I578b566c5b73e06b9f675cbde6954dccbc0a5a57
2021-05-20 16:45:48 +00:00
TreeHugger Robot
f9d1bbb566 Merge "Add more unit tests for ConnectivityManager S APIs" into sc-dev 2021-05-20 16:32:19 +00:00
Les Lee
52a0b90b3b [automerger skipped] Merge "Support to query TYPE_WIFI usage with subscriberId" into sc-dev am: 627c446560 -s ours
am skip reason: Merged-In Ia033521a24e2bb56182d74a41bb2b39710571782 with SHA-1 614551c3b6 is already in history

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

Change-Id: If1a3eeb5077d7b078a3be260e01c4cf3f6790437
2021-05-20 09:06:38 +00:00
Paul Hu
43e93688f4 [automerger skipped] Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" into sc-dev am: 5acfe4933e -s ours
am skip reason: Merged-In I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520 with SHA-1 f11da7e205 is already in history

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

Change-Id: I2b1a734003cf71be772550bfef68f3c057d1f22f
2021-05-20 09:06:24 +00:00
Les Lee
627c446560 Merge "Support to query TYPE_WIFI usage with subscriberId" into sc-dev 2021-05-20 08:55:59 +00:00
Paul Hu
5acfe4933e Merge "Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer" into sc-dev 2021-05-20 08:45:35 +00:00
Paul Hu
5960879317 [automerger skipped] Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor" into sc-dev am: 740da160bc -s ours
am skip reason: Merged-In I856b545c0339a262abbe9d432cfda125bc82dc12 with SHA-1 a7b9535fde is already in history

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

Change-Id: Idd31246804a7374929545c7a4c021058a33a9758
2021-05-20 06:02:38 +00:00
Paul Hu
740da160bc Merge "Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor" into sc-dev 2021-05-20 05:57:25 +00:00
TreeHugger Robot
50f787f627 Merge "Check NETWORK_SETTINGS permission for getAllNetworkStateSnapshots" into sc-dev am: 6f0f141cd5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14601670

Change-Id: Ib259c6351471aca6656dc4d46bb7242228a226c2
2021-05-20 04:21:42 +00:00
TreeHugger Robot
6f0f141cd5 Merge "Check NETWORK_SETTINGS permission for getAllNetworkStateSnapshots" into sc-dev 2021-05-20 03:59:55 +00:00
Remi NGUYEN VAN
7e7aa6e163 Merge "Remove legacy resources fallback from Connectivity" into sc-dev am: 4c0e93f15b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14622504

Change-Id: Iee4dd439c3f98e600c6a6b1ed6a73384f9a1c2ac
2021-05-20 03:35:35 +00:00
Remi NGUYEN VAN
4c0e93f15b Merge "Remove legacy resources fallback from Connectivity" into sc-dev 2021-05-20 03:03:16 +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
Junyu Lai
ffda3053d1 Add more unit tests for ConnectivityManager S APIs
Ignore-AOSP-First: Avoid merge conflict
Test: atest android.net.ConnectivityManagerTest
Bug: 188657173
Change-Id: I33612650eb89486a14fcfc440ba0c357f4bb513c
2021-05-19 15:34:38 +00:00
Les Lee
73ffff59eb [automerger skipped] Merge "Add metered filter for API: buildTemplateCarrier" into sc-dev am: 8a2405cb6d -s ours
am skip reason: Merged-In I7196d62bb60844458a6c4b1d94e2baccb71e15cd with SHA-1 575b5569f6 is already in history

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

Change-Id: Ica7cf82e3d17cbe5d0577e14faa563cfbfdc9385
2021-05-19 14:48:10 +00:00
Les Lee
8a2405cb6d Merge "Add metered filter for API: buildTemplateCarrier" into sc-dev 2021-05-19 14:32:29 +00:00
Junyu Lai
3ce2e480ca [automerger skipped] Merge changes I3ba50cbd,I970ee365 into sc-dev am: 458a60dab5 -s ours
am skip reason: Merged-In I3ba50cbd8a7f60779c69ba85e10dc3cc8a52f8b1 with SHA-1 5744432f28 is already in history

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

Change-Id: Ic87d5b62ddd55ec1c264839dd84c3c375794e428
2021-05-19 12:57:00 +00:00
Junyu Lai
458a60dab5 Merge changes I3ba50cbd,I970ee365 into sc-dev
* changes:
  [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots
  [FUI27] Fix internal naming of notifyNetworkStatus
2021-05-19 12:36:03 +00:00
Junyu Lai
ed43c9e5bd [automerger skipped] Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present" into sc-dev am: 0dc5e2a8a2 -s ours
am skip reason: Merged-In I98dd3f4652dc067eb5c4666e952db6c854bcbb10 with SHA-1 9ef2350d50 is already in history

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

Change-Id: I4bd31102915e420296d0e3566c07239cab2e0c3b
2021-05-19 12:03:01 +00:00
Junyu Lai
0dc5e2a8a2 Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present" into sc-dev 2021-05-19 11:31:39 +00:00
junyulai
35687f5979 [VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present
Test: atest NetworkRequestTest#testBypassingVcn
Fix: 176939355
Fix: 188597540
Merged-In: I98dd3f4652dc067eb5c4666e952db6c854bcbb10
Change-Id: I98dd3f4652dc067eb5c4666e952db6c854bcbb10
  (cherry-picked from aosp/1705390)
2021-05-19 09:52:03 +00:00
Remi NGUYEN VAN
868f670bde [automerger skipped] Merge "Move config_apf* resources to NetworkStack" into sc-dev am: 1ac0e834c9 -s ours
am skip reason: Merged-In I7a15ddcad5af11fa307d9dbe3a77b31a1179e5b3 with SHA-1 b11ba415f6 is already in history

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

Change-Id: Ic8d42beef91705149641db3f63bc1a3c0ee162f4
2021-05-19 08:11:23 +00:00
Remi NGUYEN VAN
1ac0e834c9 Merge "Move config_apf* resources to NetworkStack" into sc-dev 2021-05-19 07:54:19 +00:00
Remi NGUYEN VAN
1423347938 Remove legacy resources fallback from Connectivity
Stop reading legacy resources as fallback, and only use resources in
ServiceConnectivityResources.

Bug: 185850634
Test: atest CtsNetTestCases FrameworksNetTests
Change-Id: I224f1ef9a1a8d6e636c7e9550845ab3e1394d7f3
2021-05-19 12:13:48 +09:00
Remi NGUYEN VAN
38670e2722 Merge "Move config_apf* resources to NetworkStack" am: 999427e138 am: 625ead50f8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684656

Change-Id: I93f5fd10f6c365365ff0e89ca4221d58d420c5ac
2021-05-19 03:11:41 +00:00
lesl
f96f02703e Add metered filter for API: buildTemplateCarrier
This CL modifies NetworkTemplate#buildTemplateCarrier to force on
metered carrier network and rename to buildTemplateCarrierMetered.
This method was introduced recently and has no callers.

This method will be used in Settings and NetworkPolicyManagerService
to display and manage data usage on carrier metered networks.

Settings/NetworkPolicyManagerService will use it instead of the existing
method buildTemplateMobileAll method, which only matches metered networks.
That code will change from matching metered mobile networks to matching
metered carrier networks.

Note: The carrier metered network includes metered mobile network and
metered "merged carrier wifi network" that is a specific cerrier wifi network
which provides the same user experience as mobile.

Bug: 176396812
Test: atest -c NetworkTemplateTest
Change-Id: I7196d62bb60844458a6c4b1d94e2baccb71e15cd
Merged-In: I7196d62bb60844458a6c4b1d94e2baccb71e15cd
2021-05-19 02:53:39 +00:00
lesl
cf4a1b59ea 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
Merged-In: Ia033521a24e2bb56182d74a41bb2b39710571782
2021-05-19 02:53:16 +00: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
be047e2855 Move config_apf* resources to NetworkStack
The resources are only read by NetworkStack through their respective
ApfCapabilities SystemApi methods.
As the resources are being migrated out of frameworks/base resources
anyway, move them directly to NetworkStack instead of moving them to
ServiceConnectivityResources.

Also test that the framework resources are not overlaid or modified.
This should avoid OEM integration errors where the overlays are kept as
in R, without overlaying the resource in the NetworkStack package.

Bug: 185850634
Test: atest CtsNetTestCases
BYPASS_INCLUSIVE_LANGUAGE_REASON=Need to mention legacy APIs

Merged-In: I7a15ddcad5af11fa307d9dbe3a77b31a1179e5b3
(clean cherry-pick)

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

Change-Id: I08b1d281a3b71556d783b1d4f352bc7a4ba8e879
2021-05-18 23:27:10 +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
Paul Hu
206157788c 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
Merged-In: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520
(clean cherry-pick)

Change-Id: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520
2021-05-18 14:19:56 +00:00
Paul Hu
deb3f2e7a7 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
Merged-In: I856b545c0339a262abbe9d432cfda125bc82dc12
(clean cherry-pick)

Change-Id: I856b545c0339a262abbe9d432cfda125bc82dc12
2021-05-18 14:16:57 +00:00
Les Lee
bb4bc3f5b4 Merge "Support to query TYPE_WIFI usage with subscriberId" am: ad9e8eeabd am: cd1dab8a12
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1608057

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

Change-Id: I46d8d8f0d9b83fb0a817a3455cbbc28d558b871c
2021-05-18 13:57:06 +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
Chiachang Wang
1006632fb5 [automerger skipped] Merge "Dump only NORMAL priority information if no priority assigned" into sc-dev am: 646af9c067 -s ours
am skip reason: Merged-In I6825c5038e48e3060c0c3ad1512bd584ef6d10a7 with SHA-1 c13a0a066c is already in history

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

Change-Id: I5f08130dfd3434960bbda59ef98784873437882a
2021-05-18 12:12:54 +00:00
Chiachang Wang
646af9c067 Merge "Dump only NORMAL priority information if no priority assigned" into sc-dev 2021-05-18 11:57:53 +00:00
Treehugger Robot
963d7105d2 Merge "[VCN21] Do not add NOT_VCN_MANAGED capability if specifier is present" am: 4eedd4ac23 am: cc1fd37a6e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705390

Change-Id: I6a009ce0b78fb684fe75cedb7fedb96a0ca9bdca
2021-05-18 09:57:20 +00:00