Commit Graph

559 Commits

Author SHA1 Message Date
Peter_Liang
edb52508d3 New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (12/n).
- Link-up between the preview, font size, and display size preferences.
- Add the preview preference and entry.

Bug: 211503117
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingPreviewControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingPreviewPreferenceTest
Change-Id: Ic6c48861a0051670fd78b13dca5488711de30cb8
2022-02-10 20:59:41 +08:00
Jonathan Scott
a2781721e2 Merge "Allow overriding of strings referenced in XML files." 2022-02-09 10:48:09 +00:00
Steven Ng
89f5e2e497 Show "Turns on at bedtime" in Dark theme setting based on feature flag
Test: atest SettingsRoboTests:com.android.settings.display.darkmode.*
Bug: 217866453
Change-Id: Ic40975d4506f812790768339e48441a048529df3
2022-02-08 11:45:39 +00:00
Jonathan Scott
269f97d960 Allow overriding of strings referenced in XML files.
Test: manual
Bug: 188414370
Change-Id: Ice45b1808530c14c4efff16795cac7b2cb81516e
2022-02-07 21:00:05 +00:00
Steven Ng
7f0cc14af8 Replace hard-coded bedtime action with Settings.ACTION_BEDTIME_SETTINGS
Test: atest SettingsRoboTests:com.android.settings.display.darkmode.*
Bug: 216645903
Change-Id: I3c3a00fa53528056538ab1ae34c011b4b44b3fdf
2022-02-01 16:56:17 +00:00
Jonathan Scott
c3dbc3ffbd Merge "Allow Device Management Role Holder to update Settings strings." 2022-01-31 19:10:30 +00:00
TreeHugger Robot
0ae266c6fb Merge "Add dark theme custom type into the dark theme settings page" 2022-01-28 01:59:07 +00:00
Christian Göllner
f1128f0c21 Merge "Small refactor to allow more customization of AutoRotate settings in extending classes" 2022-01-27 12:59:04 +00:00
Steven Ng
3859251be0 Add dark theme custom type into the dark theme settings page
Also fix some test cases.

I'd prefer using Robolectric shadows rather than mocking Android
framework classes. However, I can't do that in this CL due to the
lack of multiple shadow classes support.

Test: make RunSettingsRoboTests -j56
      ROBOTEST_FILTER=com.android.settings.display.darkmode.*
Bug: 215182463
Change-Id: If557d2933927a5dd0fadd3f6db6bb6f0ab7dd5ee
2022-01-26 16:15:52 +00:00
Jonathan Scott
e0d439472f Allow Device Management Role Holder to update Settings strings.
Test: manual
Bug: 188414370
Change-Id: I6e1a06619799a9e99382d791e72e2e4518f93cac
2022-01-25 19:03:24 +00:00
Peter_Liang
93668d6002 New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (4/n).
- Extending the interface of AppGridView to be flexible. It will be used
in the TextReadingPreferenceFragment.
  1. Add a new attribute "appCounts" into the view.
  2. Default app counts as 6 if not set the attribute.

Bug: 211503117
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER=AppGridViewTest
Change-Id: I94a5f1d037551f6faba0300a176feb11fba1f203
2022-01-13 18:56:16 +08:00
Alex Florescu
e0169ec1fa Small refactor to allow more customization of AutoRotate settings in
extending classes

Bug: 195757480
Test: manual
Change-Id: I8d041933a77d0e6d0118c5e12ed02483ec4b14d5
2022-01-12 09:28:40 +00:00
Fabian Kozynski
cbe9bebb8e Start brightness dialog in same task
That way, enter and exit animations can be overriden

Test: manual
Fixes: 210177675
Change-Id: I77c33a77e3128597bfe09d427ba0c06e7c78136e
2021-12-28 14:16:33 +00:00
TreeHugger Robot
b8c35bc89f Merge "Move the text under slider bar to the description under title" into sc-v2-dev am: 0f0e27cf6a am: b944d7f110
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16379115

Change-Id: I0d00297b4bdb9844b569f40a6d5cae56929b8f0c
2021-12-10 01:39:54 +00:00
Sunny Shao
b5bb0e85a1 Move the text under slider bar to the description under title
- Make this change after discussed with UX team.

