Commit Graph

13 Commits

Author SHA1 Message Date
Lucas Silva
d8b90650d3 Update dream settings categories, to fix padding.
The extra PreferenceCategory is adding some unnecessary padding, so
removing it. Instead of using a preference category to enable/disable
all items, we just iterate through all the preferences when
enabling/disabling items.

Bug: 227139218
Test: locally on device
Change-Id: I403295fbccb7b135b7d603cd1fc713c4c0189569
2022-04-14 18:59:53 +00:00
Victor Truong
cd11aa887a Disable dream highlight when screensaver is disabled in Settings.
Bug: 228329639
Test: Manual
Change-Id: Ic6d9664cc800c28327fbcaa1628bb518c07354f2
2022-04-12 13:23:10 +00:00
Xiaowen Lei
f3dce9d7d4 Update the function used to log the dream picking events.
The behavior is identical to before (for StatsLogWriter), but switching
to the generic function with the appropriate field names.

Bug: 213906448
Test: on device via `statsd_testdrive 97`
Change-Id: I241d110b531567cb828a2ed849c79b6595a4b4d1
2022-04-01 15:28:20 +00:00
Lucas Silva
d9071dea25 Add master toggle to enable/disable screen savers
The new control toggles the Settings.Secure.SCREENSAVER_ENABLED setting,
which controls if a screen saver is enabled. Also removed the "Never"
option from the WhenToDream picker, since this is now controlled via the
toggle.

Test: locally on device
Bug: 222360260
Change-Id: Ibcf52b5e2d1ad0c295f32c4c18bfc89082d074ce
2022-03-08 10:27:59 -05:00
Lucas Silva
5e91b7eab3 Allow other layouts to be passed into the dream view adatper.
This will let the OOBE flow use a different layout than the regular
Settings view.

Bug: 221227402
Test: locally on device
Change-Id: I27545b7dad1d789adcae8589480d29bc5231c98c
2022-02-24 16:45:03 +00:00
Lucas Silva
c7709aebb3 Add dream descriptions to dream settings UI.
The dream descriptions will now be shown underneath the title, if the
dream has provided one.

We also cleaned up the icon view, instead merging it with the title view
to ensure proper alignment between the icon and title.

Bug: 221078654
Test: locally on device
Test: atest DreamPickerControllerTest
Change-Id: I00fd69c294f1a5fbcbc5392eba342f2896f6d9ed
2022-02-24 16:25:24 +00:00
Lucas Silva
75c44cd02b Update dream settings UX to match latest mocks.
Updates:
- removed individual complication toggle
- added single toggle which enables/disables all supported complications
- updated colors to match mocks
- updated grid padding in order to line up with existing content. Note:
  this required more complex padding logic, using an item decorator to
  apply the padding only to inner grid elements.
- updated preview image, removing view nesting to make better use of
  ConstraintLayout
- Updated some strings to match mocks

Test: locally on device
Bug: 217555053
Change-Id: I573e5f4ed807cbe2ae9e00f183d402e6e3339590
2022-02-15 17:32:01 +00:00
Lucas Silva
12945af711 Implement floating dream preview button.
Bug: 217556080
Test: locally on device
Change-Id: If76dce6a250fc5fc37d26fc3d7a31775333055d7
2022-02-10 20:42:12 +00:00
Lucas Silva
06e373dcb0 Add oobe dream settings activity
This activity will be displayed during the deferred setup wizard flow

http://recall/-/eh4NkVnIpkjUSU9uGPTn1S/dxeTM32hyJXN3nDKsRQfrZ

Test: locally on device
Bug: 215651884
Bug: 216195180
Change-Id: I9d8eef411a190cdbfc1a33d1bbbee61338ddd154
2022-02-01 19:10:16 +00:00
Lucas Silva
f0f7adc612 Implement dream complication settings.
This component allows the user to select dream complications to
enable/disable.

Bug: 215703483
Test: locally on device
Change-Id: I03dd9d67b4aeb3f41885b42391d97c18bd7465f6
2022-01-28 17:32:36 +00:00
Lucas Silva
55df7acc51 Dream settings refactor.
We will be re-using the grid UI for the dream complication picker, so
this change refactors some of that logic so it can be re-used in the
complication controller.

We also update some of the UI here to match the most recent UX
decisions.

http://screen/BxhAwZwQSVoxUmN.png

Test: locally on device
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.dream.DreamPickerControllerTest"
Bug: 214250590
Bug: 215703483
Change-Id: I9fbfa0f0cd31ae3d119c7cd1a9562d4cdb203d6c
2022-01-27 19:51:32 +00:00
Xiaowen Lei
b11d8a44c9 Log user action for selecting dream.
Test: on device via statsd_testdrive
Bug: 213906448

Change-Id: Ida57a6755054c0741f3fb0c2222425535150fb5a
2022-01-25 22:20:39 +00:00
Lucas Silva
38d0a7ca91 Rewrite dream settings.
The available dreams will now be shown in a grid, with a preview button
at the bottom.

Screenshot (white placeholder image used):
http://screen/6pe6EoACPoQN8TZ.png
http://screen/4nR6Wg5pN7pL6Wb.png

Phone (single column layout):
http://screen/4WFqzZR8Yf9H3VZ.png

Colors and margins will be finalized once final mocks are done.

Bug: 207681076
Bug: 214250590
Test: locally on device
Change-Id: Ie68bdc60e74e72dc3c3cee3f1ffd40f5613109b9
2022-01-18 16:06:34 +00:00