Fix a crash due to absence of no-arg fragment constructor.
e.g. if the dialog were shown and the device were rotated, the dialog
could not be restored.
Bug: 272439218
Test: Manual with repro steps before and after
Change-Id: Idca052acff709af132fa72f7919aa71fe8060595
Add the user's "Use location" state to TimeZoneCapabilities. This
information is available anyway and saves the SettingsUI needing to call
LocationManager directly (with the small possibility it would get an
inconsistent answer).
Bug: 262407244
Test: atest tests/robotests/src/com/android/settings/datetime/
Change-Id: I49d4e41b27f9817b3189a7643c24237603e36396
- "Set time zone automatically" changes to "Set automatically".
- "Use location to set time zone" changes to "Use location"
- Add a new summary text with "Location may be used to set time zone".
Fixes: 233968737
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.datetime
Change-Id: Ia16c428e906cda4ebe052bad83c3f574075a7a64
It also makes setting in line with "Set time zone
automatically", which is rendered w/o toggle on search page.
Bug: 185906072
Test: manually verified that toggle is not shown
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"
Change-Id: Ie71572c4a9b9bd6adf3660556363331e2943fd5b
As of now GeoTZ state remains unchanged even if user enables
Location toggle.
Bug: 152746236
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"
Test: checked manually that dialog opens Location settings page
Change-Id: I5fd3288e9d5a7aac3bc82da6944b4ccd6bb9e0f5
Capabilities are extracted to separate class to reuse them
in time API.
Bug: 172891783
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"
Change-Id: If7351c4f022c69262ddffd26efacd449dc7238c5
Previous sub-menu is deleted.
Toggle is always enabled and shows current configuration
setting. If MLS or auto time zone detection is off,
the toggle has not effect.
Bug: 152746236
Test: toggled and checked dumpsys time_zone_detector
Test: checked summary info on different MLS/set time zone automatically
states combinations
Test: m -j30 RunSettingsRoboTests
ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"
Change-Id: I75ee41cfcaaf34b1b63e18809be4cd614446017d
Merged-In: I75ee41cfcaaf34b1b63e18809be4cd614446017d
Move the Location time zone detection setting to Date & Time as per
UI review / product request.
This initial commit just moves the existing MVP setting behavior to a
different screen. Still invisible by default.
Enable with:
$ adb shell setprop persist.sys.location_time_zone_detection_feature_enabled 1
.. plus a reboot.
Bug: 152746236
Test: Manual: build / boot / toggle switch in SettingsUI / inspect output of adb shell dumpsys time_zone_detector
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceControllerTest"
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.locationtimezone.TimeZoneDetectionTogglePreferenceControllerTest"
Test: m -j30 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.datetime.locationtimezone.TimeZoneDetectionSettingsTest"
Change-Id: I9ecfa853014a9f92086a9cb2d34e1517474ceb93