Commit Graph

6509 Commits

Author SHA1 Message Date
Songchun Fan
8b54307ce6 [SettingsProvider] add maxTargetSdk in @Readable
New annotation field that allows Settings key owners to specify the
maximum target sdk level of the caller app allowed to read the
hidden settings key.

Test: atest android.appsecurity.cts.ReadableSettingsFieldsTest
BUG: 187314081
Change-Id: Ibb603df4c8bca75e3788258e69862595c22e5154
2021-05-27 15:00:41 -07:00
Beth Thibodeau
8beb8407ec Merge "Add recommendation setting and remove app settings" into sc-dev 2021-05-27 16:19:17 +00:00
Beth Thibodeau
18c36e88a8 Add recommendation setting and remove app settings
- Add a new setting to control whether smartspace recommendations are
enabled
- Remove setting to block individual apps from resumption

Bug: 187925818
Test: atest MediaDataManagerTest
Change-Id: If1d5f4c5a204e655a90dd2cca6687acdfcd12fec
2021-05-26 14:27:54 -04:00
Soonil Nagarkar
1ea818347e Update location bypass allowlist
Create a new DeviceConfig entry to replace the prior Settings entry on
which the location ignore settings allowlist is based. This allows us to
allowlist based on attribution tag, and eliminate holes for large
applications.

Test: manual + CTS + GTS
Bug: 187421886
Change-Id: I31e61db79b93e202bd8c66efae1bb5aaf0c88ff5
2021-05-21 09:25:47 -07:00
Matt Pietal
abc6e0c51b Controls - Use new privacy setting
Wallet/controls privacy setting has been moved and split into
two. Migrate the old setting if the user had previously used
controls. From the QS tile, launch the activity differently when on
the lock screen.

Fixes: 188175341
Test: atest DeviceControlsTileTest
Change-Id: If38ae1c3f0bcc8e0e75146dda09276c13a0604e9
2021-05-18 10:14:32 -04:00
Tom Natan
1d2868c45b Merge "Add @TestApi to NAMESPACE_CONSTRAIN_DISPLAY_APIS." into sc-dev 2021-05-18 08:25:45 +00:00
Peiyong Lin
6ea3ca56f5 Add a secure settings to control game dashboard shortcut.
Add a secure settings to control the game dashboard shortcut always on
option for all games.

Bug: b/185822999
Test: manual
Change-Id: I96b6ebd6c25230e8f12f3871ef1e78fcce9225e8
2021-05-18 00:19:39 +00:00
TreeHugger Robot
e265a992a6 Merge "Intent to LockscreenSettings page on wallet overflow menu clicked." into sc-dev 2021-05-17 17:48:18 +00:00
Neil Fuller
9f47ce098b Merge "Add device_config cmds for disabling syncs" into sc-dev 2021-05-17 16:17:12 +00:00
Yandry Perez Clemente
b19fc200dc Add a unique id to Perfetto trace and ANR dropbox header.
The unique id is added so that the trace and ANR can be easily linked
server side. Also moves the logging of the ANR atom before the ANR dump
takes place so that the Perfetto trace captures data closer to the point
in time when the ANR happens.

Bug: b/188122403
Test: Manual.
 1. Enabled the flag:

 adb shell device_config put perfetto_error_logger append_perfetto_uuid
 true

 2. Triggered an ANR using a test app. Logs from PerfettoTraceErrorLogger:

 adb logcat -s PerfettoTraceErrorLogger
 --------- beginning of main
 04-30 14:07:02.527 1782 12583 I PerfettoTraceErrorLogger: Pushing trace
 counter: 6c555dc6-3f46-4997-8844-706d91156600#PerfettoMonitoredCrash

 3. The UUID is present in the ANR dropbox headers:

 adb shell dumpsys dropbox data_app_anr --print | grep
 6c555dc6-3f46-4997-8844-706d91156600
 PerfettoUUID: 6c555dc6-3f46-4997-8844-706d91156600

Change-Id: If7110692cb0856e693f595e24b067ce1bc7d0a38
2021-05-17 11:35:29 +00:00
tomnatan
3d09726f29 Add @TestApi to NAMESPACE_CONSTRAIN_DISPLAY_APIS.
Bug: 187408243
Test: NA
Change-Id: I7e27118b5cc52cf325f936b454beb2b1995d2df9
2021-05-17 09:11:08 +00:00
Silin Huang
dbc335b1c1 Intent to LockscreenSettings page on wallet overflow menu clicked.
see demo:
https://drive.google.com/file/d/1qO2b5hS3tE8KQt1PtJBIeEJ8r_ti8PWw/view?usp=sharing&resourcekey=0-zZhi6fNdZGnveawEh3fxRA

