Commit Graph

52342 Commits

Author SHA1 Message Date
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
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
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
Lin Yuan
d765af048a Merge "RESTRICT AUTOMERGE Fix: policy enforcement for location wifi scanning" into qt-dev 2022-06-02 19:59:49 +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
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
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
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
Hugh Chen
06139d3ffc RESTRICT AUTOMERGE Make bluetooth not discoverable via SliceDeepLinkTrampoline
- Don't let device be discovered when the user launch "Connected Devices
  settings" through SliceDeepLinkTrampoline.

Bug: 228450811
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify the device is not discoversable when open "Connected settings"
through test apk.

Change-Id: I5490b58675b1fd9fc36305766867f65caa6ccb6c
(cherry picked from commit 205752dcf2)
2022-05-12 06:20:57 +00:00
Arc Wang
640eab60f2 [DO NOT MERGE] Verify ringtone from ringtone picker is audio
To improve privacy.

Bug: 221041256
Test: atest com.android.settings.DefaultRingtonePreferenceTest
Change-Id: I0a9ca163f5ae91b67c9f957fde4c6db326b8718d
Merged-In: I0a9ca163f5ae91b67c9f957fde4c6db326b8718d
(cherry picked from commit e4c22580c9)
2022-05-10 01:43:16 +00:00
Jack Yu
2290b0af8c Do not let guest user disable secuer nfc via SettingsSlice
Do not let guest user switch the secure nfc preferernce setting.

Bug: 228314987
Test: manual
Change-Id: I60a832e32d83bb57d968af2f8b92d94e2ac7c6a2
2022-05-04 18:06:04 +08:00
Bill Yi
392df50da0 Import translations. DO NOT MERGE ANYWHERE
BUG:205460459

Auto-generated-cl: translation import
Change-Id: I67386b7749b6575747c0507e3841fa404c6a69f4
2022-04-28 18:23:10 +00:00
Edgar Wang
b3eecdd13d Fix LaunchAnyWhere in AppRestrictionsFragment
If the intent's package equals to the app's package, this intent
will be allowed to startActivityForResult.
But this check is unsafe, because if the component of this intent
is set, the package field will just be ignored. So if we set the
component to any activity we like and set package to the app's
package, it will pass the assertSafeToStartCustomActivity check
and now we can launch anywhere.

Bug: 223578534
Test: robotest and manual verify
Change-Id: I40496105bae313fe5cff2a36dfe329c1e2b5bbe4
(cherry picked from commit 90e095dbe3)
2022-04-13 04:47:24 +00:00
Arc Wang
c4121c15e4 Hide non-system overlay window on ActivityPicker
To improve security.

Bug: 181962311
Test: manual
      Show an AlertDialog and observe if it will hide after below command.
      adb shell am start -a android.intent.action.PICK_ACTIVITY -n com.android.settings/.ActivityPicker
Change-Id: I800f0f39a469a95eb36eeaaeb2aa60a39fd916d3
Merged-In: I800f0f39a469a95eb36eeaaeb2aa60a39fd916d3
2022-04-07 03:44:12 +00:00
Bonian Chen
d0888970a4 Merge "[Settings] Move display of VPN version into summary text" into qt-dev 2022-04-07 00:08:08 +00:00
TreeHugger Robot
74ff164972 Merge "Prevent exfiltration of system files via user image settings." into qt-dev 2022-04-01 12:42:31 +00:00
lucaslin
52e863b5a2 Hide private DNS settings UI in Guest mode
Hide private DNS settings UI in Guest mode to prevent guest
users modifying global private DNS settings.

Bug: 206987762
Test: 1. make RunSettingsRoboTests \
         ROBOTEST_FILTER=PrivateDnsPreferenceControllerTest
      2. Switch to Guest user and check if the private DNS UI is
         hidden or not.
Change-Id: Iebfb8684da3be32110decd9e8447dd07b1c40387
2022-03-09 02:54:12 +00:00
Oli Lan
8950a90024 Prevent exfiltration of system files via user image settings.
This is a backport of ag/17005706.

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.

Bug: 187702830
Test: build and check functionality
Change-Id: Ia6314b6810afb5efa0329f3eeaee9ccfff791966
Merged-In: I15e15ad88b768a5b679de32c5429d921d850a3cb
2022-03-03 13:18:16 +00:00
Jack Yu
4e543a38f6 Do not let guest user disable secure nfc
Bug: 209446496
Test: manual
Merged-In: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
Change-Id: I7253f7f08fde04e30400a30d9a0d24f1ceff04b0
(cherry picked from commit d9e3e6e4b1)
2022-02-02 17:44:55 +00:00
TreeHugger Robot
50b65a168a Merge "Add caller check to com.android.credentials.RESET" into qt-dev 2022-01-13 18:50:36 +00:00
Edgar Wang
f57d75f127 Fix bypass CALL_PRIVILEGED permission in AppRestrictionsFragment
In onReceive of AppRestrictionsFragment.java, there is a possible way to
start a phone call without permissions due to a confused deputy.
This could lead to local escalation of privilege with no additional
execution privileges needed.

