Bedtime is no longer a special case.
Fixes: 361592187
Test: atest com.android.settings.display.darkmode
Flag: android.app.modes_ui
Change-Id: Iddc5d8142d6bc0bb1f5c4ead876ee201c8818b12
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
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
Fix: 177967926
Fix: 177968295
Fix: 177967925
Fix: 177968078
Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Ie854de96e5495fa564fb8a097ed4547bbd2b10c5
We only keep the one in display settings.
Test: robo test and search dark mode in settings search.
Fix: 155735315
Change-Id: I71041f473944e854ef4601063658021bb9411069
- Add interfaces to set/get metrics category in BasePreferenceController
for descendants having a chance to get it.
- Set metrics category in DashboardFragment
- Automatically log metrics in onPreferenceChange of
TogglePreferenceController
- Add support for TwoStateButtonPreference in TogglePreferenceController
to make the preference generic
Bug: 137559984
Test: robotest
Change-Id: Ia7e0d24a3db1991b18e0286d9894570fa71247a3
allows the use to set the start and end automatic dark theme
activation within a day.
Test: run all settings tests
Change-Id: If96fc050159724d553acb09c2da4fab1d5ff519f
disable toggle options and disable the dark theme drop down selection
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.DarkUIPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeActivationPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeObserverTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeScheduleSelectorControllerTest"
Fixes: 145098277
Fixes: 145297188
Fixes: 145254016
Change-Id: I5c81a295810cc2d9a45657978104647e9c15da46
This reverts commit 50c0fa136c.
Reason for revert: Fixed the error which is code incompatibility
Test: run all settings tests
Change-Id: I8f05b50f8198c4b2565bb9b6f62ddda5029c8365
Merged-In: I8f05b50f8198c4b2565bb9b6f62ddda5029c8365
Bug: 141567787
Adding a settings page similar to night light for Dark theme. it will allow the user to schedule
dark mode from sunrise to sunset
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.DarkUIPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeActivationPreferenceControllerTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeObserverTest" && \
make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.display.darkmode.DarkModeScheduleSelectorControllerTest"
Fixes: 141567787
Change-Id: I3094b655c04f59c23a95162a1be5ee8260e28a48
(cherry picked from commit 0828e6be9c)