Test: manual
Bug: 186496392
Change-Id: Id68faf3e2746f66e6633d5a25e64de3f0833d3ef
2021-05-17 02:57:30 +00:00
Neil Fuller
ad3d45a642 Add device_config cmds for disabling syncs
This adds a "sync disabled" mode which disables bulk updates to
device_config (AKA server flags). This is intended for use during
automated and manual tests that use device_config settings to set the
device into specific states for tests. Without this, devices can sync at
an arbitrary point during a test which can undo device_config changes
the tests have made and cause them to fail / flake.

This mechanism is independent of the mechanism used to sync, thereby
making it suitable for use in CTS or other AOSP tests, i.e. to disable
sync regardless of whether GMS core or an alternative is handling the
sync.

Test: atest core/tests/coretests/src/android/provider/DeviceConfigTest.java
Bug: 185786624
Change-Id: Icd0ce798642eb136dc8b9b1a58a4ecbc6212fdba
2021-05-14 11:26:13 +01:00
George Chang
c80d117764 Merge "[SettingsProvider] Remove @Readable for NFC_PAYMENT_DEFAULT_COMPONENT" into sc-dev 2021-05-12 16:09:17 +00:00
Tom Natan
e68bdc6c8b Merge "Add CONSTRAIN_DISPLAY_APIS namespace." into sc-dev 2021-05-12 15:56:01 +00:00
tomnatan
92084dc6ae Add CONSTRAIN_DISPLAY_APIS namespace.
Bug: 187408243
Test: manual
Change-Id: I62fc909eafec83a9da84b9f6b4897610ceaa07f5
2021-05-12 09:10:15 +00:00
PETER LIANG
74a435858a Merge changes from topic "a11y_floating_menu_migration_tooltip" into sc-dev
* changes:
  Add the new migration tooltip for accessibility floating menu.(2/n)
  Add the new migration tooltip for accessibility floating menu.(1/n)
  Add key ACCESSIBILITY_FLOATING_MENU_MIGRATION_TOOLTIP_PROMPT.
2021-05-12 02:59:10 +00:00
John Li
ebad1be9bb Merge "Add javadoc for Secure.UI_TRANSLATION_ENABLED" into sc-dev 2021-05-11 00:45:55 +00:00
John Li
9113ce63fa Add javadoc for Secure.UI_TRANSLATION_ENABLED
Bug: 186240729
Test: manual
Change-Id: I4b997e9958c2272019138ec25c87d021da241b4e
2021-05-10 19:06:36 +08:00
Neil Fuller
0541a04273 Remove @GuardedBy on a final, immutable field
Remove @GuardedBy on a final, immutable field as it is causing
errorprone warnings on a work-in-progress commit.

ContentProviderHolder.mUri is accessed in multiple places without
holding mLock, and it is final and documented as immutable so should be
safe to access without mLock. This commit should reduce ErrorProne
warnings now and in future.

Bug: 185786624
Test: build / treehugger only
Change-Id: Ic7fbe550ff6f538f336cfb859f66daa94844ca28
2021-05-07 10:56:01 +01:00
George Chang
c484b05bf2 [SettingsProvider] Remove @Readable for NFC_PAYMENT_DEFAULT_COMPONENT
BUG: 182283321
Test: atest CtsNfcTestCases
Test: atest android.appsecurity.cts.ReadableSettingsFieldsTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.nfc
Change-Id: Ic01511201dc1e5e9009ecc41cd8611c503702f79
2021-05-06 16:16:20 +08:00
Peter_Liang
0c6aa86ea7 Add key ACCESSIBILITY_FLOATING_MENU_MIGRATION_TOOLTIP_PROMPT.
The key used to show the migration information related to
the accessibility floating menu.

Bug: 175365399
Test: atest SettingsProviderTest
Change-Id: Ifabc412b990c72ad345bab2d5d8539a57bd6ca5d
2021-05-05 19:24:30 +08:00
Bowgo Tsai
d5b4a59bc0 Merge "Revert "[SettingsProvider] Remove @Readable for NFC_PAYMENT_DEFA..."" into sc-dev 2021-04-29 09:29:50 +00:00
Bowgo Tsai
42c0359ff4 Revert "[SettingsProvider] Remove @Readable for NFC_PAYMENT_DEFA..."
Revert "Add an exception for Settings.Secure.NFC_PAYMENT_DEFAULT..."

Revert submission 14326766-b/174151290

Reason for revert: potential test error for b/186717555
Reverted Changes:
I97fcd5550:[SettingsProvider] Remove @Readable for NFC_PAYMEN...
I6e55bef75:Add an exception for Settings.Secure.NFC_PAYMENT_D...

