Commit Graph

6480 Commits

Author SHA1 Message Date
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
Chloris Kuo
3f03f51421 NAS Settings Migration
Change default NAS to AiAi for Pixel devices

Bug: 173106358
Test: manually on device, atest
Change-Id: I2fe0b3eed479188509df5ce65d1b2a1281e6c85a
2021-04-09 11:21:33 -07:00
Kriti Dang
7e6abece7d Merge "Adding unknown constant to AudioManager ENCODED_SURROUND_OUTPUT mode constants" into sc-dev 2021-04-09 12:51:31 +00:00
Kriti Dang
98fdb2616e Adding unknown constant to AudioManager ENCODED_SURROUND_OUTPUT mode constants
Bug: 184044740
Test: atest AudioManagerTest
Change-Id: I806df4aac6fbab5f32f66a7deac67ae8f71e3fdd
2021-04-08 15:01:55 +02:00
Jordan Liu
145e5e211b Merge "Update doc for getDefaultSmsPackage" into sc-dev 2021-04-07 18:51:31 +00:00
Marcus Hagerott
d05767a0af Merge "Improve SimPhonebookContract javadocs and qualifiers" am: e738f2f211 am: 77c1d68aa4 am: 38ff81afb3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649647

Change-Id: Ie046dd362b2b0c91ce7dfa6faa02e0c6d1741bdc
2021-04-07 17:08:07 +00:00
Marcus Hagerott
e738f2f211 Merge "Improve SimPhonebookContract javadocs and qualifiers" 2021-04-07 15:43:33 +00:00
Jordan Liu
192cfc6ea0 Update doc for getDefaultSmsPackage
Bug: 174445979
Test: no change to behavior
Change-Id: Ied4b7f5bcc2ff78f4c6f04e4c11b5a10cf463fcd
2021-04-06 22:05:27 +00:00
Winson
0bcdb9897c Change ACTION_APP_OPEN_BY_DEFAULT_SETTINGS to standard format
This was originally introduced as an @hide API, but was exposed as part
of changes to app links. The old constant value was maintained, but it
can be migrated to the standard format and Settings can just catch
both.

Bug: 184370492

Test: manual, test app that launches using action

Change-Id: I904bd816da6c20a1dfdb207f8d4d486bb7be5cd5
2021-04-02 12:47:43 -07:00
Neil Fuller
93a0dca3df Merge "Track API changes TimeZoneDetector -> TimeManager" into sc-dev 2021-04-01 11:01:41 +00:00
Neil Fuller
fddcb999c0 Track API changes TimeZoneDetector -> TimeManager
Methods were moved from TimeZoneDetector to TimeManager in commit
02d943f44d. This commit updates comments
to track.

Bug: 159891384
Test: None - comment change
Change-Id: I96c4c248f98041f88ff3372b575114c277b80620
2021-04-01 10:00:14 +01:00
Forrest Dunlap
f9063fb1ff Clarify resetToDefaults documentation.
Bug: 170157200

Change-Id: I4cf791795132d02289bf49b3a038990a5adbceb3
2021-03-31 17:03:41 +00:00
Matt Casey
4dddebe4b8 Merge "Revert "Revert "Add setting for touch gesture and long-press hom..."" into sc-dev 2021-03-30 14:23:10 +00:00
Jacky Kao
b599784e05 Merge "Logs magnification feature behavior. (2/2)." into sc-dev 2021-03-29 23:56:22 +00:00
Svet Ganov
8d2ed50604 Runtime permission attribution improvements
When an app is proxying access to runtime permission protected
data it needs to check whether the calling app has a permission
to the data it is about to proxy which leaves a trace in app ops
that the requesting app perofmed a data access. However, then the
app doing the work needs to get the protected data itself from the
OS which access gets attributed only to itself. As a result there
are two data accesses in app ops where only the first one is a
proxy one that app A got access to Foo through app B - that is the
one we want to show in the permission tracking UIs - and one
for the data access - that is the one we would want to blame on
the calling app, and in fact, these two accesses should be one -
that app A accessed Foo though B. This limitation requires fragile
one off workarounds where both accesses use the same attribution
tag and sys UI has hardcoded rules to dedupe. Since this is not
documented we cannot expect that the ecosystem would reliably
do this workaround in apps that that the workaround in the OS
would be respected by every OEM.

