Commit Graph

559 Commits

Author SHA1 Message Date
Xin Li
5ebaa600a1 Merge "Merge tm-qpr-dev-plus-aosp-without-vendor@9129937" into stage-aosp-master 2022-10-11 17:39:16 +00:00
Shen Lin
97a61bad7d Add fallback summary text if there is no matching screen timeout value
Screen timeout summary string can be null if there is no matching candidate, so we need a fallback summary here to avoid showing unexpected summary text.

Bug: 252340891
Test: manual

Change-Id: I939ae97a50063b2ffe84029135c3f340aeedf4c7
2022-10-09 01:59:02 +00:00
Amy Hsu
d434100421 Merge "[RRS] Send event to AccessibilityManager when an unselect radio button is selected." into tm-d1-dev am: c799cb11f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19893206

Change-Id: Ibb4eb46ab387682f595162414c4ecb4f2dad5c7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 09:03:37 +00:00
Amy Hsu
fc3f25c8b5 [RRS] Send event to AccessibilityManager when an unselect radio button is selected.
Change the screen resolution will cause re-layout the screen, so the focus will back to the first view. Before we actually set the screen
resolution, send an event to the AccessibilityManager and set what it
should say when the user selects the unselect option. Therefore TB will
say "selected" before the screen refreshes.

bug: 229352892
Test: Enable/disable Talkback and check RRS app behaivor. It should read
"selected" after user choose one un-selected option.

Change-Id: If14ed3685f85962d4e4b1d4961216c6ca5d5f0f8
2022-09-16 07:09:47 +00:00
Tsung-Mao Fang
b0f9134441 Set an action name for wallpaer index am: 0f7b80f47f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19394202

Change-Id: Ibcfaa3afcbe2fde0a00c717883c3007bdecb0ac9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-27 03:02:35 +00:00
Tsung-Mao Fang
0f7b80f47f Set an action name for wallpaer index
Since Android T+, app has to assign an action name for opening a
external app page.

Test: Manual test wallpaper search result and can open.
Fix: 239867167
Change-Id: I4579aaf6e831ff82721c958e6b91ede4cabda2c8
2022-07-26 02:36:13 +00:00
Amy Hsu
f51951c9d3 Merge "[RRS] Activate investigation of screen_resolution in settingsstats" into tm-d1-dev am: 1f7fab03c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19124855

Change-Id: Ie9b806a127e7eced1b9d790beb874e712e452de5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 04:15:21 +00:00
Amy Hsu
7087e5c457 [RRS] Activate investigation of screen_resolution in settingsstats
Define a setting string for putting data for suez/settingstats.

Bug: 234035619
Test: Manually check ScreenResolution ap in Settings can work normally.
Merged-In: Ib4622490b0f63139b47f242ebcae916edf291cea
Change-Id: Ib4622490b0f63139b47f242ebcae916edf291cea
2022-07-07 08:15:47 +00:00
Amy Hsu
6de8a405d7 Merge "[RRS] Avoid the resolution switch too rapidly." into tm-d1-dev am: d5279ceae3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18800521

Change-Id: Ia2572f07b47813095947d15d4665a378c1756f18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 09:35:41 +00:00
Amy Hsu
088a212a35 [RRS] Avoid the resolution switch too rapidly.
Make sure previous setting has been completed before we set current
resolution. Register a display listner to listen onDisplayChanged
callback. So that we can know when display resolution change completed.

Bug: 232440665
Test: Switch resolution quickly and check display situation.
Change-Id: I1460c1db191250d8e51dd639cd969e4323f71abd
2022-06-28 01:41:24 +08:00
Amy Hsu
7e0b5c8c07 Merge "Restore the density when it has been overridden" into tm-d1-dev am: be6fef3095
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18791014

Change-Id: Ie88b0db9abc05339c9c77aa87350bcd3acf963e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-15 06:11:31 +00:00
Amy Hsu
be6fef3095 Merge "Restore the density when it has been overridden" into tm-d1-dev 2022-06-15 05:31:43 +00:00
Yichi Chen
e190a8a5bb Restore the density when it has been overridden
When the density is overridden, the new density remains the same during
the resolution changes, which causes improper DPI on the screen. The
patch recalculates the suitable overridden density when the resolution
is changed and applies the new settings when the new resolution takes
place.

Bug: 233698163
Test: Switch resolution with customized density
Change-Id: I0914de61da0ab3b78380b355f47dbd3052079492
2022-06-13 12:31:31 +08:00
Piotr Wilczyński
6dac1ca43d Merge "Notify about brightness change when screen turns on" into tm-dev am: 7d634de3ea am: 8bfab753c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17898014

