Commit Graph

44671 Commits

Author SHA1 Message Date
Peter Zhang
f0013da134 Improve the UI of Press & hold power button settings
The following changes has been made:
- The on/off toggle for Assistant now becomes two radio selectors ("Power Menu" and "Digital Assistant"). This is to make things clearer that Press & hold power button can be configured to power menu.
- The corresponding power menu animation will be shown when "Power Menu" is selected.
- The Assistant specific sensitivity settings and the foot notes are hidden when "Power Menu" is selected.
- Some minor wording updates according to the requests from Assistant / Settings UXW.

Bug: 229722937
Test: robotest, manual
Change-Id: Ib356fba861ad8c4a2626a0e0bd8cf3e4d90ce9a6
2022-07-22 16:07:52 +02:00
Milton Wu
68247caafc Send metric intent back to SUW
Add metric intent if ChooseLockGeneric is triggered in SUW.
1. Save the result bundle data from ChooseLockGeneric to cache inside
   BiometricEnrollActivity and pass back to SUW after all finished.
2. Since fingerprint enrollment trigger points in SUW for
   fingerprint-only or fingerprint + faceAuth devices are all moved
   from SetupFingerprintEnrollIntroduction to BiometricEnrollActivity,
   remove deprecated code from SetupFingerprintEnrollIntroduction.

Bug: 235458700
Test: Manually test fingerprint enroll with SUW or w/o SUW
Test: Manually test fingerprint enroll with unicorn SUW
Test: atest BiometricEnrollActivityTest
Test: robo tests FingerprintEnrollIntroductionTest
Change-Id: I34b2884ab4c2c65d464d91eaef0f58c72dad438b
2022-07-22 08:53:48 +00:00
menghanli
33dda10ae7 Remove obsoleted code: AccessibilityGestureNavigationTutorial
Don't show the button tutorial when changing into sysem button navigation

Bug: 197695932
Test: make RunSettingsRoboTest
Change-Id: Ied90a602cd3228ee6f36b4b50fb1c019429a271e
2022-07-22 15:38:09 +08:00
Wesley Wang
01eabef95b Merge "Update battery optimize page states condition" 2022-07-22 06:16:08 +00:00
Vincent Wang
9937a51355 Merge "Fix Delete face model button flicker" 2022-07-22 04:17:43 +00:00
Julia Reynolds
de6ed69527 Merge "Improve App notification loading" into tm-qpr-dev am: 4ab5255893 am: 6292d9ff8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19290333

Change-Id: Ifb860cdab87fc01ba578346167361a1d30ae9695
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 21:06:49 +00:00
Julia Reynolds
6292d9ff8c Merge "Improve App notification loading" into tm-qpr-dev am: 4ab5255893
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19290333

Change-Id: Iac930f653c146436863978c1c98439d2e63a6837
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 20:48:46 +00:00
Julia Reynolds
4ab5255893 Merge "Improve App notification loading" into tm-qpr-dev 2022-07-21 20:30:21 +00:00
Julia Reynolds
f3b9bf55a9 Move zen rule deletion
To a non-exported component

Test: manually delete a rule in Settings
Fixes: 233607507
Change-Id: I6c4ac930eb62a2068582021d0ad16b93fbc9bdd3
2022-07-21 14:54:42 -04:00
Neil Fuller
d8b54cd28d Merge "Change high/low bound logic for manual date/time" 2022-07-21 09:22:48 +00:00
Vincent Wang
65f53e98e3 Fix Delete face model button flicker
Update the visibility of button in onCreate & onActivityResult to
avoid button flicker

Bug: 191112124
Test: Reference reproduce step in b/191112124
Change-Id: I68e42433631db27e3f8f03ab4fc68e2326852f9b
2022-07-21 09:06:51 +00:00
Peter_Liang
e1c4901ce8 Fix the inconsistent alignment of the main switch preference.
Remove the redundant function.

