Commit Graph

32040 Commits

Author SHA1 Message Date
Iavor-Valentin Iftime
e116e63a91 Merge "[DO NO MERGE] Enforce INTERACT_ACROSS_USERS_FULL permission for NotificationAccessDetails" into rvc-dev am: 450cacbee4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21296639

Change-Id: I388da4ab1fed92f8afa92469e628f1324921df45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-06 17:40:55 +00:00
Iavor-Valentin Iftime
450cacbee4 Merge "[DO NO MERGE] Enforce INTERACT_ACROSS_USERS_FULL permission for NotificationAccessDetails" into rvc-dev 2023-03-06 17:06:11 +00:00
Valentin Iftime
5fb0705664 [DO NO MERGE] Enforce INTERACT_ACROSS_USERS_FULL permission for NotificationAccessDetails
When using EXTRA_USER_HANDLE, check for INTERACT_ACROSS_USERS_FULL permission on calling package.

Bug: 259385017
Test: 1. Build a test app that creates and starts an intent to NOTIFICATION_LISTENER_DETAIL_SETTINGS while setting the intent extra  android.intent.extra.user_handle to UserHandle(secondaryUserId).
 2. Create and switch to a secondary user
Settings > System > Multiple users > Allow multiple users > Add user > Switch to New user
 3. Open Settings > Notifications > Device & app notifications and choose an app from the list (uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE). Enable Device & app notifications for selected app and disable all attributed permissions.
 4. Switch back to the Owner user.
 5. Get the userId of the secondary user: adb shell pm list users.
 6. Open the test app and enter the userId for the secondary user and the component name that uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE.
 8. In the settings window that open, enable all 4 sub-options.
 9. Switch to the secondary user and note that the all sub-options for the app are disabled.

Change-Id: I875b9f2fc32c252acdcf8374a14067836e0f1ac6
Merged-In: I875b9f2fc32c252acdcf8374a14067836e0f1ac6
2023-02-08 13:37:20 +00:00
Jack Yu
c098bdcad0 Only primary user is allowed to control secure nfc am: 0e57ff90cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21154458

Change-Id: I35c94f779d47e27c170ec3b4becafc563f077a68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-03 09:21:04 +00:00
Jack Yu
0e57ff90cd Only primary user is allowed to control secure nfc
Bug: 238298970
Test: manual
Merged-In: I945490ef1e62af479a732c9a260ed94bdd8bc313
Change-Id: I945490ef1e62af479a732c9a260ed94bdd8bc313
2023-01-31 07:41:49 +00:00
Yanting Yang
86914bedc8 Add DISALLOW_APPS_CONTROL check into uninstall app for all users
Settings App info page supports a "Uninstall for all users" function
when multiple users are enabled. It bypasses the restriction of
DISALLOW_APPS_CONTROL which breaks the user isolation guideline.

To fix this vulnerability, we should check the DISALLOW_APPS_CONTROL
restriction to provide the "Uninstall for all users" function.

Bug: 258653813
Test: manual & robotests
Change-Id: I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6
Merged-In: I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6
2023-01-04 18:59:18 +00:00
Yanting Yang
1a43a98334 Add DISALLOW_APPS_CONTROL check into uninstall app for all users
Settings App info page supports a "Uninstall for all users" function
when multiple users are enabled. It bypasses the restriction of
DISALLOW_APPS_CONTROL which breaks the user isolation guideline.

To fix this vulnerability, we should check the DISALLOW_APPS_CONTROL
restriction to provide the "Uninstall for all users" function.

Bug: 258653813
Test: manual & robotests
Change-Id: I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6
Merged-In: I5d3bbcbaac439c4f7a1e6a9ade7775ff4f2f2ec6
2023-01-04 18:58:32 +00:00
Tsung-Mao Fang
ff5bfb40c8 [DO NOT MERGE] FRP bypass defense in the settings app
Over the last few years, there have been a number of
Factory Reset Protection bypass bugs in the SUW flow.
It's unlikely to defense all points from individual apps.

Therefore, we decide to block some critical pages when
user doesn't complete the SUW flow.

Test: Can't open the certain pages in the suw flow.
Bug: 258422561
Fix: 200746457
Bug: 202975040
Fix: 213091525
Fix: 213090835
Fix: 201561699
Fix: 213090827
Fix: 213090875
Change-Id: Ia18f367109df5af7da0a5acad7702898a459d32e
Merged-In: Ia18f367109df5af7da0a5acad7702898a459d32e
2022-12-07 03:09:30 +00:00
Tsung-Mao Fang
b34ff2f272 [DO NOT MERGE] FRP bypass defense in the settings app
Over the last few years, there have been a number of
Factory Reset Protection bypass bugs in the SUW flow.
It's unlikely to defense all points from individual apps.

Therefore, we decide to block some critical pages when
user doesn't complete the SUW flow.

