Adds ability for users to select posturing as the trigger for when
dreams will be shown.
Bug: 383208131
Test: locally - mp droid and verified posturing option is displayed in
Settings
Flag: android.service.dreams.allow_dream_when_postured
Change-Id: Iae69b9e488181b1e2af7474e3e9879a92b51274c
Switch and SwitchCompat are both CompoundButton.
Using CompoundButton in Java will helps migration in the future.
Bug: 306658427
Test: manual - check Settings pages
Change-Id: If2e08a9a9557ec66a3b31ef18cd2e15943098a59
If a user can't enable screen saver, they shouldn't be able to
accidentally find screen saver related settings in Settings.
Bug: 260276394
Test: atest ScreenSaverPreferenceControllerTest
Test: manually by settings up a second user on a device that supports
screen saver, switching to that user, and making sure that searches for
"screen saver" don't accidentally reveal settings that can't be
accessed.
Change-Id: If2f465b2acb548455f0868507cf47217ea1a626f
Only show the "additional info", which displays dream complications,
when supported by the user selected dream.
Test: make -j86 RunSettingsRoboTests
ROBOTEST_FILTER="com.android.settings.dream.DreamSettingsTest"
Test: verified on device switching between different dreams
Bug: 223860510
Fix: 223860510
Change-Id: I63872ea9ab9f42be47f8e2f7c3835b55056e6588
The summary for screensaver preference is updated to, e.g. "On / Art
gallery".
Bug: 261907383
Test: 'make -j64 RunSettingsRoboTests \
ROBOTEST_FILTER="com.android.settings.dream.DreamSettingsTest"'
Change-Id: I40483f266c42a6e49e513208ba513d469d67f85a
Merged-In: I40483f266c42a6e49e513208ba513d469d67f85a
The summary for screensaver preference is updated to, e.g. "On / Art
gallery".
Bug: 261907383
Test: 'make -j64 RunSettingsRoboTests \
ROBOTEST_FILTER="com.android.settings.dream.DreamSettingsTest"'
Change-Id: I40483f266c42a6e49e513208ba513d469d67f85a
For devices which don't support dreaming on battery, we can offer
simpler options since the device must always be charging for
screensavers to appear. Therefore there are only two options:
1. While charging
2. While docked and charging
Test: flashed and verified on device
Test: make -j64 RunSettingsRoboTests
Fixes: 226187572
Change-Id: I6ed24cda8874f2fb941f6cfded9ed97ed78a3cb6
"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.
Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
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
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
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
This component allows the user to select dream complications to
enable/disable.
Bug: 215703483
Test: locally on device
Change-Id: I03dd9d67b4aeb3f41885b42391d97c18bd7465f6
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId
Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function
Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
The context must be a UI context. This is a new requirement in P.
(Also converted the CurrentDream controller to be slice compatible)
Change-Id: I28874f296da617f4cedf6706b0663b76671f1780
Fixes: 111375261
Test: robotests
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936
Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).
Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.
Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
Reworked the way screensaver settings are laid out for O. Instead of
using the options menu and dialogs to navigate screensaver options,
there are now two rows: one row for the screensaver choice and
optionally its own settings, and one row for the "when to show" setting.
And now there's a nice obvious button you can press to preview your
choices.
Test: 'export ROBOTEST_FILTER="RadioButtonListFragmentTest";\
mmm -j20 packages/apps/Settings/tests/robotests'
Bug: 35031991
Change-Id: Ie7d2055fb45f6dfe72e34cb9598d9a25f7bee75a