Bug: 232494666
Test: manual test
Change-Id: I1827d39b194048452b71c680e2bbf94e43bfcac5
2022-07-21 00:56:07 +08:00
Julia Reynolds
e90507373c Improve App notification loading
1) Use UiBlocker, for better animations for apps with a lot of channels
2) Only load data in onResume, because the data loading step in some
of the controllers is expensive

Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.notification"
Test: load small channel and large (6000ish) channel app pages
Test: load individual channel pages
Test: load in-app channel shelf UI
Fixes: 215072888
Change-Id: I9a1c96f75b02f94b3ffc529d17d9c0cad7752de1
2022-07-20 15:27:52 +00:00
TreeHugger Robot
ef289f99b5 Merge "Refactor Battery Chart View State Controll" 2022-07-20 13:34:35 +00:00
Zaiyue Xue
d4f9588a3d Refactor Battery Chart View State Controll
When users click the battery chart, the orignal behavior is that the view changes the state by itself.
This cl refactors the bahavior to that the view callbacks to the controller, and
the controller changes the view's state.
In this way, the controller is the only source of truth of the state.
This meets the controller-view model.

Test: manual
Bug: 239491373, 236101166
Change-Id: I754ded2dba20319f1571374dfdbef27f2420ed78
2022-07-20 09:38:23 +00:00
Himanshu Rawat
aa1950fd80 Don't cancel passkey entry pairing autonomously
Bluetooth pairing is cancelled if the pairing popup is closed without
explicitly accepting the pairing. However there is no way to
explicitly accept the pairing when the local device displays for the
passkey entry or pin key entry pairing method.
As a result all passkey entry and pin key entry pairings, where the
local device is displaying the value, are cancelled after the pairing
is successful. If the BT stack has not completed the SDP search when
the pairing is cancelled after successful pairing, it may result in
removal of the bond information.

Bug: 237757124
Test: Pair with BT HID keyboard; adb logcat | grep "BTPairingController:
Pairing dialog canceled"

Change-Id: Ifdb98c16084dd811eed68469e7df5d1913c6ace8
2022-07-20 03:33:55 +00:00
TreeHugger Robot
1489a54577 Merge "Update all preferences when the account preference updates UI" into tm-qpr-dev am: 6e14ff02e8 am: b47e7b4248
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19192851

Change-Id: I7772126785874bfa190e70003221c5a8a9e39ec5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 03:07:12 +00:00
TreeHugger Robot
b47e7b4248 Merge "Update all preferences when the account preference updates UI" into tm-qpr-dev am: 6e14ff02e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19192851

Change-Id: I832dcbc2fa78a81f9d64169d80cdc5a9aed5df4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 02:48:33 +00:00
TreeHugger Robot
6e14ff02e8 Merge "Update all preferences when the account preference updates UI" into tm-qpr-dev 2022-07-20 02:22:44 +00:00
TreeHugger Robot
42c02ad936 Merge "Prevent leaking Wi-Fi dialog on lock screen" into tm-qpr-dev am: bd41fe5a5b am: 3d6b632232
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19207636

Change-Id: I66292ce19a0616253ec8f23a185d34aa7a03a977
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 20:24:42 +00:00
Treehugger Robot
de39a970c5 Merge "Fix incorrect storage calculation when SD card is inserted" am: e705fcd7c3 am: 2a0a88af4d am: dad4720a31 am: cb4de95600 am: 3ce3686836
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147780

Change-Id: Id8a56f0aceb2710d4ce2c0445b233f3f808185b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 20:09:02 +00:00
TreeHugger Robot
f7f800793c Merge "Add class BatteryDiffData used to parcel battery usage data" 2022-07-19 18:01:45 +00:00
TreeHugger Robot
3d6b632232 Merge "Prevent leaking Wi-Fi dialog on lock screen" into tm-qpr-dev am: bd41fe5a5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19207636

Change-Id: I8ea19a4c48286a2185450116f06a3314087c5be8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 17:21:39 +00:00
TreeHugger Robot
bd41fe5a5b Merge "Prevent leaking Wi-Fi dialog on lock screen" into tm-qpr-dev 2022-07-19 17:02:10 +00:00
Kuan Wang
5c98e155c2 Add class BatteryDiffData used to parcel battery usage data
Add class BatteryDiffData used to parcel battery usage diff data per
apps. It behaves as an interface between UI and data.