Change-Id: I74d279c286d697f13af2059e0c93f3c3109a7f9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-09 08:19:37 +00:00
Piotr Wilczyński
7d634de3ea Merge "Notify about brightness change when screen turns on" into tm-dev 2022-06-09 07:39:07 +00:00
Chaohui Wang
c47291950d Merge "Clean up DarkUIInfoDialogFragment" into tm-dev am: 9ada0accef am: 7c74b9ba19
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18669107

Change-Id: I9d987aa0747b3b5079a64623ee187a0398a4e84e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 13:02:56 +00:00
Chaohui Wang
9ada0accef Merge "Clean up DarkUIInfoDialogFragment" into tm-dev 2022-06-01 12:24:24 +00:00
Chaohui Wang
f34bac0ee6 Merge "Fix flicker in Dark theme" into tm-dev am: 71fe20ea8b am: 596644171b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18659336

Change-Id: I70b1572efb652df90ddaaa633e34cc8fad0e543b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 03:06:41 +00:00
Chaohui Wang
9f6eaf8624 Fix flicker in Dark theme
Currently, when schedule sets to "Turns on at bedtime", the footer will
show a slid up animation when entering the page, this is because the
"Start time" & "End time" preferences are hidden in onResume().

This is because these 2 preferences always return AVAILABLE in
getAvailabilityStatus(), and manually update visibility in
refreshSummary(), which is called each time updateState() is called.

Usually the controller not set the visibility explicitly, but return
CONDITIONALLY_UNAVAILABLE in getAvailabilityStatus() when they want to
hide the preference.

Because getAvailabilityStatus() is called in onCreate(), by using this,
we can fix the flicker.

Fix: 234399017
Test: visual & robo test
Change-Id: I4cb7dd95d2985bd1ca4c8cb30aaebdc21a5415f8
2022-05-31 19:03:54 +08:00
Chaohui Wang
75e4028b3e Clean up DarkUIInfoDialogFragment
The usage of this dialog is removed in
Change Ie2cf147de53385ae0c626c8472306f1b85317686

But this dialog is created (but not show) in DarkUIPreferenceController
each time dark mode toggle is turned on by user.

So clean this up.

Fix: 234419979
Test: make Settings
Change-Id: Icdc9d7a4fb77dc8b2a3f1a9d8e3f40fc0af4917d
2022-05-31 17:58:05 +08:00
Edgar Wang
42704ba27c Merge "Update learn more string of FooterPrefernce" into tm-dev am: 24654a3d61 am: 4d371adf7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18356903

Change-Id: I70547c9094cdd200f1fa2a77272affbcbe308a34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 23:52:43 +00:00
Edgar Wang
68d12953e7 Update learn more string of FooterPrefernce
Replace FooterPreference#SetLearnMoreContentDescription() with
FooterPreference#SetLearnMoreText().

This is a requirement: All links, controls, and buttons should
also have comprehensible text or tooltip text, so users can identify its
purpose, independent of context, such as when using the URL list from
TalkBack’s local context menu.

Bug: 215045903
Test: manual & robotest
Change-Id: Ib657ba336c5688c1434a58611dea3891001afe14
2022-05-13 08:13:36 +00:00
TreeHugger Robot
036373b278 Merge "Add missing settings strings." into tm-dev am: af5a015198 am: f01fbbcec3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17692465

Change-Id: Ia062145408e033588a1478b341e7a6c91738ea16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 14:06:01 +00:00
Jonathan Scott
b7f4f56cad Add missing settings strings.
Also re-enable and fix tests.

Test: manual
Fixes: 226183482
Fixes: 218799125
Fixes: 219375624

Change-Id: I9605f1f4e2e834baf63e015e96639567c5481b5f
2022-05-05 09:12:59 +00:00
Piotr Wilczyński
a26381aa85 Notify about brightness change when screen turns on
Bug: 216419091
Test: ROBOTEST_FILTER=BrightnessLevelPreferenceControllerTest m -j RunSettingsRoboTests
Change-Id: I35f4b81b325a7275ad7391aa631d183ddcbd8fe3
2022-05-03 13:51:55 +00:00
Will
640247eb58 Disable screen saver setting for non-system users.
On devices where non-system users are not allowed to dream, disable the
screen saver setting when the current user is not the system user.

