Commit Graph

6967 Commits

Author SHA1 Message Date
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
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
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
Menghan Li
f5f9c51c88 Merge "Implement color correction quick settings tile service" 2022-01-06 01:41:59 +00:00
Lucas Silva
70303b058f Cleanup communal mode shared app logic.
We will no longer be shipping shared apps in Android T

Test: atest CommunalManagerServiceTest
Test: locally on device
Bug: 211633044
Change-Id: I96ff51f1e10801722dd74de110f5c2caacf0d8d3
2022-01-05 15:18:52 +00:00
Daniel Hsieh
f4e9ca2c79 Support following typing focus in window mode [3/n].
There are 3 milestones in this feature.
1. Refactor the callbacks for Accessibility in WindowManagerInternal.
2. Implement this feature in such new architecture.
3. Implement the setting choice in preference page.

This CL is for the 3rd milestone.

We add a ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED key to store
a user preference for following typing focus. The default value of
preference is true.

If the value is false, we wouldn't do anything in
onRectangleOnScreenRequested and just return.

If the value is true, we would dispatch the event to an activated
magnification controller.

Bug: 194668976
Test: atest AccessibilityManagerServiceTest
	atest AccessibilityUserStateTest
	atest FullScreenMagnificationControllerTest
	atest MagnificationControllerTest
	atest WindowMagnificationManagerTest
	atest SettingsBackupTest
Change-Id: I7203698d2edcc474ab1638ac81e72e054a61d6fd
2022-01-05 14:54:25 +00:00
Pat Manning
8ffa58cdea Create API to set taskbar to kids mode.
- Disables recents in taskbar.
- Changes back and home icons and centers them in the taskbar.

Test: manual
Bug: 203749295
Change-Id: I9aa2a213728549509da4cf7f50abceb690ba31cf
2022-01-05 11:35:41 +00:00
Jack Yu
9191d83719 Merge "Support preferred data profile correctly" 2022-01-05 06:55:01 +00:00
Jacky Kao
f41f3984ee Merge "Adds APIs to let live caption can access the data in the DB (1/n)" 2022-01-05 02:34:56 +00:00
Tom Hsu
040fa1e1c7 Merge "[Panlingual] Expose action to SDK constant for app's locale picker." 2022-01-05 02:12:23 +00:00
Jacky Kao
b5764cd804 Adds APIs to let live caption can access the data in the DB (1/n)
Adds a new setting key, ODI_CAPTIONS_VOLUME_UI_ENABLED, in the
secure settings, to indicate the live caption button show or hide
in the volume rocker.

Bug: 136282740
Test: atest SettingsBackupTest
Change-Id: Ibcf3be36903450538696c75325c4a866942ce693
2022-01-05 08:10:40 +08:00
Nate Myren
ebc2f29dd6 Intercept activity start to check for notification permissions
The dialog is shown if the app is not a signature app, the system is
ready, and the app has created at least one notification channel.
Also applies the SHOULD_SHOW_REQUEST flag to all packages with implicit
POST_NOTIFICATIONS permissions

Bug: 194833441
Test: atest NotificationPermissionTest
Change-Id: I4cb8cc7bcc3635f55e291f176f722dd420a4a1bb
2022-01-04 15:04:23 -08:00
menghanli
aad4eac7a3 Implement color correction quick settings tile service
1. Integrate color correction quick settings tile with SettingsProvider changes.
2. Handling long-pressed action for Color Correction Quick Settings
3. Config Color Correction Quick Settings tile to auto-added

Bug: 209888145
Test: manually test color correction quick settings tile actions
Test: atest QSFactoryImplTest ColorCorrectionTileTest
Change-Id: I2e461d4a92b90435175ecfd708dc8767ca6e6f41
2022-01-03 07:22:57 +08:00
Jack Yu
9d30675af8 Support preferred data profile correctly
Correctly support read/write preferred data profile.

Fix: 212906152
Test: manual & atest DataNetworkControllerTest DataProfileManagerTest
Change-Id: I3cb18680ec6c77a4905901a2aa3cf3c86ce801f1
2022-01-01 08:12:45 -08:00
Aleksandr Litovchenko
c2dc611aca Merge "Upstream Wear Keyguard changes" 2021-12-31 10:41:54 +00:00
Jakub Pawłowski
0f42f93722 Merge "Bluetooth: ensure adapter name and address can't be read from 3p apps" into sc-qpr1-dev am: 16dcbdc0b8 am: e2928d3bf5 am: 9b2d10071a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15924163

Change-Id: Icaee348e66d21bd8bb87312a4242c8e2a8131a62
2021-12-30 14:51:43 +00:00
Jakub Pawłowski
9b2d10071a Merge "Bluetooth: ensure adapter name and address can't be read from 3p apps" into sc-qpr1-dev am: 16dcbdc0b8 am: e2928d3bf5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15924163

Change-Id: I16ab1365dc5cf65f01c820e2bd90ce2cfa714a0f
2021-12-30 14:45:10 +00:00
Jakub Pawłowski
e2928d3bf5 Merge "Bluetooth: ensure adapter name and address can't be read from 3p apps" into sc-qpr1-dev am: 16dcbdc0b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15924163