Bug: 236101687
Test: make RunSettingsRoboTests
Change-Id: I59daa9e8c5de2105ebf24c7a585c02e554735e78
2022-07-19 15:47:51 +00:00
Neil Fuller
d0a3929327 Change high/low bound logic for manual date/time
This commit moves knowledge of the upper / lower bounds for valid manual
date suggestions to (internal) API calls.

It adds a test to confirm the API calls are used to configure the date
dialog.

Further, it removes redundant filtering from the client that would
prevent suggestion calls being made if the settings UI considers them
invalid. Year bounds are already used to limit the UI entry, and the
system server will return false from the service call if the suggestion
is invalid, though the SettingsUI doesn't do anything (behaviorally)
with the false before or after this change.  After this change it is
logged.

The goal of this change is to allow users with devices that don't have
the Y2038 issue to enter dates > 2037. This could have been done with
a smaller change, but the use of the new internal class
TimeDetectorHelper means that the bounds logic is in one place. The
lower bound (on mobile devices) can now be changed relatively easily by
touching one class.

Bug: 228967927
Test: m RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime"
Change-Id: Iaf1ca8220e0e96773aa71b595da9c1ba1e50d59d
2022-07-19 13:43:36 +01:00
TreeHugger Robot
e18e92699e Merge "In BatteryChartViewV2, use levels.length-1 to replace mTrapezoidCount. So the chartview could show any number of slots as the given levels length-1." 2022-07-19 10:57:05 +00:00
Jason Chiu
c89755525f Update all preferences when the account preference updates UI
When an account is added or removed, the account preference controller
just updates the account list, whereas there's no trigger point for the
account data sync preferences to refresh.

Add an API to update all preferences in DashboardFragment, so we can
refresh the account sync preferences whenever the account list is
updated.

Bug: 185479221
Test: robotest, manual
Change-Id: Ide3d972abae09ce0175e3bafbb1f4a5e307d20c8
2022-07-19 10:32:23 +00:00
Zaiyue Xue
837a8f0063 In BatteryChartViewV2, use levels.length-1 to replace mTrapezoidCount. So the chartview could show any number of slots as the given levels length-1.
Test: manual
Bug: 236101166, 239491373
Change-Id: I9625ed80e8eba6632cc864ada0ba3e9cf11de82a
2022-07-19 16:54:59 +08:00
Wesley Wang
7e8d79b3c2 Update battery optimize page states condition
- Keep apps optimize state as what it set even it's a system or default
   app
 - Previously we force system/defualt apps present as Unrestricted mode
   only and disable other options but that can not shows that apps
   actual optimize states, it's possible to be other states even it's a
   system or default apps, so we change the UI logic back to: present
   it's actual states and disable other options when it's a system or
   default apps.

Bug: 234419032
Test: make SettingsRoboTests
Change-Id: Ib5b6cb0aacb570cb8d15b1bb9ac2d480356eda49
2022-07-19 16:27:14 +08:00
wesleycwwang
97b5163651 Add dock charging state into stay awake feature (1/2)
Bug: 233704731
Test: make RunSettingsRoboTests
Change-Id: I48e5279f24f7252c6bf7433a598df796942ed756
2022-07-19 08:19:26 +00:00
Treehugger Robot
3ce3686836 Merge "Fix incorrect storage calculation when SD card is inserted" am: e705fcd7c3 am: 2a0a88af4d am: dad4720a31 am: cb4de95600
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147780

Change-Id: I1bf71a120f7db3f388a5e279a7e13ece80eef571
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 01:06:43 +00:00
Treehugger Robot
cb4de95600 Merge "Fix incorrect storage calculation when SD card is inserted" am: e705fcd7c3 am: 2a0a88af4d am: dad4720a31
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147780

Change-Id: Ia8f4762a938a8b4dc2b8ac503b42792cc3cd882a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 20:43:47 +00:00
Simon Wingrove
ef498ef53d Distinguish multiple PendingIntents via requestCode am: 25686219d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19289844

Change-Id: Id8509feac060578cf8d7ffb4d7a7b9def221f029
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 19:19:15 +00:00
Menghan Li
7fa6e7df05 Merge "Refactor AccessibilityControlTimeoutPreferenceFragment to improve maintainability" 2022-07-18 13:52:29 +00:00
Simon Wingrove
25686219d3 Distinguish multiple PendingIntents via requestCode
Settings uses a system of intent extras to open subsettings pages. When
PendingIntents are created from these Intents, the system does not think
they are unique as extras are not included in this equality check. So
only one of them is likely to work.