Bug: 213906883
Test: atest ScreenSaverPreferenceControllerTest
Test: Manually with the following steps:
Step 1: On a device with the config setting
config_dreamsOnlyEnabledForSystemUser set to false, make sure that
non-system users can still access the screen saver setting.
Step 2: On a device with the config setting
config_dreamsOnlyEnabledForSystemUser setting is set to true, make sure
that non-system users can not access (or see) the screen saver setting.
Step 3: Make sure that system users can still see the screen saver
setting on a device where config_dreamsOnlyEnabledForSystemUser is set
to true.

Change-Id: I7e167ed5a1ea183c725ba89a57b8d0b372064b82
2022-04-22 16:03:31 -07:00
Abel Tesfaye
8814d96884 Fix issue where SmartAutoRotateController tries to unregister an unregistered receiver
Controllers are automatically bound to a lifecycle if registered in the xml file. Manually binding a lifecycle can cause multiple receivers to be unregistered/registered. Removing the manual binding will prevent this case from causing a potential exception.

Bug: 227762968

Test: none
Change-Id: I9c8ddc6f82b19cd4a9c8a4aec3c9c744935cd542
2022-04-21 21:31:03 +00:00
TreeHugger Robot
07950adad9 Merge "Update auto-rotate strings/toggles for better accessibility" into tm-dev 2022-04-19 23:44:38 +00:00
Abel Tesfaye
238b2cc721 Update auto-rotate strings/toggles for better accessibility
This change will update some strings for smart-auto-rotate and replace
the activity based switchbar with SettingsMainSwitchPreference. The
switchbar had to be replaced to allow the new text to appear above the main toggle.

Test: locally with flame and with resolver service enabled & disabled

Bug: 220182618
Change-Id: I4b60bf006bdde9e47b33a52c7719ec770caf5746
Merged-In: I4b60bf006bdde9e47b33a52c7719ec770caf5746
2022-04-19 21:21:34 +00:00
Niklas Lindgren
8bc83ef615 Read CarrierConfig to get operator name
Config if operator name should be in status bar is now read
from carrier config. For dual sim devices we use data sim.

Bug: 116847905
Test: Add item for carrier in vendor.xml and swap sim cards
between ones that have the item enabled and disabled. We have
also tested to swap data sim cards on dual sim device.
Test: m RunSettingsRoboTests ROBOTEST_FILTER="ShowOperatorNamePreferenceControllerTest"

Change-Id: I03311b96ee660aed80ec867b05aa0a34cfc15f54
2022-04-18 21:34:57 +00:00
Yi Jiang
284cb1c2b2 Fixes 'learn more' link in ScreenTimeoutSettings
Bug: 227292811
Test: make RunSettingsRoboTests

Change-Id: I0e5678e6760ebd590dfd526f362207776ece3a70
2022-04-06 06:49:19 +00:00
PETER LIANG
93d4886297 Merge "Update the preview of the conversation message in the "Display size and text" page." into tm-dev 2022-04-01 16:03:10 +00:00
Peter_Liang
454f21cb21 Update the preview of the conversation message in the "Display size and text" page.
Bug: 227076211
Test: manual test
Change-Id: Ie83f95ba223a42f596c2a4ef68f33f4152a2cc07
2022-04-01 18:09:28 +08:00
Aaron Liu
c138118d48 Home Controls: Add conditional copy for setting.
Add conditional copy for when allow trivial devices setting is disabled.
Add guidance on how to enable it.

Bug: 227344249
Test: Manual and unit test
Change-Id: I0f2f6dc933804ee6ba15dc180dc717d2a5b729a5
2022-03-29 17:27:17 +00:00
Yi Jiang
8edf692915 Moves battery saver warning message below Screen Attention setting.
Test:  make RunSettingsRoboTests -j40
Bug: 220252566
Change-Id: Ib51a0d73c13700c981d1ca789d2ab669e57d814d
Merged-In: Ib51a0d73c13700c981d1ca789d2ab669e57d814d
(cherry picked from commit 70128d9016)
2022-03-24 00:41:03 +00:00
kholoud mohamed
de78149c16 RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I4775d7741c7819fd811c3fc4eda1636b1e04b398
2022-03-17 17:37:45 +00:00
Christian Göllner
982f5507c7 Device state auto-rotation settings: log device state specific state changes
Bug: 221254073
Test: manually + unit tests
Change-Id: Ie8c0d1489d63fd2d19ad604816150b51ede4bb3b
2022-03-09 13:00:55 +00:00
Amy Hsu
372bbdcf9c Add summary and footer message for the ScreenResolutionFragment.
Bug: b/199559703
Test: Check resolution switch UI in Settings app
      atest SettingsUnitTests:ScreenResolutionControllerTest
      atest SettingsUnitTests:ScreenResolutionFragmentTest