Bug: 186717555
Bug: 182283321
Bug: 174151290
Change-Id: Ib84c57b855ffe10870fda2568a7499746f0d2335
2021-04-29 07:44:33 +00:00
Bill Lin
9df0e2bdb3 Merge "1/ Add ONE_HANDED_MODE_ACTIVATED secure settings for shortcut" into sc-dev 2021-04-29 04:49:42 +00:00
George Chang
469c7c8343 Merge "[SettingsProvider] Remove @Readable for NFC_PAYMENT_DEFAULT_COMPONENT" into sc-dev 2021-04-29 00:13:08 +00:00
George Chang
8347fb86d4 [SettingsProvider] Remove @Readable for NFC_PAYMENT_DEFAULT_COMPONENT
Bug: 182283321
Bug: 174151290
Test: atest CtsNfcTestCases
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.nfc
Change-Id: I97fcd555072740cb3c0d80c9bb38edab5087195c
2021-04-28 12:35:12 +00:00
Bill Lin
6b7167d88a 1/ Add ONE_HANDED_MODE_ACTIVATED secure settings for shortcut
A new requirement to add A11y shortcut for One Handed Mode feature

- The shortcut action is enter or exit one handed mode
- ONE_HANDED_MODE_ACTIVATED = 0 /* false */ : STATE_NONE
- ONE_HANDED_MODE_ACTIVATED = 1 /* true */  : STATE_ACTIVE

Compare to enabled or disabled (ONE_HANDED_MODE_ENABLED)
- ONE_HANDED_MODE_ENABLED = 0 /* false */ : Disable function
- ONE_HANDED_MODE_ENABLED = 1 /* true */  : Enabled function

Test: manual
Test: make
Bug: 182425480
Change-Id: Iee911631a6734af7eb742e1206d2b9b75b694969
2021-04-28 00:44:45 +00:00
Songchun Fan
768b0f8b7a [SettingsProvider] hide ALWAYS_ON_VPN_APP
BUG: 177239818
Test: builds
Change-Id: I4ccbf8b567ea3a6ab2cfd3001a9781a4ba821416
2021-04-26 20:50:36 +00:00
Galia Peycheva
57ef720249 Merge "Use global setting instead of forceWindowBlurDisabled" into sc-dev 2021-04-26 11:42:49 +00:00
Galia Peycheva
85bb3e4da0 Use global setting instead of forceWindowBlurDisabled
This CL removes the existing TestApi
WindowManager#setForceCrossWindowBlurDisabled and replaces it
with Settings.Global#ENABLE_WINDOW_BLURS.

Bug: 14186649
Test: m && atest BlurTests
Change-Id: Ia15b7932ea973a9ed195c507558cdc71f194b366
2021-04-23 11:13:43 +02:00
Neil Fuller
e1aaa7f9d1 Merge "Update settings for Date / Time / Zone" into sc-dev 2021-04-22 09:31:08 +00:00
Neil Fuller
f41708d93d Merge "Remove Settings.System.DATE_FORMAT" into sc-dev 2021-04-21 20:09:40 +00:00
Matt Pietal
a2be0990e2 Merge "Remove "Device Controls" from Settings" into sc-dev 2021-04-21 11:31:33 +00:00
Neil Fuller
8b8d4f8684 Remove Settings.System.DATE_FORMAT
Remove references to Settings.System.DATE_FORMAT and mark it as clearly
deprecated.

It was probably made obsolete some time before kitkat. There were still
some references in view code up to lollipop (removed in change
Ib77a8e7727d027cae39d5e6f431cac1d1ff8a121). During marshmallow / nougat
there were no references, then references were added in backup code in
oreo. This change is intended to make it more obvious that this setting
is obsolete.

Bug: 185884644
Test: build only
Change-Id: I12441541bc3ca0e012cee64d4c784a0ce8233715
2021-04-20 20:22:41 +01:00
Neil Fuller
dfa685c683 Update settings for Date / Time / Zone
Update SettingsProtoDumpUtil / secure.proto to reference the new (user
scoped) location_time_zone_detection_enabled setting that has been added
for S.  This has been added in a "DateTime" message to reflect the
SettingsUI structure.

For consistency with secure.proto and the settings strings, global.proto
and the associated SettingsProtoDumpUtil code has updated to rename the
"Auto.time" and "Auto.time_zone" proto fields to "DateTime.auto_time"
and "DateTime.auto_time_zone". This is a binary compatible change as
the field IDs have not been changed.

Note: The "time_12_24" and "date_format" settings, which are user-scoped
settings from "Settings.System" have been left for a future release
besides some minor docs improvements. See bug 185884644.

This change also improve the docs for settings that are associated with
date and time.

