Tidy up synchronization / threading
Tidy up synchronization / threading around the LocationTimeZoneProvider
binder event simulation code.
Test steps:
Prep:
adb shell setprop persist.sys.location_time_zone_detection_feature_enabled 1
adb shell setprop persist.sys.location_tz_simulation_mode.secondary 1
adb shell settings put --user current secure location_time_zone_detection_enabled 1
adb reboot
Testing:
adb shell dumpsys location_time_zone_manager
[Observe detection feature is enabled, user setting is enabled and the
secondary provider is in simulation mode]
adb shell cmd location_time_zone_manager simulate_binder secondary onBind
adb shell cmd location_time_zone_manager simulate_binder secondary \
locationTimeZoneEvent SUCCESS America/Los_Angeles
[Observe the device local time has changed to America/Los_Angeles]
adb shell cmd location_time_zone_manager simulate_binder secondary \
locationTimeZoneEvent SUCCESS Europe/London
[Observe the device local time has changed to Europe/London]
adb shell dumpsys location_time_zone_manager
[Observe events in the dumped output]
Reset:
[Revert changes from prep]
adb reboot
Bug: 152744911
Bug: 149014708
Test: Manual testing (see above)
Change-Id: Id0b9f9d0b2040ecd81b7d8c9df96abfa14d05aaf
Loading
Please register or sign in to comment