Change-Id: Iee1e74d3d4de81500b2abe62bc7e9bd69f55452c
(cherry picked from commit d633cd6b32)
Merged-In: Iee1e74d3d4de81500b2abe62bc7e9bd69f55452c
2022-03-04 02:45:15 +00:00
Amy Hsu
27ad4dcf23 Merge "Add ScreenResolutionController to Settings app" into tm-dev 2022-03-04 01:08:00 +00:00
Menghan Li
d3ec64104d Merge "Remove font size & screen size setup flow instance" into tm-dev 2022-03-03 14:40:17 +00:00
menghanli
a3c62aa1c7 Remove font size & screen size setup flow instance
Bug: 219882220
Bug: 214881137
Test: Build & flash; visual inspection; make RunSettingsRoboTests
Change-Id: I797738388a9fc3e8af21ccee3c1d34771b46126d
2022-03-03 07:43:37 +00:00
Amy Hsu
0dea418d57 Add ScreenResolutionController to Settings app
Settings for resolution switch

Bug: b/199559703
Test: Check resolution switch UI in Settings app
      atest SettingsUnitTests:ScreenResolutionControllerTest
      atest SettingsUnitTests:ScreenResolutionFragmentTest

Change-Id: I46d3be3b82ca512b8672efaa489df2cdaab26d6d
Merged-In: I46d3be3b82ca512b8672efaa489df2cdaab26d6d
2022-03-03 07:23:10 +00:00
Beverly
81da0689ec Don't show the "When to show" PreferenceCategory
If the ambient display isn't available. This includes
AOD wakeup gestures.

Test: manual
Fixes: 195413949
Change-Id: Ief1876e231288274a35db2fb185ac92864450d48
2022-03-01 14:50:07 +00:00
Aaron Liu
e0f4e795ce Home Controls: Add Device Controls settings
Add a setting that would not require authorization for device controls.

Fixes: 216102581
Test: manual
Change-Id: I1fd98a2fbc1cea44d0b2c3612dd1616a053af394
2022-02-23 21:13:06 +00:00
Christian Göllner
ff9065ac95 Add support for device state based auto-rotation preferences in Settings.
- Creates new preferences that are shown when device-state rotation
  is supported.
- Hides standard preferences when device-state rotation is supported.
- Controllers/Preferences for individual folded/unfolded rotation
  settings are created and added programatically based on the settable
  device states available.

Test: Manually + Unit tests
Bug: 195757480
Change-Id: I16f50fd3664756b363c7eb79e5c35eb0d3b6df17
2022-02-21 17:18:04 +01:00
Christian Göllner
3c65556ceb Merge "Revert "Add support for device state based auto-rotation prefere..."" 2022-02-16 17:27:53 +00:00
Christian Göllner
a663f10c4e Revert "Add support for device state based auto-rotation prefere..."
Revert submission 16745827-device-state-auto-rotation-preferences-aops

Reason for revert: Checking if reason for test failures
Reverted Changes:
I77ed93f04:Add support for device state based auto-rotation p...
I5b2791f54:Add support for device state based auto-rotation p...
If254220ca:Add support for device state based auto-rotation p...
If254220ca:Add support for device state based auto-rotation p...

Fix: 219652963
Change-Id: Id95d5d7bb18a28403a6d3199945044e6617e0772
2022-02-16 13:31:16 +00:00
TreeHugger Robot
afdd629808 Merge "Add support for device state based auto-rotation preferences in Settings." 2022-02-15 02:55:55 +00:00
Christian Göllner
78a0e714c4 Add support for device state based auto-rotation preferences in Settings.
- Creates new preferences that are shown when device-state rotation
  is supported.
- Hides standard preferences when device-state rotation is supported.
- Controllers/Preferences for individual folded/unfolded rotation
  settings are created and added programatically based on the settable
  device states available.

Test: Manually + Unit tests
Bug: 195757480
Change-Id: If254220ca3018bc6ec1c4e3947375733f6816f92
2022-02-14 18:51:54 +01:00
PETER LIANG
f676ff2b74 Merge changes I502e52f6,Iabf58566,Ida773967,Ic6c48861,If9e5cc6e, ...
* changes:
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (15/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (14/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (13/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (12/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (11/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (10/n).
2022-02-11 13:42:55 +00:00