Commit Graph

2793 Commits

Author SHA1 Message Date
Adam Bookatz
48d81ecc6d Introduce concept of DockUser
Dreams and docking often refers to "user zero" or "system user".
But more generally, the special user for dreams or switching-to-on-docking
need not be user 0, and in fact won't be in certain modes. So this needs updating.

Test: the files mentioned in the topic
Bug: 257333623
Change-Id: Ic671c91c32e9bf24695b067ff97cf9fa65534b1e
2022-11-10 16:13:35 -08:00
Joshua Mccloskey
1eaa038b62 Revert^2 "Implement SFPS “require screen on to auth”"
8ce8db3891

Change-Id: I4aa716fb5b288ef6f92a5c403a1fd5e586e889d0
2022-11-01 16:45:02 +00:00
Song Chun Fan
900dd54f12 Merge "Maintain the users current value for STATUS_BAR_SHOW_VIBRATE_ICON" am: 6f9b963a27 am: b8b489d24c am: d8b146c75f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2265149

Change-Id: I0fb40203bc84d57c81dd63a31ed5bb0db16408dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-26 19:55:41 +00:00
Song Chun Fan
d8b146c75f Merge "Maintain the users current value for STATUS_BAR_SHOW_VIBRATE_ICON" am: 6f9b963a27 am: b8b489d24c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2265149

Change-Id: If161ea9529eb7000487a3930d03b564dff1582d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-26 19:47:02 +00:00
Song Chun Fan
b8b489d24c Merge "Maintain the users current value for STATUS_BAR_SHOW_VIBRATE_ICON" am: 6f9b963a27
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2265149

Change-Id: Iac8ba84efed3d1ef62baa13e45d72bc6a10ccdd6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-26 19:12:41 +00:00
Edward Savage-Jones
dad059300d Maintain the users current value for STATUS_BAR_SHOW_VIBRATE_ICON
Make sure not to overwrite any current user selection for
Secure.STATUS_BAR_SHOW_VIBRATE_ICON that the user may have
made.

Issue: 253992986
Test: Manual - see issue
Change-Id: I33155a27707e6d30ff56fb090c71b9670a98fc31
2022-10-26 14:10:45 +00:00
Riddle Hsu
1178705e53 Merge "Only set locale in config for updating locale" into tm-qpr-dev am: b553c74619 am: ada9d7accb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20235235

Change-Id: I88c62a628a57f8f39bd5d9b849372e0f74e0e430
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 14:18:11 +00:00
Riddle Hsu
ada9d7accb Merge "Only set locale in config for updating locale" into tm-qpr-dev am: b553c74619
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20235235

Change-Id: I1cb0b923aa4673e4d04abbf65f143d142cdb0ac5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-25 13:40:11 +00:00
Hai Zhang
5611f58784 Merge "Move TypedXml{Parser,Serializer} to modules utils package." 2022-10-25 02:44:29 +00:00
Theodore Dubois
77cf1fac87 Log the exception when parsing settings fails
Test: compile
Change-Id: Ifb96bff3e0bf35bcff2635c8d03a09ae5200ffa1
2022-10-24 14:38:37 -07:00
Iavor-Valentin Iftime
83fbf2407d Merge "Add RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO AppOp" 2022-10-24 17:57:06 +00:00
Valentin Iftime
8f7ee077c8 Add RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO AppOp
New AppOp to be used for near-field file-based audio transfer
  (ie. TV Remote Service) to allow audio recording
  regardless of sensor privacy state, because it is considered
 an intentional user interaction: hold-to-talk

 And new Global Settings and SensorPrivacyManager APIs for the
 opt-out toggle - as agreed with PWG.

Bug: 235618473
Test: manual

Change-Id: I95cdf8fa362b937609bdf834a82b05ec8375ac26
2022-10-24 17:52:49 +00:00
Reema Bajwa
fb71b9bc66 Merge "Add new setting key for credential manager Test: built locally Bug: 250713478" 2022-10-21 17:07:50 +00:00
Reema Bajwa
a8611b6af2 Add new setting key for credential manager
Test: built locally
Bug: 250713478