Bug: 151304765
Bug: 185884644
Test: build / treehugger
Change-Id: If2daf3f530bd1add7a0a5cc3260221ea3ad8952d
2021-04-20 18:46:56 +01:00
Matt Pietal
73702413f8 Remove "Device Controls" from Settings
Both device controls and wallet have moved to new areas outside of the
power menu. In step 1, we are deprecating the device controls settings,
as the user can now fully control availability within the new Quick
Settings device controls tile.

Bug: 185597511
Test: atest ControlsControllerImplTest ControlsComponentTest DeviceControlsTileTest ControlsRequestDialogTest
Change-Id: Ifdbb83dfd35263d62c9fd3dc67699769f9c9f408
2021-04-20 13:53:18 +00:00
Mady Mellor
b5a783d611 Move bubble setting to secure table & support multiuser
* Move bubbles setting from the global table to the secure
  table, this should be a per-user setting
* Update step in SettingsProvider that adds the secure
  setting based on the value of the previous global, or if
  the user is managed, it checks if the owner of the managed
  user has a secure setting & uses the value from that to
  insert the new setting.
* Adds the secure setting to the "cloned to profile"
  group since it should follow the setting of the profile
  owner.
* PreferencesHelper tracks this value per-user.

Bug: 173408780
Test: atest PreferencesHelperTest NotificationManagerServiceTest BubbleExtractorTest
Change-Id: I261364890fcc54fb2791e628b41c07aeddde3974
2021-04-19 18:51:01 -07:00
TreeHugger Robot
801ff1c44b Merge changes from topic "biometric_settings" into sc-dev
* changes:
  Move from face-specific settings to generic biometric settings
  Add secure setting for using biometric
2021-04-15 04:12:58 +00:00
Hall Liu
4d139ff936 Merge "Rename storeCallComposerPictureAsUser" into sc-dev 2021-04-14 22:02:25 +00:00
Mill Chen
6e5f0868c6 Add secure setting for using biometric
Bug: 183449119
Test: builds
Change-Id: I885cd42a46d4d0cdd6f8bb5cebaf34006bf542b8
2021-04-13 17:44:07 -07:00
Hall Liu
96d703917d Rename storeCallComposerPictureAsUser
Remove the AsUser portion of the name and the userhandle argument to
comply with api guidelines, and instead take the user from the context
that's passed in instead.

Fixes: 179727265
Test: atest CallLogTest
Change-Id: Iad614f333d7bae1baab41b3d643688338a60d4c2
2021-04-13 17:03:44 -07:00
John Li
235c16235a Merge "Add @SystemApi for Secure.UI_TRANSLATION_ENABLED" into sc-dev 2021-04-13 15:55:15 +00:00
Daniel Sandler
f34519a523 Merge "Power + Volume up key chord can now be configured." into sc-dev 2021-04-13 04:56:27 +00:00
John Li
221de3457b Add @SystemApi for Secure.UI_TRANSLATION_ENABLED
Bug: 177299699
Test: manual
Change-Id: I711d078281ae9cc17ebb21e6c3f857caad31016a
2021-04-13 02:57:45 +00:00
Songchun Fan
1b689fe01b Merge "[SettingsProvider] specify settings type in the comments" into sc-dev 2021-04-12 19:27:26 +00:00
Chloris Kuo
cfab1005d3 Merge "NAS Settings Migration" into sc-dev 2021-04-12 17:16:57 +00:00
Dan Sandler
069278cdb7 Power + Volume up key chord can now be configured.
Device default value set in config_keyChordPowerVolumeUp in
config.xml; can be overridden for all users with
Settings.Global.KEY_CHORD_POWER_VOLUME_UP.

Value may be one of:

    0 - no-op
    1 - vibrate mode (current AOSP default behavior)
    2 - launch assistant

Bug: 179673796
Test: adb shell settings put global key_chord_volume_up <0, 1, or 2>
      adb shell dumpsys window | grep mPowerVolUpBehavior
      adb shell input keycombination POWER VOLUME_UP
Change-Id: I0e03155bdbe61d9fdd6838fe2c860749cf360907
2021-04-12 12:05:52 -04:00
Songchun Fan
8a86b1dd88 [SettingsProvider] specify settings type in the comments
BUG: 176866964
Test: Builds
Change-Id: Ib8150dbd00b002181204a8925d42fa9ff8a36fa7
2021-04-09 15:07:07 -07:00
Songchun Fan
3a4059f759 [SettingsProvider] allow test_only apps access @hide keys w/o @Readable
+ Also improve error message

BUG: 183436286
BUG: 183709745
Test: atest android.appsecurity.cts.ReadableSettingsFieldsTest
Change-Id: I17224d213d707f6f359aa17f1b745bf508208de8
2021-04-09 19:03:51 +00:00