This change adds a mechaism to resolve this issue. It allows for
an app to create an attribution context for another app and then
any private data access thorugh this context would result in a
single app op blame that A accessed Foo though B, i.e. we no longer
have double accounting. Also this can be nested through apps, e.g.
app A asks app B which asks app C for contacts. In this case app
B creates an attribution context for app A and calls into app C
which creates an attribution context for app B. When app C gets
contacts the entire attribution chain would get a porper, single
blame: that C accessed the data, that B got the data from C, and
that A got the data form B. Furthermore, this mechanism ensures
that apps cannot forget to check permissions for the caller
before proxying private data. In our example B and C don't need
to check the permisisons for A and B, respectively, since the
permisisons for the entire attribution chain are checked before
data delivery. Attribution chains are not forgeable preventing
a bad actor to create an arbitrary one - each attribution is
created by the app it refers to and points to a chain of
attributions created by their corresponding apps.

This change also fixes a bug where all content provider accesses
were double counted in app ops due to double noting. While at
this it also fixes that apps can now access their own last ops.
There was a bug where one could not pass null getting the attributed
ops from a historical package ops while this is a valid use case
since if there is no attribution everything is mapped to the null
tag. There were some app op APIs not being piped thorough the app
ops delegate and by extension through the app ops policy. Also
now that we have nice way to express the permission chain in a
call we no longer need the special casing in activity manager to
handle content provider accesses through the OS. Fixed a bug
where we don't properly handle the android.os.shell calls with
an invlaid tag which was failing while the shell can do any tag.

Finally, to ensure the mechanims is validated and works end-to-end
we are adding support for a voice recognizer to blame the client
app for the mic access. The recognition service can create a blaming
context when opening the mic and if the mic is open, which would
do all permission checks, we would not do so again. Since changes
to PermissionChercker for handling attribution sources were made
the CL also hooks up renounced permissoins in the request permission
flow and in the permission checks.

bug:158792096
bug:180647319

Test:atest CtsPermissionsTestCases
     atest CtsPermissions2TestCases
     atest CtsPermissions3TestCases
     atest CtsPermissions4TestCases
     atest CtsPermissions5TestCases
     atest CtsAppOpsTestCases
     atest CtsAppOps2TestCases

Change-Id: Ib04585515d3dc3956966005ae9d94955b2f3ee08
2021-03-29 16:49:33 +00:00
Matt Casey
38ced457e0 Revert "Revert "Add setting for touch gesture and long-press hom..."
Revert "Revert "Hide long-press home animation when disabled by ..."

Revert submission 13998375-revert-13958909-mrcasey-lph-GNUFFHLQXH

Reason for revert: Reverting these CLs did not fix the test b/183684181
Reverted Changes:
Iac13fc450:Revert "Hide long-press home animation when disabl...
Ieb43607a8:Revert "Add setting for touch gesture and long-pre...

Change-Id: Ia92b0a1f19dc7423fe1b3796e14582169e58d203
2021-03-29 13:42:09 +00:00
TreeHugger Robot
894cde1030 Merge "[Settings] add readable tests to presubmit" into sc-dev 2021-03-29 11:52:22 +00:00
Kriti Dang
e713ee6c60 Merge changes from topic "cherrypick-Display settings HDR formats-mumvl547ah" into sc-dev
* changes:
  Handling Number Format Exception in DiscreteValueIntegerListValidator
  Hdr format settings [Backend]
2021-03-28 12:25:32 +00:00
Matt Casey
304bd59b3e Merge "Revert "Add setting for touch gesture and long-press home assist..."" into sc-dev 2021-03-25 21:28:34 +00:00
Matt Casey
fabc9f6f27 Revert "Add setting for touch gesture and long-press home assist..."
Revert "Hide long-press home animation when disabled by setting"

Revert submission 13958909-mrcasey-lph

Reason for revert: Possible test breakage b/183684181
Reverted Changes:
Iaaf39e76a:Hide long-press home animation when disabled by se...
I24ee67cf1:Add setting for touch gesture and long-press home ...