We should not allow the restrictionsIntent to startActivity simply
because it resolves to multiple activities.
Instead, we should call resolveActivity and check the result's package
name is same as current package name, then it is safe to startActivity.

Bug: 200688991
Test: manual verify
Change-Id: Iaa2d3a9497c3266babe0789961befc9776a4db7a
Merged-In: Iaa2d3a9497c3266babe0789961befc9776a4db7a
(cherry picked from commit 359512cd95)
2022-01-07 04:23:50 +00:00
Alex Johnston
35e3d0c1b0 Add caller check to com.android.credentials.RESET
* Only the Settings app can reset credentials
  via com.android.credentials.RESET.
* com.android.credentials.INSTALL should still be
  callable by CertInstaller.

Manual testing steps:
* Install certificate via Settings
* Verify unable to reset certificates via test app
  provided in the bug (app-debug.apk)
* Verify able to reset certificates via Settings
* Verify com.android.credentials.INSTALL isn't changed

Bug: 200164168
Test: manual
Change-Id: I9dfde586616d004befbee529f2ae842d22795065
(cherry picked from commit 4c1272a921)
Merged-In: I9dfde586616d004befbee529f2ae842d22795065
2022-01-06 22:17:17 +00:00
Bonian Chen
8c0052d537 [Settings] Move display of VPN version into summary text
Move the display of version text within VPN into summary part of the
display, and limit the height of summary area.

Bug: 205460459
Test: install apk from b/205460459#comment3 and verify
Change-Id: I666b9db356feeebf04e3be688897c2d9110a5275
(cherry picked from commit 144f295d7a)
Merged-In: I666b9db356feeebf04e3be688897c2d9110a5275
2021-12-06 09:54:00 +00:00
TreeHugger Robot
7aa03c4821 Merge "RESTRICT AUTOMERGE Fix make Bluetooth discoverable without additional permission" into qt-dev 2021-11-09 06:59:11 +00:00
TreeHugger Robot
0e8d3e3c35 [automerger skipped] Merge "RESTRICT AUTOMERGE Fix make Bluetooth discoverable without additional permission" into pi-dev am: 5006367685 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16145004

Change-Id: I4363a8652c623e915daf6439e477385710a30726
2021-11-09 06:01:40 +00:00
TreeHugger Robot
5006367685 Merge "RESTRICT AUTOMERGE Fix make Bluetooth discoverable without additional permission" into pi-dev 2021-11-09 05:46:16 +00:00
Bill Yi
8736277f07 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 64149823f2 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16185416

Change-Id: Ifde1a3575cfe9250d965e658a384b3769a030a5e
2021-11-04 06:31:56 +00:00
Bill Yi
64149823f2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I31603b51131a4bb4423bf9c6f2c3ac32ff08a9d3
2021-11-03 23:44:20 +00:00
Bill Yi
8a69cc3921 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I31603b51131a4bb4423bf9c6f2c3ac32ff08a9d3
2021-11-03 16:41:21 -07:00
Yanting Yang
204f82d6c4 Rephrase dialog message of clear storage dialog for security concern am: 7fd0ece6f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16101569

Change-Id: I78d007987cc32a6673e1e843aa2b54d96c9e145c
2021-11-03 19:49:30 +00:00
Hugh Chen
f8cd68c6e2 RESTRICT AUTOMERGE Fix make Bluetooth discoverable without additional permission
- Only enable device can be discoverable when the user launch
  "Connected Devices settings" through settings and systemui

Bug: 194695497
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify the device is not discoversable when open "Connected settings"
through test apk.

Change-Id: Ia04ab759b737acf30b782f5c5831dd59f25fb257
(cherry picked from commit d3abbb9821)
2021-11-01 07:44:18 +00:00
Hugh Chen
d4e0ed2284 RESTRICT AUTOMERGE Fix make Bluetooth discoverable without additional permission
- Only enable device can be discoverable when the user launch
  "Connected Devices settings" through settings and systemui

Bug: 194695497
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify the device is not discoversable when open "Connected settings"
through test apk.

Change-Id: Ia04ab759b737acf30b782f5c5831dd59f25fb257
(cherry picked from commit d3abbb9821)
2021-11-01 07:37:33 +00:00
Yanting Yang
7fd0ece6f4 Rephrase dialog message of clear storage dialog for security concern
Bug: 193890833
Test: visual
Change-Id: I8f0b066de710169ee8b922c44b6519ca21b9c7ef
(cherry picked from commit 0c359da620)
2021-10-25 05:54:12 +00:00
Yanting Yang
7d22136fb0 Rephrase dialog message of clear storage dialog for security concern
Bug: 193890833
Test: visual
Change-Id: I8f0b066de710169ee8b922c44b6519ca21b9c7ef
(cherry picked from commit 0c359da620)
2021-10-25 05:53:42 +00:00
TreeHugger Robot
2642a3c73e Merge "BluetoothSecurity: Add BLUETOOTH_PRIVILEGED permission for pairing dialog" into qt-dev 2021-10-07 00:03:46 +00:00
Chen Chen
d96d13c4f1 BluetoothSecurity: Add BLUETOOTH_PRIVILEGED permission for pairing dialog am: aebca7f35b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15994984