Test: Can't open the certain pages in the suw flow.
Bug: 258422561
Fix: 200746457
Bug: 202975040
Fix: 213091525
Fix: 213090835
Fix: 201561699
Fix: 213090827
Fix: 213090875
Change-Id: Ia18f367109df5af7da0a5acad7702898a459d32e
Merged-In: Ia18f367109df5af7da0a5acad7702898a459d32e
2022-12-07 03:08:58 +00:00
changbetty
fecf464fb4 RESTRICT AUTOMERGE Make bluetooth switch not discoverable via SliceDeepLinkTrampoline
Bug: 244423101
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothSwitchPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDashboardFragmentTest
Test: manual test by test apk

Change-Id: I13562d227e06627fac33239a9d21fd405a18d012
2022-11-09 06:37:57 +00:00
changbetty
3cc8db3c58 RESTRICT AUTOMERGE Make bluetooth switch not discoverable via SliceDeepLinkTrampoline
Bug: 244423101
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothSwitchPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDashboardFragmentTest
Test: manual test by test apk

Change-Id: I13562d227e06627fac33239a9d21fd405a18d012
2022-11-09 06:37:27 +00:00
Oli Lan
cbf1699cd7 Prevent exfiltration of system files via avatar picker. am: f70e351d1a am: 05ea36ddc5 am: ff5b6611cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19745058

Change-Id: Id74cd5fe28cec05a3fd87fc5434d28fad639e1b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-07 20:24:55 +00:00
Oli Lan
ff5b6611cf Prevent exfiltration of system files via avatar picker. am: f70e351d1a am: 05ea36ddc5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19745058

Change-Id: I8cc4562420648436abb478b686adb96c28d8163b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-07 19:39:55 +00:00
Oli Lan
05ea36ddc5 Prevent exfiltration of system files via avatar picker. am: f70e351d1a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19745058

Change-Id: If9321bf1035c0492396adf4ce3b6579dfe31c66b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-07 19:01:32 +00:00
Oli Lan
f70e351d1a Prevent exfiltration of system files via avatar picker.
This adds mitigations to prevent system files being exfiltrated
via the settings content provider when a content URI is provided
as a chosen user image.

The mitigations are:

1) Copy the image to a new URI rather than the existing takePictureUri
prior to cropping.

2) Only allow a system handler to respond to the CROP intent.

This is a fixed version of ag/17003629, to address b/239513606.

Bug: 187702830
Test: build and check functionality
Merged-In: I15e15ad88b768a5b679de32c5429d921d850a3cb
Change-Id: I98eea867f926c508456ec9bc654e24eeeffa0e54
2022-08-26 19:46:02 +01:00
Oli Lan
e2815b7e11 Merge "Revert "Prevent exfiltration of system files via user image settings."" into qt-dev am: b9bafa0d3d am: 05031cc574 am: 03b1a52977
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19449016

Change-Id: I017c55ae2e7770bd52f1daca54e2aed7be05cb5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 15:21:18 +00:00
Oli Lan
03b1a52977 Merge "Revert "Prevent exfiltration of system files via user image settings."" into qt-dev am: b9bafa0d3d am: 05031cc574
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19449016

Change-Id: I5a78c2328f8c68fb5bf15799a69479a82b8e7af7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 15:03:51 +00:00
Oli Lan
05031cc574 Merge "Revert "Prevent exfiltration of system files via user image settings."" into qt-dev am: b9bafa0d3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19449016

Change-Id: Icfcf27040f9402b736306cf19178feee9f2a774b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 14:46:20 +00:00
Oli Lan
b9bafa0d3d Merge "Revert "Prevent exfiltration of system files via user image settings."" into qt-dev 2022-08-22 14:27:57 +00:00
Julia Reynolds
cc3edfd2c7 Validate config activities with their rule owners am: 65b18b5e69
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19194215

Change-Id: I844f7e5eeefced63bca9d9baf7b41d1f9b7ac277
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 21:26:47 +00:00
Julia Reynolds
59ca26589e Validate config activities with their rule owners
Test: RoboTests
Bug: 189332346
Bug: 235823407
Change-Id: Iee1b1caca4d6eb2729feb872c3e4954b6c16519c
Merged-In: Iee1b1caca4d6eb2729feb872c3e4954b6c16519c
2022-08-10 14:20:54 +00:00
Julia Reynolds
b161a3b850 Validate config activities with their rule owners
Test: RoboTests
Bug: 189332346
Bug: 235823407
Change-Id: Iee1b1caca4d6eb2729feb872c3e4954b6c16519c
Merged-In: Iee1b1caca4d6eb2729feb872c3e4954b6c16519c
2022-08-10 14:20:22 +00:00
Julia Reynolds
65b18b5e69 Validate config activities with their rule owners
Test: RoboTests
Bug: 189332346
Bug: 235823407
Change-Id: Iee1b1caca4d6eb2729feb872c3e4954b6c16519c
Merged-In: Iee1b1caca4d6eb2729feb872c3e4954b6c16519c
2022-08-10 14:19:14 +00:00
Oli Lan
c0742e745d Revert "Prevent exfiltration of system files via user image settings."
This reverts commit 8950a90024.