Change-Id: Icdaf9135f274b0b5dce24b5ec7a25aa09ba8c7ae
2022-10-21 17:05:30 +00:00
Hai Zhang
e55b8eeb28 Move TypedXml{Parser,Serializer} to modules utils package.
A subsequent change will actually move the files to the other git
project.

Bug: 243194720
Test: presubmit
Change-Id: If126bb68f74852528c4da8df79831b49b5129983
2022-10-21 04:28:13 -07:00
Song Chun Fan
f6ffe907b1 Merge "Add settings default handling for STATUS_BAR_SHOW_VIBRATE_ICON" am: 234f6fca5b am: 9ac600db5a am: 1d270f7a7f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2257564

Change-Id: I0081734838877a94b24c277cdd1ab54384af3537
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-20 17:59:30 +00:00
Song Chun Fan
1d270f7a7f Merge "Add settings default handling for STATUS_BAR_SHOW_VIBRATE_ICON" am: 234f6fca5b am: 9ac600db5a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2257564

Change-Id: I1691801f73eec63b3f6053d554bddcd116b1e044
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-20 17:51:56 +00:00
Song Chun Fan
9ac600db5a Merge "Add settings default handling for STATUS_BAR_SHOW_VIBRATE_ICON" am: 234f6fca5b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2257564

Change-Id: I4b3d09da10f471c3ffa4d2748fa468c26f33f7f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-20 17:05:29 +00:00
Riddle Hsu
03f0f57e6b Only set locale in config for updating locale
To update locale, it doesn't need a full configuration because
system only applied the diff of config from non-undefined fields.

IActivityManager#getConfiguration actually gets the configuration
according to the pid, which is process configuration. And process
configuration can be overridden by the activity running in its
process. So the returned value shouldn't be used to update the
system persistent configuration.

Therefore it is enough to use a new Configuration instance with
setting the necessary fields. This is also more efficient that
saves a binder call to system.

Bug: 253386061
Test: atest LocaleManagerTests
Change-Id: Icdce437fcf1a3bef0562cfc4dd5ad3ba52ea08ef
2022-10-20 14:41:47 +00:00
Songchun Fan
8d2ac39082 [RESTRICT AUTOMERGE] [SettingsProvider] mem limit should be checked before settings are updated am: de2ba563d7 am: d3378a107e am: 03a62db61a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20226664

Change-Id: Ibbd9c268d62cc84632d43e2e066fc5273cf85d0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 01:31:05 +00:00
Songchun Fan
03a62db61a [RESTRICT AUTOMERGE] [SettingsProvider] mem limit should be checked before settings are updated am: de2ba563d7 am: d3378a107e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20226664

Change-Id: I2098548ff2ad9f33aede1d17e6c81bdd21692e0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 01:01:05 +00:00
Songchun Fan
de2ba563d7 [RESTRICT AUTOMERGE] [SettingsProvider] mem limit should be checked before settings are updated
Previously, a setting is updated before the memory usage limit
check, which can be exploited by malicious apps and cause OoM DoS.

This CL changes the logic to checkMemLimit -> update -> updateMemUsage.

BUG: 239415861
Test: atest com.android.providers.settings.SettingsStateTest

(cherry picked from commit 8eeb92950f)
Merged-In: I20551a2dba9aa79efa0c064824f349f551c2c2e4
Change-Id: I20551a2dba9aa79efa0c064824f349f551c2c2e4
2022-10-18 19:32:19 +00:00
Matthew Small
6779234178 Merge "Adding new setting to communicate BTHM state to KeyGuard." 2022-10-17 16:04:53 +00:00
Edward Savage-Jones
8852a10117 Add settings default handling for STATUS_BAR_SHOW_VIBRATE_ICON
Make the Secure.STATUS_BAR_SHOW_VIBRATE_ICON default configurable

