Commit Graph

7 Commits

Author SHA1 Message Date
Alexander Roederer
6d879999ea Add log for enable/disable zen mode
Adds logging for button on confirmation dialog after enable/disable zen
mode toggle is clicked.

Bug: 356154473
Flag: android.app.modes_ui
Test: build and flash
Change-Id: Ie1dc1c14e1519541da641a69a217cf8a5dfa54f2
2024-08-21 21:34:44 +00:00
Alexander Roederer
64593a873a Adds Zen metrics categories
Assigns metrics categories to all modes pages under
ZenModesListFragment. Includes new metrics categories where appropriate.

Bug: 332937635
Test: Build and flash
Flag: android.app.modes_ui
Change-Id: Ic19862ec194b40eae294d3c30240fe3f51304665
2024-08-14 20:27:13 +00:00
Matías Hernández
4222bed264 Revert^2 "Tweak Modes layouts and use updated strings to match mocks"
This reverts commit 9804955ad5.

Reason for revert: Wrongly reverted; unrelated to the error

Change-Id: I94a2b05589fa80218db184e192f1c4a633ab61b0
2024-07-31 15:45:11 +00:00
ELIYAZ MOMIN
9804955ad5 Revert "Tweak Modes layouts and use updated strings to match mocks"
This reverts commit 0359aaeb47.

Reason for revert: <Potential culprit for b/356564046  - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>

Change-Id: I980838773078d822d20608e5975a26cf8dbed2be
2024-07-31 14:56:30 +00:00
Matías Hernández
0359aaeb47 Tweak Modes layouts and use updated strings to match mocks
Bug: 333682392
Test: mostly manual, also ZenModeTriggerUpdatePreferenceControllerTest
Flag: android.app.modes_ui
Change-Id: I5bae828a55128f3cb0b07ea0ff21ca196e7564dc
2024-07-30 17:45:38 +00:00
Matías Hernández
b8b897e552 Improve lifecycle of ZenModeFragment & friends
* Don't keep Settings observers longer than start-stop.
* Only call updateState() once on controllers during create->start->resume.
* Remove some duplicate controller update methods from ZenModesFragmentBase (we can directly call DashboardFragment's).
* Don't update controllers if unrelated modes were changed.
* Extract ZenSettingsObserver for use in the link tile later.
* Add tests.

Fixes: 353946788
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I64b51714d699b5c3a592a76fcb615d2999998829
2024-07-29 20:10:03 +02:00
Matías Hernández
e8306014f0 Fix jiggle when opening custom manual modes
Looks like setting Preference visibility in updateState() is too late to avoid an animation, and isAvailable() should be used instead. This forces us to split ZenModeSetTriggerLinkPreferenceController (which handled the category and its two children) into separate controllers for the category and each child. Although untangling this code was annoying, the result is arguably cleaner, since the two child preferences deal with different things.

Fixes: 355623101
Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Change-Id: I5fb1b3cbe424973b852f820ecf948491c050421f
2024-07-26 17:44:53 +00:00