Change-Id: If07b08e2a02d12f5d9abf06f228aee2f2f925dac
2021-12-30 14:39:53 +00:00
Jakub Pawłowski
16dcbdc0b8 Merge "Bluetooth: ensure adapter name and address can't be read from 3p apps" into sc-qpr1-dev 2021-12-30 14:17:34 +00:00
Joanne Chung
00d9e39ee3 Merge "Add selection_toolbar experiment namespace" 2021-12-29 11:52:39 +00:00
Sarah Chin
87f76c1389 Merge "Add new fields to ApnSetting/DataProfileInfo" am: a28f3d2066 am: 1de30d0e45 am: a67c0d0b68
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918557

Change-Id: Ic8624e7ad1c866c7342640c2765a1af64c071b7e
2021-12-29 00:01:52 +00:00
Sarah Chin
a28f3d2066 Merge "Add new fields to ApnSetting/DataProfileInfo" 2021-12-28 23:06:10 +00:00
Joanne Chung
6e398eb8ab Add selection_toolbar experiment namespace
Add a namespace definition for selection toolbar.

Bug: 190030331
Bug: 205822301
Test: manual. Can set and get correct value via this namespace

Change-Id: Icb56cafee3576b6df083aeab68d04cd05e6ee95e
2021-12-24 14:05:35 +08:00
tom hsu
51839ed228 [Panlingual] Expose action to SDK constant for app's locale picker.
Bug: 210797799
Test: make
Test: local functional test
Change-Id: I01eaeb35951c6a8e88e61d511163738d89d37bd5
2021-12-23 22:43:59 +08:00
Paul Hu
cca8fc0d7e Merge "Remove NSD_ON setting" am: 02124fb14f am: 06a06836ae am: c7ec38668e am: 3ade5edabf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909907

Change-Id: Ia269346654746ebb527c589a43bf5c21fc605f52
2021-12-22 03:11:31 +00:00
Paul Hu
3ade5edabf Merge "Remove NSD_ON setting" am: 02124fb14f am: 06a06836ae am: c7ec38668e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1909907

Change-Id: Ib949305720f0ee409cf3b47bf12f0a364115451d
2021-12-22 02:54:27 +00:00
TYM Tsai
9f8d8c0171 Migrate compat mode allowed list to DeviceConfig
To test, manually played with 'adb shell device_config'. Examples:

$ adb shell device_config list autofill
$ adb shell device_config delete autofill compat_mode_allowed_packages
$ adb shell device_config list autofill
compat_mode_allowed_packages: not found

$ adb shell device_config put autofill compat_mode_allowed_packages com.android.chrome[url_bar]:com.brave.browser[url_bar]
$ adb shell device_config list autofill
compat_mode_allowed_packages: found, value is com.android.chrome[url_bar]:com.brave.browser[url_bar]
$ adb shell dumpsys autofill
see:
Autofill Compat State:
  User: 0
    com.android.chrome: maxVersionCode=10000000000, urlBarResourceIds=[url_bar]
from device config: com.android.chrome[url_bar]:com.brave.browser[url_bar]

Bug: 194967348
Test: atest CtsAutoFillServiceTestCases
Test: atest com.android.server.autofill.AutofillManagerServiceTest
Change-Id: I775782622adecb42b86de508f502f03039cc34ca
2021-12-21 22:23:27 +08:00
Martijn Coenen
08e521f02d Merge changes from topic "revert-1927643-mmtel_capability-TQUGHHKONR" am: c7dc6dc0da am: 60d94a4ce6 am: 5905fa1d55
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1928148

Change-Id: Ia07d4ea676a783c0f15d3cb4e5fe839cf27c3365
2021-12-21 12:09:33 +00:00
Jack Yu
159dd37881 Added setup/tear down data support am: 09c6189ae4 am: 1049457581 am: ec849ed683
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1927642

Change-Id: Iabce633fe76b7df035d7cbc7e97265040fd4dc80
2021-12-21 12:08:18 +00:00
Martijn Coenen
4a4b55fca3 Revert "Added setup/tear down data support"
Revert "Added a new network capability MMTEL"

Revert submission 1927643-mmtel_capability

Reason for revert: b/211586152
Reverted Changes:
Ifea8b1e40:Added a new network capability MMTEL
I38655bef2:Added a new network capability MMTEL
I837606d9e:Added setup/tear down data support
I2c7b291fe:Added a new network capability MMTEL

Change-Id: If4ab6dd27a995edcca037099ed3f68de917641cf
2021-12-21 11:24:01 +00:00
paulhu
5555c00e61 Remove NSD_ON setting
NSD_ON setting has never been set since it created. The
NsdService is the only user which read/write the setting.
However, NsdManager cts test must running with nsd service
enabled that means this setting should be enabled
always. And this setting is the hidden symbols that
NsdService can't use it after move to mainline module. Thus,
remove this useless setting.

Bug: 206702844
Test: m
Change-Id: Idb5dfc71ebfe2eacd476dd8646aad9adc4975149
2021-12-21 14:55:54 +08:00