Add command line support for testing tz detection
Add support for "adb shell cmd time_zone_detector".
This allows platform developers and future host tests to simulate
clients like telephony / SettingsUI and make changes to the
TimeZoneDetectorService state to mimic various real-world situations.
Example adb shell invocations:
Withdraw a previous telephony suggestion from slot_index=0:
cmd time_zone_detector suggestTelephonyTimeZone --suggestion --slot_index 0 \
--zone_id "_"
Make a new telephony suggestion from slot_index=0, with a quality of
TelephonyTimeZoneSuggestion.QUALITY_SINGLE_ZONE, and a matchType of
TelephonyTimeZoneSuggestion.MATCH_TYPE_NETWORK_COUNTRY_ONLY:
cmd time_zone_detector suggestTelephonyTimeZone --suggestion --slot_index 0 \
--zone_id "Europe/London" --quality single --match_type country
Make a manual (user) suggestion as if from SettingsUI:
cmd time_zone_detector suggestManualTimeZone --suggestion --zone_id America/Los_Angeles
Bug: 140712361
Test: Various command line invocations.
Test: atest core/tests/coretests/src/android/app/timezonedetector
Merged-In: I0f16868a526d2ea4b17acbd274cb2359f93166f5
Change-Id: I0f16868a526d2ea4b17acbd274cb2359f93166f5
(cherry picked from commit 4879487862e287679423c86c7a2be9ff5608e674)
7 files changed