Bug: 253992986
Test: manual - see issue
Change-Id: Ibada490c823a47ef145d9b50cadd4838c687711e
2022-10-17 15:36:54 +02:00
Winson Chiu
b41437f51f Merge "Move SystemConfig to services.jar" 2022-10-14 20:06:56 +00:00
Song Chun Fan
e739ddf58c Merge "[SettingsProvider] fix byte count" 2022-10-14 18:43:56 +00:00
Song Chun Fan
9f7a34a4ac Merge "[SettingsProvider] key size limit for mutating settings" 2022-10-14 01:02:01 +00:00
Songchun Fan
e51a174c98 [SettingsProvider] fix byte count
Memory usage per package was limited by "bytes" but counted by
"character length". Every character is 2 bytes in Java. This CL fixes
the counting and also doubles the bytes limit so that it doesn't cause
any behavior changes.

BUG: 253499273
Test: atest com.android.providers.settings.SettingsStateTest
Change-Id: I7a8be794582c153adf43ec735d2563695ea1533d
2022-10-13 14:26:13 -07:00
Songchun Fan
783bcba343 [SettingsProvider] key size limit for mutating settings
Prior to targetSdk 22, apps could add random system settings keys which
opens an opportunity for OOM attacks. This CL adds a key size limit.

BUG: 239415997
Test: manual; will add cts test
Change-Id: Ic9e88c0cc3d7206c64ba5b5c7d15b50d1ffc9adc
2022-10-13 14:04:47 -07:00
Lauren Winston
eebf4335d3 Revert "Add secure settings key for software cursor."
This reverts commit fb43f54289.

Reason for revert: Software Cursor not launching in Android U

Test: manual
Change-Id: I3f27b7d8958f455a580758192794308d5f91d152
2022-10-13 17:30:26 +00:00
Winson Chiu
9efbc1352b Move SystemConfig to services.jar
Migrates getDefaultVrComponents used by SettingsProvider and
adds a flag for hidden API enforcement to ApplicationInfo.

This removes any dependency on SystemConfig from core/ and
so it can be moved into services/core and exposed as a
mainline API.

This was done instead of exposing all of the methods through
SystemConfigManager, as that is designed for use across
processes, and it's more efficient to expose SystemConfig
directly for modules running in the server process.

Although VrManager is a nullable service, so getDefaultVrComponents
had to live there to simplify the logic and maintain the existing
behavior.

Bug: 236389629

Change-Id: I4c2b14e1d34aaf439ceb1a3f9c8207e5d39fa6c2
2022-10-13 15:54:15 +00:00
Matthew Small
7568883122 Adding new setting to communicate BTHM state to KeyGuard.
Bug: 246457861
Defer-CP-To-TM: 246457861
Test: Manual
Change-Id: Ic91861a985a85f0593f98e89f246752bcd70a237
(cherry picked from commit 56695a3d79a18e13e942d11f0a3d8b5fbd31542b)
2022-10-11 05:29:51 +00:00
Lauren Winston
d769064638 Revert "Add Settings.Secure values for Software Cursor settings for hiding"
This reverts commit 36e81f298f.

Reason for revert: Software Cursor will not be launching in Android U
Test: manual

Change-Id: Ibf70015d294e03aa74d839c0caa64bf3542b341f
2022-10-07 04:16:54 +00:00
TreeHugger Robot
1731d9fd7d Merge "Do not back up brightness values - auto-brightness adjustment - deprecated VR brightness" into tm-qpr-dev am: c5c15a0973
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19900946

Change-Id: Ie4fa411e3d0e3108c64b5fff7486fabe8187b608
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-05 09:58:19 +00:00
Piotr Wilczyński
2152abbe63 Do not back up brightness values
- auto-brightness adjustment
- deprecated VR brightness

Bug: 242319543
Test: atest SettingsBackupTest
Test: atest SettingsBackupAgentTest
Change-Id: I77189d4b201a28bcb2f950a0fd6ef94d21f49464
Merged-In: I77189d4b201a28bcb2f950a0fd6ef94d21f49464
2022-10-04 14:46:54 +00:00
Piotr Wilczyński
512495cf37 Do not back up brightness values
- auto-brightness adjustment
- deprecated VR brightness