Fixes: 206737771
Test: manual test
Change-Id: I9517933312d8db400f6d40b4124815ad275014ec
2021-12-09 17:13:26 +08:00
Jason Chiu
d2e506fd20 Merge "Revise homepage highlight mechanism" into sc-v2-dev am: 7bfe3e869a am: 3b9ad4de7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16366004

Change-Id: Ib86f125d24836fb955d5dd31ec26f250460d3161
2021-12-03 09:46:31 +00:00
Jason Chiu
a305c23f5e Revise homepage highlight mechanism
- Create TopLevelHighlightMixin to handle highlight actions and simplify
  TopLevelSettings
- Fix the error highlight and the flicker after screen rotation
- Postpone creating the fragment until it's needed to accelerate the
  initialization and to fix the search highlight function breakage after
  toggling light/dark mode
- Register activity embedding rules only once for injection and
  wallpaper
- Do not highlight Tips & support since it's full screen
- Refactor ActivityEmbeddingRulesController

Bug: 207316936
Test: manual, robotest build pass
Change-Id: If322ec180b03ee123987c70779a25c6a570d9faf
2021-12-03 12:04:48 +08:00
TreeHugger Robot
fb0ca145aa Merge "Fix overlapped problem in SuW two panes mode" into sc-v2-dev am: cd8a01d2fd am: c6bc7a7c4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16332784

Change-Id: I8c1f0b3a19239f85a4f67b53dd703ed7a9d3a625
2021-11-29 06:15:11 +00:00
Sunny Shao
644a2b9bc6 Fix overlapped problem in SuW two panes mode
- The previous preview page will overlap the right pane in RTL language.
- The root cause is the false value of the clipToPadding and
  clipChildren.
- Use the TTheme.DeviceDefault.Settings.

Fixes: 204955818
Test: manual test
Change-Id: I75c7f419cf93ebe9c4e9e3cb24835163a6b01e11
2021-11-26 17:20:50 +08:00
Matt Pietal
a5415907ea Allow a settings override for double-line clock
This setting allows users to always show a single-line format clock,
regardless of notification status.

Fixes: 194905512
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.display
Change-Id: I94ade1b2d968e5783750e7a98a9a5d28cc22b659
2021-11-17 19:29:19 +00:00
Matt Pietal
cb4836b486 [DO NOT MERGE] Allow a settings override for double-line clock
This setting allows users to always show a single-line format clock,
regardless of notification status.

Fixes: 194905512
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.display
Change-Id: I94ade1b2d968e5783750e7a98a9a5d28cc22b659
2021-11-17 13:34:36 +00:00
Ronish Kalia
0b30679a2c Merge changes from topic "qr-code-and"
* changes:
  Add tests for QRCodeScannerPreferenceController
  Add a new setting for QR Code Scanner button on lockscreen
2021-11-15 16:35:45 +00:00
TreeHugger Robot
71ab9aefcb Merge "Register rule for wallpaper entry" into sc-v2-dev am: 6c24e5bc33 am: d34752cce6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16180475

Change-Id: I90e42051ccdf056da7899bf5a04125d3d945fe20
2021-11-05 01:25:37 +00:00
Tsung-Mao Fang
b3db40a02b Register rule for wallpaper entry
We should keep consistent split rule for wallpaper and other home menu
item. So, we create this cl to register the split rule for wallpaper.

Also, I do some minor refactoring in this cl for reusing existing
method and better code quality.

Test: Go to wallpaper, and click back key. App can close.
Fix: 204406425
Fix: 204364572

Change-Id: Ia7de9483b351d1121cc26c4af1cb8a89ad0a16bc
2021-11-04 18:48:59 +08:00
ronish
2d0ded469e Add a new setting for QR Code Scanner button on lockscreen
This change adds a new setting to enable/disable the lock screen entry
point for QR Code scanner

Bug: 200536509
Test: make RunSettingsRoboTests -j40

Change-Id: Id200499b62f59fd631d837f9ae8e494532c23e13
2021-11-02 16:20:02 +00:00
Jason Chiu
7f6b9e26c9 Merge changes from topic "slice-highlight" into sc-v2-dev am: 6821b6be32 am: 026b1b5df6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16151654