Reason for revert: regression if multiple crop system crop handlers are present

Change-Id: Ib83dbb2f1109d26b7e85192379291bffef187e77
Merged-In: I15e15ad88b768a5b679de32c5429d921d850a3cb
2022-07-28 12:14:14 +00:00
Raphael Kim
d6353487cf Merge "Extract app label from component name in notification access confirmation UI" into qt-dev am: 94683c61b1 am: 839ce544aa am: 84bafc9fda
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18670793

Change-Id: I3825280fafc93e56ef239bf70d72b0bb56544f3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-05 02:50:25 +00:00
Raphael Kim
84bafc9fda Merge "Extract app label from component name in notification access confirmation UI" into qt-dev am: 94683c61b1 am: 839ce544aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18670793

Change-Id: I13426af81ec5970befc29118f883a08d28c8a986
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-05 02:32:26 +00:00
Raphael Kim
839ce544aa Merge "Extract app label from component name in notification access confirmation UI" into qt-dev am: 94683c61b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18670793

Change-Id: Ic145c489bd89fbc822ee48bfc14193c62321d355
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-05 02:14:41 +00:00
Raphael Kim
94683c61b1 Merge "Extract app label from component name in notification access confirmation UI" into qt-dev 2022-06-05 01:54:28 +00:00
Tsung-Mao Fang
99a7a61ba9 [DO NOT MERGE] Fix can't change notification sound for work profile. am: edf4416177
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18704664

Change-Id: I97954b12a7385a4cd5caabb19c030744ae6895f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 00:20:36 +00:00
Arc Wang
58880a0bef [DO NOT MERGE] Fix Settings crash when setting a null ringtone am: d94b73b304
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356598

Change-Id: Id5b31b30de1883d7d673fc0de60419fca7a22e86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 00:20:35 +00:00
Arc Wang
5eabdc88f0 Merge changes from topic "presubmit-am-93b3a992dd6c4622a633bca394ada8e5-qt-dev" into qt-dev
* changes:
  [DO NOT MERGE] Fix can't change notification sound for work profile.
  [DO NOT MERGE] Fix Settings crash when setting a null ringtone
2022-06-03 23:27:16 +00:00
Arc Wang
481113b6a3 Merge changes from topic "presubmit-am-93b3a992dd6c4622a633bca394ada8e5-rvc-dev" into rvc-dev
* changes:
  [DO NOT MERGE] Fix can't change notification sound for work profile.
  [DO NOT MERGE] Fix Settings crash when setting a null ringtone
2022-06-03 23:27:07 +00:00
Arc Wang
688ec25ca8 Merge changes from topic "presubmit-am-93b3a992dd6c4622a633bca394ada8e5-rvc-qpr-dev" into rvc-qpr-dev
* changes:
  [DO NOT MERGE] Fix can't change notification sound for work profile.
  [DO NOT MERGE] Fix Settings crash when setting a null ringtone
2022-06-03 23:26:56 +00:00
Lin Yuan
4daf65ea3b RESTRICT AUTOMERGE Fix: policy enforcement for location wifi scanning am: 9eff8f7a8d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18670860

Change-Id: I879d097018e3d4f99d9a8e9f788820a0729d8b99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 20:33:48 +00:00
Lin Yuan
d78ed7aa73 RESTRICT AUTOMERGE Fix: policy enforcement for location wifi scanning am: 78799a550a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18696386

Change-Id: I1d6ccb2b76503875626f5422db30b90442114f12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 20:32:59 +00:00
Lin Yuan
d765af048a Merge "RESTRICT AUTOMERGE Fix: policy enforcement for location wifi scanning" into qt-dev 2022-06-02 19:59:49 +00:00
Lin Yuan
3a95e552c6 Merge "RESTRICT AUTOMERGE Fix: policy enforcement for location wifi scanning" into rvc-dev 2022-06-02 19:59:42 +00:00
TreeHugger Robot
165c11c0da Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev am: 2f184b0ff4 am: e3bbadb7df am: 6fd7cf1993
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18158869

Change-Id: I808a8ab16e700325ec93b028e22a58215fbdbbe8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 07:58:27 +00:00
TreeHugger Robot
6fd7cf1993 Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev am: 2f184b0ff4 am: e3bbadb7df
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18158869

Change-Id: I6c7835e9885cf02ba167a8f4ac1c564bad511e6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 07:34:09 +00:00
TreeHugger Robot
e3bbadb7df Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev am: 2f184b0ff4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18158869

