Add shell command to gnss_time_update_service
Add the shell command infrastructure and an initial shell command
requested by a partner.
The partner would like a way to kick the GnssTimeUpdateService out of
"sleep" so that faked passive GNSS location times will be observed
during tests.
The new command requires SET_TIME permission.
Manually tested / confirmed to work with:
<Build with gnss_time_update_service enabled>
adb shell dumpsys gnss_time_update_service
adb shell cmd gnss_time_update_service start_gnss_listening
adb shell dumpsys gnss_time_update_service
adb shell cmd gnss_time_update_service start_gnss_listening
adb shell dumpsys gnss_time_update_service
[This cherry-pick involved some changes to account for aosp/master
differences. The tests were repeated against aosp/master]
Bug: 236611620
Test: Manual: see above
Test: atest services/tests/servicestests/src/com/android/server/timedetector/GnssTimeUpdateServiceTest.java
Change-Id: I1476a9381e797905d9b2456282cf0eb78d51a304
Merged-In: I1476a9381e797905d9b2456282cf0eb78d51a304
(cherry picked from commit aa771b565430e125140b9e334423cb04cd90f707)
3 files changed