Change-Id: If46903bb26371ea90075d1c6cc063af4d10a88d4
2021-11-02 02:43:42 +00:00
Jason Chiu
2989c50a23 Add highlight menu keys for all toggle pref controllers and custom slices
Bug: 204695404
Test: manual, robotest build pass, unit
Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2021-11-01 15:00:18 +08:00
Kunhung Li
068b235c12 Merge "Not use NEW_TASKS for Wallpaper & style's 2-pane UX" into sc-v2-dev am: f83531e0b3 am: 4e77f2d62c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15938355

Change-Id: I87c801dbd33fba3a851090ca91eae6bcc81aa1a5
2021-10-06 14:38:36 +00:00
Kunhung Li
f83531e0b3 Merge "Not use NEW_TASKS for Wallpaper & style's 2-pane UX" into sc-v2-dev 2021-10-06 14:05:10 +00:00
Kunhung Li
c692af2a76 Not use NEW_TASKS for Wallpaper & style's 2-pane UX
Refine launch mode to support 2-pane UX for Settings.

Bug: 197609643
Test: make RunSettingsRoboTests
Change-Id: I5212bbcf8c512fac571284379a29cf487f387c5a
2021-10-06 14:04:08 +00:00
TreeHugger Robot
fe13cd070d Merge "Update font/display size pages for support large screen in SuW" into sc-v2-dev am: 9ade901dd7 am: 87895d0893
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15895175

Change-Id: Icb7de5c7fc4bd8f89f7ef04b0cd9e8eb36a1c882
2021-10-06 06:42:34 +00:00
Sunny Shao
f9beef43c9 Update font/display size pages for support large screen in SuW
- Follow the SuW design of the UI guideline.
- Add the footer button for each pages.
- Add a new AccessibilityScreenSizeForSetupWizardActivity for SuW.
- Add suw_font_size_fragment.xml and suw_screen_zoom_fragment.xml
  for each fragment.
- Shorten 50% of the preview height.

Bug: 194447311
Fixes: 199369859
Test: manual test
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.accessibility
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.display
Change-Id: I2685e96d37d542490521ec24cfce490f87cbd88d
2021-10-06 11:41:57 +08:00
Abel Tesfaye
88bbe6b320 Delete SmartAutoRotatePreference and move callback logic to controller
This CL was merged before then reverted because it had a runtime error in the xml file

Test: locally with flame

Bug: 200111886
Change-Id: I986340c361c7a8a32cfce0d3040ee25d62c3c64e
2021-09-16 19:27:30 +00:00
Bryce Lee
1bb8507b75 Revert "Delete SmartAutoRotatePreference and move callback logic to controller"
This reverts commit c69bf78181.

Reason for revert: b/200111886

Change-Id: I232fef4ddef955223140db606d4ed6a5e8c8caf6
2021-09-16 06:11:31 +00:00
Abel Tesfaye
dc909e2a13 Add toggle switch for auto rotate preference in display settings.
Bug: 183471038

Test: locally with flame & crosshatch
Change-Id: Iea4dbdd6df8a53f0fb79b82c97892256ad072c1d
2021-09-15 03:41:45 +00:00
Abel Tesfaye
c69bf78181 Delete SmartAutoRotatePreference and move callback logic to controller
Test: locally with flame

Bug: 199914593
Change-Id: I7cbca268dd15738e2ae21c65c3b6b545599e45de
2021-09-14 19:00:35 +00:00
Wilson Wu
9edf79741d Update settings PrimarySwitchPreference reference
To make InputMethodPreference support 2 target
reference, CL[1] move the PrimarySwitchPreference
into SettingsLib.

Change all PrimarySwitchPreference reference to
Settingslib one and remove the original one.

[1]: Idea3935d95b8d22b00ca89313e9eb3e979e4aa74

Bug: 197705032
Test: Presubmit
Change-Id: I95d111522344bb7cbdd380382e48fe60a5ebc9a2
2021-09-02 13:10:19 +08:00
TreeHugger Robot
80544241db Merge "Prototyping : Demo Image on color setting" into sc-qpr1-dev am: 7efaff8d0f am: f680c9b0b5 am: 85e6aba27f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15531055