Bug: 242319543
Test: atest SettingsBackupTest
Test: atest SettingsBackupAgentTest
Change-Id: I77189d4b201a28bcb2f950a0fd6ef94d21f49464
2022-10-04 14:45:16 +00:00
Jason Sun
4fd1467783 Merge "Auto enable new system trust agents" into tm-qpr-dev am: 73ce3e64f0 am: 84435238c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19824313

Change-Id: I9b40c9f7f4e3c15da877fbc592aa77d4cef6147a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 21:42:25 +00:00
Jason Sun
84435238c4 Merge "Auto enable new system trust agents" into tm-qpr-dev am: 73ce3e64f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19824313

Change-Id: I79539f4e42c07d9eb694389febb0b32c15a2b265
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-21 21:37:29 +00:00
Jason Sun
73ce3e64f0 Merge "Auto enable new system trust agents" into tm-qpr-dev 2022-09-20 19:48:17 +00:00
Lais Andrade
7eb10e8506 Add System setting key VIBRATE_ON to backup list
Change-Id: Idfeff5a3a0de14fcf1ad109ba37f0943da05c9fd
Fix: 245442296
Test: SettingsBackupTest
2022-09-16 15:17:57 +00:00
Jason Sun
fb3f361d54 Auto enable new system trust agents
Previously we only auto enable factory system trust agents when the
devices is booted for the first time. This change added logic to detect
newly installed/enabled trust agents, and enable them if appropriate.

Fixes: b/243705470
Test: atest FrameworksMockingServicesTests:TrustManagerServiceTest
Change-Id: I3c345a44cfcfccc6f7e2507ba37e378b6b16bd98
2022-09-13 20:44:25 +00:00
SongFerng Wang
2ef9f04680 Merge "[LE boradcast] save the data into ContentProvider" into tm-qpr-dev am: 86125487ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19834071

Change-Id: I5b1e341796db146ca44d7121ccb3a7f5be1e373c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 20:26:40 +00:00
SongFerngWang
e747702879 [LE boradcast] save the data into ContentProvider
The settings and systemUI use the LocalBluetoothLeBroadcast and
they use different sharedPreferences since the context is different.
It causes the data are not consistent.

Solution: Add data into ContentProvider, and listen the data changed
by the ContentObserver.

Bug: 243107842
Test: build pass. manual test in local.
atest SettingsBackupTest
atest SettingsValidatorsTest

Change-Id: I5f8367f3eb8e2dafa2986004dd8540de41409192
Merged-In: I5f8367f3eb8e2dafa2986004dd8540de41409192
2022-09-12 17:19:39 +08:00
SongFerngWang
45af3be3a1 [LE boradcast] save the data into ContentProvider
The settings and systemUI use the LocalBluetoothLeBroadcast and
they use different sharedPreferences since the context is different.
It causes the data are not consistent.

Solution: Add data into ContentProvider, and listen the data changed
by the ContentObserver.

Bug: 243107842
Test: build pass. manual test in local.
atest SettingsBackupTest
atest SettingsValidatorsTest

Change-Id: I5f8367f3eb8e2dafa2986004dd8540de41409192
2022-09-12 17:05:35 +08:00
Joël Stemmer
812e307934 Merge "Remove settings that are now backed up from temporary allowlist" 2022-09-06 14:15:19 +00:00
Joël Stemmer
46a1091347 Remove settings that are now backed up from temporary allowlist
Bug: 244573671
Test: atest SettingsBackupTest.java
Change-Id: Iceefc3f7edce87084361fdd45e7fef5aca7ea8a0
2022-09-06 10:17:18 +01:00
Bill Yi
d8746d5cf0 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib5e9d10ad8fe8a1ee960dde259b4e67aba75deef
2022-09-03 19:25:43 -07:00
Bill Yi
219d944e28 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I512dbd45c00ebf4f18058774440b05ae8f270257
2022-09-03 13:04:32 -07:00
Bill Yi
0950bd467b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Icda3eefeba16b835c9407b3dc8355636c6939639
2022-09-02 23:55:40 -07:00
Bill Yi
7a8a920dc0 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I6fb7a69aa78321fd3db02b05775fd8d54a5e9e71
2022-08-31 16:14:48 -07:00