A unique request code can be used to distinguish between them.

Bug: 238605613
Test: atest LockScreenSafetySourceTest
Merged-In: Ia59197eeb86e988d9ffbb86caff4bbda7b30f059
Change-Id: Ia59197eeb86e988d9ffbb86caff4bbda7b30f059
(cherry picked from commit f2b0cedcd0)
2022-07-18 11:18:28 +00:00
Simon Wingrove
3db36eb530 Merge "Distinguish multiple PendingIntents via requestCode" 2022-07-18 11:13:42 +00:00
menghanli
236a376211 Refactor AccessibilityControlTimeoutPreferenceFragment to improve maintainability
Root cause: There is a bunch of different logic of preferences in AccessibilityControlTimeoutPreferenceFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out logic of AccessibilityControlTimeoutPreferenceFragment into controllers to reduce the complexity of the relationship between preference and fragment.

Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility
Change-Id: I22e6e3b9e2f199ac1721fc069690321ad5f7a0d4
2022-07-18 15:50:52 +08:00
Zaiyue Xue
24bc269ec1 Refactor BatteryChartView X-axis labels. Instead of
only timestamps, also support any string[] labels.

Bug: 236101166
Test: manual
Change-Id: I84763ccce0ee63da0b5b26e1416bf5bd5b58963d
2022-07-18 14:25:24 +08:00
Treehugger Robot
dad4720a31 Merge "Fix incorrect storage calculation when SD card is inserted" am: e705fcd7c3 am: 2a0a88af4d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147780

Change-Id: Iaa69c78ca9535382935688f7d9b41724c3f179ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-16 03:21:01 +00:00
Treehugger Robot
2a0a88af4d Merge "Fix incorrect storage calculation when SD card is inserted" am: e705fcd7c3
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2147780

Change-Id: I6ba5b7c40e87df6c231e0c774913b1320c9c3996
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-16 02:51:11 +00:00
Treehugger Robot
e705fcd7c3 Merge "Fix incorrect storage calculation when SD card is inserted" 2022-07-16 02:35:19 +00:00
Menghan Li
95c771c02f Merge changes Ia52cd272,Ie8acdcb8
* changes:
  Refactor CaptionAppearanceFragment to improve maintainability (2/n)
  Refactor CaptionAppearanceFragment to improve maintainability (1/n)
2022-07-15 11:47:37 +00:00
TreeHugger Robot
8f36fb7fda Merge "[Le Audio] Use the ThemeResolver instead of setTheme() to avoid the theme res may be updated in the future and we need to update it manually." 2022-07-15 10:31:08 +00:00
Zoey Chen
5e9a00f72f [Le Audio] Use the ThemeResolver instead of setTheme() to avoid the theme res may be updated in the future and we need to update it manually.
Bug: 238841204
Test: manual
Change-Id: I3801f23244f6f54b6147390edccf026da1f0f9c6
2022-07-15 06:56:36 +00:00
TreeHugger Robot
0936f72020 Merge "Save isCanceled state and restore when rotation" into tm-qpr-dev am: 3028e52501 am: 3928fcabab
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19267966

Change-Id: Ic6dc3e346111fa03331e1ad3509b106a6672a9d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 05:54:47 +00:00
TreeHugger Robot
3928fcabab Merge "Save isCanceled state and restore when rotation" into tm-qpr-dev am: 3028e52501
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19267966

Change-Id: I6072236085c1feec6588d8b06931517086f32d48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 05:21:45 +00:00
TreeHugger Robot
3028e52501 Merge "Save isCanceled state and restore when rotation" into tm-qpr-dev 2022-07-15 05:03:40 +00:00
Wesley Wang
1c3cbc9c24 Merge "Add dock charging state into stay awake feature (1/2)" 2022-07-15 02:55:30 +00:00
TreeHugger Robot
dc6fc8711c Merge "Run lock before fingerprint enroll" into tm-qpr-dev am: e49a84480b am: 14f791bf73
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19260206

Change-Id: I30a019887d77c29f88e97c83cb25327910558aba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-15 00:55:20 +00:00