Change-Id: I8e6d18b8be6960be4e1557a07405d65412205b70
2021-08-14 07:49:54 +00:00
Alfred Lin
7f8e775754 Prototyping : Demo Image on color setting
Implement prototyping of demo image on color setting

Bug: 182797883
Test: adb shell am instrument -w -e class com.android.settings.display.ColorModePreferenceFragmentTest com.android.settings.tests.unit/androidx.test.runner.AndroidJUnitRunner test pass
Change-Id: Iebaaa6867f2039a25a5e1fd280a89b5bc9297e6b
2021-08-13 15:08:58 +00:00
Abel Tesfaye
4735da065e Add toggle switch for auto rotate preference in display settings.
Bug: 181299673

Test: locally with flame & crosshatch
Change-Id: Iea4dbdd6df8a53f0fb79b82c97892256ad072c1d
2021-08-10 20:55:27 +00:00
Yuri Lin
e9f13fbd5e Rename RadioButtonPreference -> SelectorWithWidgetPreference.
This change is to reduce ambiguity as we're adding the option to style the preference like a checkbox as well.

Bug: 190180868
Test: SelectorWithWidgetPreferenceTest, RunSettingsLibRoboTests
Change-Id: Ie414347bf67ed394ef495604890c5851fc42dbc7
2021-07-20 17:01:21 -04:00
TreeHugger Robot
11c602bdf2 Merge "Fix the flickering on display/font size page" into sc-dev 2021-07-09 09:00:40 +00:00
Tsung-Mao Fang
f9ff6344e4 Fix the flickering on display/font size page
In framework design, framework needs to have a snapshot
when there's a config change event since redrawing window
takes some time.
Flickering problem is caused by the timing issue between the
snapshot mechinsm and local preview update.

User can observe the flickering problem if config commit()->
snapshot in framework(old screenshot) -> app update the preview
-> snapshot(old screen) fade out.

To prevent this problem, we make sure that we update the local preview
first and then we do the commit later. In this proposal, snapshot action
is able to get the new snaptshot for the new preview.

So, the core workaround is commitOnNextFrame, we ask a delay before
we submit the commit(). Note: It doesn't matter that we use
Choreographer or main thread handler since the delay time is longer
than 1 frame. Use Choreographer to let developer understand it's a
window update.

Fix: 148192402
Test: manual test
Change-Id: I9bfc5eb39e7a9ebce2fe1414d6f0a9dd470708e8
2021-07-09 14:02:34 +08:00
Pyuli Naithani
c0302ab306 Merge "Add stats log for sensor privacy." into sc-dev 2021-07-08 17:24:52 +00:00
Pyuli Naithani
c9dfa59d7c Add stats log for sensor privacy.
Test: statsd_testdrive 381

BUG: 192269258

Change-Id: I69e766b789b4b4a6ca0ad26b3a312baca3dbccd2
2021-07-07 05:26:51 +00:00
TreeHugger Robot
8f9488eefb Merge "Fix camera permission warning message not disappearing after permission is re-granted" into sc-dev 2021-07-02 19:59:32 +00:00
Abel Tesfaye
2000bb8da2 Fix camera permission warning message not disappearing after permission is re-granted
Test: locally

Bug: 191907683
Change-Id: Idb45e99ff9f0569ad43aadcde830f0c69a3be4f3
2021-07-02 18:48:20 +00:00
Abel Tesfaye
f60885a040 Hide battery saver warning and camera privacy lock on devices that do not support smart-auto-rotate
Bug: 191924078

Test: locally on crosshatch
Change-Id: I8464860c3d1d59c5d4549e7c488457e92054dbba
2021-07-01 19:17:37 +00:00
Stanley Wang
ec95ed2650 Fix the problem that the ToggleSubscriptionDialogActivity
appears twice when switch changed.

- Don't trigger the switch change event if the state of Switch and
  SwitchSettingsMainSwitchPreference are the same.

Fix: 190767461
Test: robotest and operate the switch preference manually

Change-Id: I6ab4b7e5ca1455948ca9118bb4a674fdc4fdbd50
2021-06-29 14:55:15 +08:00
Yi Jiang
2de946e584 Merge "Hides Screen Attention setting when AttentionService isn't installed." into sc-dev 2021-06-22 16:59:20 +00:00