Change-Id: Icee7ffd9cd3218bb4cd9fcb8fd1c37fc34274507
2021-10-06 21:18:45 +00:00
Chen Chen
65a63e76b1 BluetoothSecurity: Add BLUETOOTH_PRIVILEGED permission for pairing dialog
Bug: 194300867
Test: Build

Change-Id: I5a496df50550ea7ee6986c960e28ae3e4a056b4b
2021-10-06 18:52:10 +00:00
Chen Chen
aebca7f35b BluetoothSecurity: Add BLUETOOTH_PRIVILEGED permission for pairing dialog
Bug: 194300867
Test: Build

Change-Id: I5a496df50550ea7ee6986c960e28ae3e4a056b4b
2021-10-06 18:50:23 +00:00
Weng Su
3678155f90 Merge "[RESTRICT AUTOMERGE] Revert "Add comment to AndroidManifest"" into qt-dev 2021-10-06 18:47:29 +00:00
Weng Su
6a2624e500 [RESTRICT AUTOMERGE] Revert "Add permission checking to WifiDialogActivity"
Revert submission 15220072-add_permission_wifidialog-qt-dev

Reason for revert: rollback CLs to avoid compatibility risks
Reverted Changes:
I1535f6f2d:Add SafetyNet logging
If7ca069c8:Add permission checking to WifiDialogActivity

Bug: 185126813
Change-Id: I3f75adf5bf0eea037dc0c5dfbeeb22b35b2856b6
2021-10-05 03:37:51 +00:00
Weng Su
153b0f03f5 [RESTRICT AUTOMERGE] Revert "Add comment to AndroidManifest"
This reverts commit 4fb84a3737.

Reason for revert: rollback CLs to avoid compatibility risks

Bug: 185126813
Change-Id: I495cd723917db6405ef3b540a6f01eaeaf8a45fe
2021-10-05 03:24:14 +00:00
Weng Su
d05686b431 [RESTRICT AUTOMERGE] Revert "Add SafetyNet logging"
Revert submission 15220072-add_permission_wifidialog-qt-dev

Reason for revert: rollback CLs to avoid compatibility risks
Reverted Changes:
I1535f6f2d:Add SafetyNet logging
If7ca069c8:Add permission checking to WifiDialogActivity

Bug: 185126813
Change-Id: I42b77ac420d9438c741b28ce33bcadf1c74b19eb
2021-10-05 03:23:45 +00:00
Bill Yi
6718e1ee7b [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 88a0994ed8 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15608116

Change-Id: Ia7592c1857dab18371f6284e5f6583217b148be9
2021-08-19 18:13:12 +00:00
Bill Yi
88a0994ed8 Import translations. DO NOT MERGE ANYWHERE
BUG:167403112

Auto-generated-cl: translation import
Change-Id: Id5c579245cf72f10f4d15fcb69d24bcf58dd281a
2021-08-17 22:14:24 -07:00
Bill Yi
f391df2089 Import translations. DO NOT MERGE ANYWHERE
BUG:167403112

Auto-generated-cl: translation import
Change-Id: I64cf73c3bf8cfc4e1135a40d5c6fa26066fc287e
2021-08-17 22:10:17 -07:00
TreeHugger Robot
189d26ff2a Merge "Add comment to AndroidManifest" into qt-dev 2021-08-07 17:18:31 +00:00
Weng Su
62041d683b Add SafetyNet logging
- Add SafetyNet log if the calling package is no the permission for
result

Test: checked eventlog in the bugreport
Bug: 185126813

Merged-In: I1535f6f2ded2445702df0d723518b773cd094164
Change-Id: I1535f6f2ded2445702df0d723518b773cd094164
(cherry picked from commit 199528d460)
2021-07-07 08:22:17 +00:00
Weng Su
8800cdf527 Add permission checking to WifiDialogActivity
- Use getCallingPackage() to get calling package.

- Check if the calling package has ACCESS_COARSE_LOCATION or
ACCESS_COARSE_LOCATION permission.

- Only set result data to permission granted callers

Bug: 185126813
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Merged-In: If7ca069c842ed2bd1aed23f9d4041473c68a4dad
Change-Id: If7ca069c842ed2bd1aed23f9d4041473c68a4dad
(cherry picked from commit 71e728e934)
2021-07-07 08:06:29 +00:00
Weng Su
4fb84a3737 Add comment to AndroidManifest
- Wi-Fi result data will only be returned from WifiDialogActivity if the
calling package has location permission.

Test: add comment only, no test required.
Bug: 185126813

Merged-In: I81c4d801c4ee211f43a1688a62daaff3b47eae1a
Change-Id: I81c4d801c4ee211f43a1688a62daaff3b47eae1a
(cherry picked from commit 56a88885cc)
2021-07-06 07:49:49 +00:00