Skip to content
Commit 2856d9e5 authored by Neil Fuller's avatar Neil Fuller
Browse files

Improve server flags / add more server control

Add more server flags that can be pushed to devices to influence geo
detection service behavior.

This renames DeviceConfig as ServerFlags and introduces an intermediary,
the ServiceConfigAccessor, to hide details and handle changes to config
values that need the location_time_zone_manager to restart.

Simulating server flag changes example:
adb shell cmd device_config put \
    system_time primary_location_time_zone_provider_enabled_override false

Inspecting manager / provider states:
adb shell dump location_time_zone_manager

The following manual tests were conducted to check the plumbing:

Modifying settings behavior:
adb shell cmd device_config put \
    system_time location_time_zone_detection_setting_enabled_override true
<Confirm the settings value cannot be changed by user>

adb shell cmd device_config put \
    system_time location_time_zone_detection_setting_enabled_override false
<Confirm the settings value can be changed by user>

adb shell cmd device_config delete \
    system_time location_time_zone_detection_setting_enabled_override
<Confirm it returns to normal>

Disabling the feature / location_time_zone_manager:
adb shell cmd device_config put \
    system_time location_time_zone_detection_feature_supported false
<Confirm SettingsUI (after restart) doesn't show the geo detection option>
<Confirm manager is not started>

Enabling the feature / location_time_zone_manager:
adb shell cmd device_config put \
    system_time location_time_zone_detection_feature_supported true
<Confirm manager is restarted>

Note: "cmd device_config" doesn't allow multiple config keys to be
changed at once, and any change to service config keys cause the
location_time_zone_manager to restart. When changing multiple, set
"location_time_zone_detection_feature_supported false" to stop the
manager, and "location_time_zone_detection_feature_supported true" when
all changes are done.

Test: Manual testing (see above)
Test: treehugger
Bug: 178107773
Change-Id: I07b57add1ed47197587907b9f0a85f38acc0a76a
parent 35c53e2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment