Commit Graph

6995 Commits

Author SHA1 Message Date
William Escande
c51683b7e7 Expose Secure.get{Int,String}ForUser as systemApi
Bluetooth is going mainline and can no longer use hidden api. We tried
to use the public alternative as our user is the same returned by
contentResolver.getUserId() but errorprone is not happy with it

Bug: 216769091
Test: Build bluetooth as apex mainline module
Change-Id: I195d545cc359d765e261c169032dfad46c916d75
CTS-Coverage-Bug: 217352944
2022-02-01 19:37:26 +00:00
Michal Olech
6c966b35ea Merge "Add system prompt for system language change after <Set Menu Language> CEC message" 2022-02-01 17:21:51 +00:00
Michal Olech
6f1aecf1bf Add system prompt for system language change after <Set Menu Language> CEC message
Requires ro.hdmi.set_menu_language=true

Test: build; flash; manual test
Bug: 190810909
Change-Id: Ic0664e077e975bba0929dd871c3a4c9ab385814c
2022-02-01 12:39:53 +01:00
Darrell Shi
2be2597553 Merge "Add settings key for storing timeout to user 0 preference." 2022-02-01 01:54:12 +00:00
Xinyi Zhou
7b4b98b581 Merge "Add Fast Pair saved devices settings page component name to config" 2022-02-01 01:49:57 +00:00
TreeHugger Robot
3cef8c7f57 Merge "Add an intent action system API for bedtime settings" 2022-01-31 22:17:03 +00:00
Darrell Shi
7132ff527f Add settings key for storing timeout to user 0 preference.
Bug: 213906356
Test: manual
Change-Id: Ic9c65e58a3f399753349dfcba20a1193a6f0eb00
2022-01-31 18:17:59 +00:00
Xinyi Zhou
393ba5ce30 Add Fast Pair saved devices settings page component name to config
The actual page is in GMSCore, which is not fully ready. I tested with
Nearby Share sharing page for indication.

Test: https://photos.app.goo.gl/E1T9hKtuci12SwuY7
Bug: 203579197
Change-Id: Idbbc4e6d5ca180a6d225b9410057473531bc2b0c
2022-01-28 12:56:59 -08:00
Robert Horvath
5dfac22224 Merge changes from topics "low-power-standby-api", "lps-wakelock-testapi"
* changes:
  Add API to configure LPS maintenance mode behavior
  Add TestApi to force Low Power Standby to be active
  Add TestApi wakelock flag to have system acquire wakelock
  Allowlist active voice interaction session from Low Power Standby
  Introduce Low Power Standby API and wakelock restrictions
2022-01-28 12:27:05 +00:00
Ricky Wai
d8d1b82e44 Merge "Add restricted settings app ops and apply it into Restricted Preference" 2022-01-28 11:23:17 +00:00
Zach Johnson
c63b02afc0 Merge "Add SystemApi getter to bluetooth constant" 2022-01-28 05:30:43 +00:00
Xinyi Zhou
e3b13f3c68 Merge "Add Nearby Slice URI for the SliceProvider to Settings.Secure" 2022-01-28 01:43:18 +00:00
William Escande
60c210dfe2 Add SystemApi getter to bluetooth constant
Bluetooth is going mainline and need to have access to constant defined
in both settings.secure and settings.Global

Test: build
Bug: 211851706
Tag: #refactor
Change-Id: Id47da2e5606d29ccd2924d9105e8322a1b697ee1
2022-01-28 01:14:33 +01:00
Robert Horvath
abb95aecf3 Add API to configure LPS maintenance mode behavior
Allow Low Power Standby to be active during doze maintenance modes.

Bug: 190822356
Test: atest LowPowerStandbyControllerTest
Change-Id: I6db6e1a37f48d63d618245f308ea1053c45fb64b
2022-01-27 23:08:32 +01:00
Robert Horvath
570645567f Introduce Low Power Standby API and wakelock restrictions
In Low Power Standby, additional restrictions are placed on apps that
are in a process state of FOREGROUND_SERVICE or less important
during standby (while the device is non-interactive):
- Wakelocks are disabled
- Network access is blocked
During doze maintenance windows the restrictions are lifted temporarily.

This change introduces the APIs for Low Power Standby, as well as
the wakelock restrictions.

This feature is targeting TVs. To prevent Low Power Standby from being
enabled on other devices, the feature is guarded by the config flag
config_lowPowerStandbySupported.

Bug: 190822356
Test: atest LowPowerStandbyControllerTest PowerManagerServiceTest
Ignore-AOSP-First: New permission only added internally for now.
Change-Id: Ia40f8a0fc4b366860af58ad76c988f93a5d41936
2022-01-27 23:08:26 +01:00
Yingzhe Li
26d4d356bd Merge "Add Setting for Wet Mode/Touch Lock Mode" 2022-01-26 19:03:04 +00:00
Steven Ng
28fc9e2fd8 Add an intent action system API for bedtime settings
Test: atest CtsIntentSignatureTestCases
Bug: 210975231
Change-Id: I9559a572acefc6d7fa8bfc31d90f9613d8a25290
2022-01-26 17:21:08 +00:00
Ricky Wai
36e951f1a9 Add restricted settings app ops and apply it into Restricted Preference
Bug: 202130031
Test: Able to compile and boot device successfully
Change-Id: I4501cc90c681165e10c82a359f21951856519fd8
2022-01-26 14:48:57 +00:00
Xinyi Zhou
a214ee474c Add Nearby Slice URI for the SliceProvider to Settings.Secure
Test: n/a.
Bug: 202040692
Change-Id: I6c9100e0963af78112ea7718ad9f0924c9a56ddf
2022-01-25 19:24:18 +00:00
Kathy Chen
50460ddd32 Merge "AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events." 2022-01-23 01:54:29 +00:00
Kathy Xiaoming Chen
5d568eda62 AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events.
Client apps need the ACCESS_AMBIENT_CONTEXT_EVENT permission to use the service. The permission protection level is internal|role.

API overview: http://go/ambient-framework-api
PRD: http://go/ambient-attribution-prd
Design doc: http://go/ambient-service-api

Test: CTS test
Bug: 192476579
Change-Id: I9daede83af34f215c278cb0530238faba1be5c70
Ignore-AOSP-First: to prevent new feature leak.
2022-01-22 22:07:22 +00:00
Xinyi Zhou
78c2d1a81b Merge "Add FAST_PAIR_SCAN_AVAILABLE to Settings.Secure" 2022-01-22 04:05:28 +00:00
Xinyi Zhou
5f6a031da0 Add FAST_PAIR_SCAN_AVAILABLE to Settings.Secure
Bug: 203579197
Test: Built and verified by logs https://paste.googleplex.com/5319381207744512
Change-Id: I44d68ec01a1d892849e9452e73bef428b2991cea
2022-01-21 14:22:44 -08:00
Binh Nguyen
b5956636ff Merge "Add DeviceConfig namespace for Supplemental API" 2022-01-21 21:08:00 +00:00
Neharika Jali
e9605c6905 Merge "Makes constants related to cache configurable via DeviceConfig API" 2022-01-21 19:06:21 +00:00
Binh Nguyen
a3b6f30177 Add DeviceConfig namespace for Supplemental API
Bug: 213604390
Test: build
Change-Id: I1c92873887e4cbabec6e592da7ebcef353a4b38f
2022-01-21 09:01:28 -08:00
Lucas Silva
30bc1ab3ca Merge "Add dream complications enum and Settings API." 2022-01-21 15:00:03 +00:00
Kate Montgomery
ffa3793601 Merge "Add a setting which stores whether or not to show system location accesses. This is needed for aligning the location indicator to the recent location accesses page in location settings." 2022-01-21 00:35:55 +00:00
Lucas Silva
72d39bb603 Add dream complications enum and Settings API.
In order for users to toggle complications on/off in Settings, we need
to categorize complications by type and store user preferences in
Settings.

Bug: 214038424
Bug: 214039192
Bug: 214038263
Test: make -j64 RunSettingsLibRoboTests ROBOTEST_FILTER="com.android.settingslib.dream.DreamBackendTest"
Change-Id: I2db4f2f9c1e08c6cfac3687fa3809662f30a3561
2022-01-20 15:36:31 +00:00
Neharika Jali
f29cf7bbb5 Makes constants related to cache configurable via DeviceConfig API
Bug: 214343564
Test: atest installd_cache_test, atest StorageManagerBaseTest, atest
StorageManagerTest#testComputeStorageCacheBytes

Change-Id: Ie977b8798e7169471c407621535ca1ca8feb6fec
2022-01-20 10:42:36 +00:00
Kate Montgomery
7a7ec0e61a Add a setting which stores whether or not to show system location
accesses. This is needed for aligning the location indicator to the
recent location accesses page in location settings.

Bug: 191503437
Test: manual
Change-Id: I9d2f473a75e3bfdfef59e675d2f6849e66cbbd94
2022-01-19 22:29:20 +00:00
Steven Ng
ab4c4606f6 Merge "[Night] Add a new night theme trigger: bedtime" 2022-01-19 20:36:26 +00:00
Surbhi Kadam
c2c7f90b63 Add Setting for Wet Mode/Touch Lock Mode
Bug 199956616

Change-Id: I75a3454cdc00cd0889f84f57a2dcebdeaf8c7f6b
2022-01-19 19:48:42 +00:00
Steven Ng
4263ab6637 [Night] Add a new night theme trigger: bedtime
This CL expands the existing UiModeManager APIs to allow users activate
dark mode at their configured bedtime schedule on supported devices,
i.e. devices with Digital Wellbeing preinstalled.

The CL added granular types for NIGHT_MODE_CUSTOM. There are two types
1. MODE_NIGHT_CUSTOM_TYPE_SCHEDULE
   This is the type for a schedule set up by users via the Settings
   app.
2. MODE_NIGHT_CUSTOM_TYPE_BEDTIME
   This is the type for a bedtime schedule set up by users via the
   Digital Wellbeing bedtime settings. Unlike
   MODE_NIGHT_CUSTOM_TYPE_SCHEDULE, Android framework doesn't have
   any information of the bedtime schedule. The activation of dark
   theme lives inside Digital Wellbeing

Test: unit tests: atest FrameworksUiServicesTests:UiModeManagerServiceTest
      CTS: atest CtsAppTestCases:UiModeManagerTest
      Manual testing via a system app integration
Bug: 210975231
Change-Id: I3b16e649a048f8a485b9e9d6464d4f251839320d
2022-01-19 19:25:50 +00:00
Lais Andrade
41fd16dfb7 Merge "Deprecate boolean settings for haptic feedback and vibrate when ringing" 2022-01-19 17:24:40 +00:00
Lais Andrade
a01a1f6993 Deprecate boolean settings for haptic feedback and vibrate when ringing
Deprecate HAPTIC_FEEDBACK_ENABLED in favor or HAPTIC_FEEDBACK_INTENSITY,
and VIBRATE_WHEN_RINGING in favor or RING_VIBRATION_INTENSITY.

Introduce hidden flag
VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF
to represent HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING in the
vibrator service. This is applied by:

- PhoneWindowManager, that converts HapticFeedbackConstants into
(VibrationEffect, VibrationAttributes).

- CellBroadcastAlertAudio, that triggers alerts using AudioAttributes
with flags FLAG_BYPASS_INTERRUPTION_POLICY (that translates to same flag
in VibratorManager, to bypass DnD) and FLAG_BYPASS_MUTE (that translates
to this new flag, to bypass the new alarm intensity settings).

The new flag is erased from request that are not from privileged apps,
similar to the other bypass flag. The public
HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING has also been
deprecated in T with a documentation explaining the removal of platform
support.

Remove SysUI dependencies on the deprecated settings, it should use the
USAGE_TOUCH attribute and rely on the vibrator service to apply the user
settings.

Keep other SysUI dependencies that needs to run in older Android
versions (like Launcher3).

Bug: 185351540
Test: VibrationSettingsTest + manual
Change-Id: I0372e4db19e09523795d7e79b9f7a15ae48a8cd9
2022-01-18 18:57:10 +00:00
Alex Florescu
4831a179cb Extract device state rotation lock settings management to a separate class.
This will be followed-up by a CL moving it to SettingsLib so it can be
shared with Settings

Bug: 195757480
Test: atest SystemUITests:DeviceStateRotationLockSettingControllerTest

Change-Id: Ic9c720d7c911d9b8db70ea6bb7fbab209a602abe
2022-01-14 18:02:43 +00:00
Lais Andrade
3a4e97db5f Merge "Introduce media and alarm vibration intensity settings" 2022-01-11 15:16:28 +00:00
TreeHugger Robot
7d24159ba2 Merge "Intercept activity start to check for notification permissions" 2022-01-10 19:54:45 +00:00
Lais Andrade
095b3d31db Introduce media and alarm vibration intensity settings
Introduce new setting keys for media and alarm vibration intensity.

Merge all default vibration intensity getters into a helper class that
receives the VibrationAttributes usage int and applies the default logic
to all usages.

Also update the usage of boolean settings for haptic feedback and ringtone
to disable vibrations in VibrationSettings.

Bug: 198346559
Bug: 207477604
Test: VibratorTest & VibrationSettingsTest
Change-Id: I69ba05a8bc35657637b1f351f4c19d2d96efc9e3
2022-01-10 15:42:21 +00:00
Lucas Dupin
5353cad3bf Merge "Customization settings documentation" 2022-01-10 02:02:03 +00:00
Lucas Dupin
1af47a659c Customization settings documentation
Updated settings documentation to reflect current behavior.

Bug: 195969565
Test: N/A
Change-Id: I76eda9d12b251abbe3f5014f29e8bf0fc6bc6793
2022-01-09 15:37:36 -08:00
Daniel Hsieh
bc079ff05f Merge "Support following typing focus in window mode [3/n]." 2022-01-07 15:44:21 +00:00
Grace Jia
d9bdab733f Merge "Add new API for new feature of display name." am: e43f70afc7 am: bacd6a4a11 am: 93e2d21187 am: aa6e8fff87
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1807961

Change-Id: I28ae3bf23808bca60b474969f4a0b90e9747e682
2022-01-06 20:23:29 +00:00
Grace Jia
aa6e8fff87 Merge "Add new API for new feature of display name." am: e43f70afc7 am: bacd6a4a11 am: 93e2d21187
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1807961

Change-Id: I29c1a276e70e8d129a3741f7491557459ce35735
2022-01-06 19:55:54 +00:00
Grace Jia
93e2d21187 Merge "Add new API for new feature of display name." am: e43f70afc7 am: bacd6a4a11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1807961

Change-Id: I83d94ad77c85887fdc7a1bf2a3401069ccd9bd94
2022-01-06 19:38:13 +00:00
Grace Jia
e43f70afc7 Merge "Add new API for new feature of display name." 2022-01-06 18:59:37 +00:00
TreeHugger Robot
bd4a9f5806 Merge "Cleanup communal mode shared app logic." 2022-01-06 17:36:26 +00:00
Pat Manning
5f66d30856 Merge "Create API to set taskbar to kids mode." 2022-01-06 17:26:05 +00:00
TYM Tsai
ba6aaaeff0 Merge "Migrate compat mode allowed list to DeviceConfig" 2022-01-06 11:46:39 +00:00