Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 37aff893 authored by Neil Fuller's avatar Neil Fuller
Browse files

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 48794878)
parent 920105c3
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