Change-Id: Ieb43607a8010b843fc643979953a266cbb84788f
2021-03-25 21:19:00 +00:00
Songchun Fan
1d70937fe7 Merge "[Settings] keys with @TestApi need to have @Readable" into sc-dev 2021-03-25 15:44:33 +00:00
Kriti Dang
b4775b02a7 Hdr format settings [Backend]
Added new APIs to DisplayManager to set the user disabled HDR formats,
and get/set if user disabled formats should be ignored or not.
These new settings are stored in Settings.Global.
Modified the implementation of Display#getHdrCapabilities to not return
the formats disabled by user.

Bug: 172905874
Test: atest CtsDisplayTestCases
Change-Id: I4841af251ee0e4938614b154d0c5239814ea7cd9
Merged-In: I4841af251ee0e4938614b154d0c5239814ea7cd9
2021-03-25 12:41:35 +00:00
Matt Casey
af29800df0 Merge "Add setting for touch gesture and long-press home assistant invocations" into sc-dev 2021-03-25 12:15:09 +00:00
Sudheer Shanka
d2cd698106 Merge "Add DeviceConfig namespace for media." into sc-dev 2021-03-25 06:56:08 +00:00
Ahaan Ugale
dadfd22e74 Merge "Introduce a default Voice IME concept." into sc-dev 2021-03-25 02:59:41 +00:00
Winson Chiu
5ae11b4a58 Merge "Expose the open by default settings screen to apps" into sc-dev 2021-03-25 02:20:37 +00:00
Ahaan Ugale
9672b2e58c Introduce a default Voice IME concept.
This is configured by the system config resource,
config_systemSpeechRecognizer, which also provides the default
VoiceRecognitionService and the holder for the SYSTEM_SPEECH_RECOGNIZER
role.

InputMethodManagerService updates the new DEFAULT_VOICE_INPUT_METHOD
setting and handles changes to the config_systemSpeechRecognizer value.

No updates are made through the Settings UpgradeController because any
updates that would be needed are already handled by the logic for config
value changes.

Testing:
1. Enable DEBUG logging in InputMethodManagerService.
2. $ m -j && adb remount && adb shell stop && adb sync && adb shell start
3. $ adb shell settings get secure enabled_input_methods; \
 adb shell settings get secure default_input_method; \
 adb shell settings get secure disabled_system_input_methods; \
 adb shell settings get secure default_voice_input_method
4. Check logcat to make sure nothing looks suspect.

Cases tested:
- IME wasn't already in the enabled IME list
- IME was already enabled
- no value for config_systemSpeechRecognizer
- new user added
- locale changed
- config package doesn't have an IME
- update without config value, then set a config value
- config value updated (when both values had valid IMEs)
- combinations of the above cases, as appropriate

Bug: 175480456
Test: manual - see above
Test: atest InputMethodUtilsTest
Test: atest CtsInputMethodTestCases --retry-any-failure
Change-Id: I1abdc145e3d5969fbb69811df2ca2e35c7a177e1
2021-03-24 23:07:21 +00:00
Songchun Fan
3f08960272 [Settings] add readable tests to presubmit
This will enforce the readable tests for changes made to Settings.java.

Test: atest
BUG: 183530680
Change-Id: Ie91350b29c10868cecd2c2fe4eba378278b3cb23
2021-03-24 22:37:44 +00:00
Marcus Hagerott
a6c9cd2fb7 Improve SimPhonebookContract javadocs and qualifiers
Test: atest CtsSimPhonebookProviderTestCases
Bug: 183395170
Change-Id: Id160092078f26908787b4b9a4fbe525825496875
2021-03-24 14:16:31 -07:00
Winson
b5ba585b39 Expose the open by default settings screen to apps
With the changes for app links v2, apps need a way to link users into
the domain selection screen if the app relies on opening web links
for some functionality.

To achieve that, this exposes the existing action,
ACTION_APP_OPEN_BY_DEFAULT_SETTINGS, from android.provider.Settings
and removes the permission needed to launch the relevant Activity,
since it's no longer required.

Note that this will also require a change to remove the enforcement
from the Activity declaration, which will be a follow up.

Bug: 178648367

Test: none, unhide API

Change-Id: I73231b9b4686ee67490ffe1526542b2f59c8089b
2021-03-24 12:43:06 -07:00