Change-Id: Ia3a38063419fccfc6e1be8135180a3a433ebbd23
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 07:15:36 +00:00
TreeHugger Robot
2f184b0ff4 Merge "Do not let guest user disable secuer nfc via SettingsSlice" into qt-dev 2022-06-02 06:52:53 +00:00
Tsung-Mao Fang
edf4416177 [DO NOT MERGE] Fix can't change notification sound for work profile.
Use correct user id context to query the type,
so we won't get empty result unexpectedly.

If we get the null result, then we won't set sound sucessfully.

Bug: 233580016
Bug: 221041256
Test: Manual test and set work profile sound works.
Change-Id: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
Merged-In: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
2022-06-02 10:57:50 +08:00
Tsung-Mao Fang
32145cc362 [DO NOT MERGE] Fix can't change notification sound for work profile.
Use correct user id context to query the type,
so we won't get empty result unexpectedly.

If we get the null result, then we won't set sound sucessfully.

Bug: 233580016
Bug: 221041256
Test: Manual test and set work profile sound works.
Change-Id: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
Merged-In: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
2022-06-02 10:55:47 +08:00
Tsung-Mao Fang
0eb3011fc2 [DO NOT MERGE] Fix can't change notification sound for work profile.
Use correct user id context to query the type,
so we won't get empty result unexpectedly.

If we get the null result, then we won't set sound sucessfully.

Bug: 233580016
Bug: 221041256
Test: Manual test and set work profile sound works.
Change-Id: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
Merged-In: I7f8fb737a7c6f77a380f3f075a5c89a1970e39ad
2022-06-02 10:54:19 +08:00
Arc Wang
d94b73b304 [DO NOT MERGE] Fix Settings crash when setting a null ringtone
Ringtone picker may callback a null ringtone Uri
if users select None.

This change pass null ringtone Uri to RingtoneManager
and return.

Bug: 232502532
Bug: 221041256
Test: maunal
      Settings - Sound & Vibration -> Phone ringtone
      -> My Sounds -> None
Change-Id: I044b680871472a3c272f6264c4ef272df542112e
Merged-In: I044b680871472a3c272f6264c4ef272df542112e
2022-06-02 09:52:17 +08:00
Arc Wang
973a46134b [DO NOT MERGE] Fix Settings crash when setting a null ringtone
Ringtone picker may callback a null ringtone Uri
if users select None.

This change pass null ringtone Uri to RingtoneManager
and return.

Bug: 232502532
Bug: 221041256
Test: maunal
      Settings - Sound & Vibration -> Phone ringtone
      -> My Sounds -> None
Change-Id: I044b680871472a3c272f6264c4ef272df542112e
Merged-In: I044b680871472a3c272f6264c4ef272df542112e
2022-06-02 09:51:42 +08:00
Arc Wang
e3134c4a04 [DO NOT MERGE] Fix Settings crash when setting a null ringtone
Ringtone picker may callback a null ringtone Uri
if users select None.

This change pass null ringtone Uri to RingtoneManager
and return.

Bug: 232502532
Bug: 221041256
Test: maunal
      Settings - Sound & Vibration -> Phone ringtone
      -> My Sounds -> None
Change-Id: I044b680871472a3c272f6264c4ef272df542112e
Merged-In: I044b680871472a3c272f6264c4ef272df542112e
2022-06-02 09:51:05 +08:00
Raphael Kim
8d749c55f4 Extract app label from component name in notification access confirmation UI
Bug: 228178437
Test: Manually tested on POC
Change-Id: I8613d9b87a53d4641c0689bca9c961c66a2e9415
Merged-In: I8613d9b87a53d4641c0689bca9c961c66a2e9415
2022-06-01 22:24:39 +00:00
Lin Yuan
78799a550a RESTRICT AUTOMERGE Fix: policy enforcement for location wifi scanning
Make DISALLOW_CONFIG_LOCATION effectively disallow wifi scanning and
bluetooth scanning settings for location services.

screenshots: https://screenshot.googleplex.com/AqvEW2kTrQT2Ufp

Bug: 228315522
Bug: 228315529
Test: manually on sunfish flashed with rvc.
Change-Id: I6ef64a34764e52de7b461e87ea0af40a6d050587
2022-06-01 07:17:47 -04:00
Lin Yuan
9eff8f7a8d RESTRICT AUTOMERGE Fix: policy enforcement for location wifi scanning
Make DISALLOW_CONFIG_LOCATION effectively disallow wifi scanning and
bluetooth scanning settings for location services.

screenshots: https://screenshot.googleplex.com/49nR5HQ8g5bgNVq

Bug: 228315522
Bug: 228315529
Test: on device
Change-Id: I92b22567011c32f0874bcecb3898ef678bb549a1
2022-05-31 21:51:40 -04:00