Files
frameworks_base/core/java/android/debug
William Hester 99a7d633b3 Fix Test Harness Mode to work with new ADB file
Because the ADB keys are now stored in adb_temp_keys.xml as well, Test
Harness Mode should back up and restore that file. To resolve a comment
in the initial CL, it uses a LocalService to actually interact with the
AdbService to retrieve the file, so any future changes in file location
should be immediately propagated to Test Harness Mode.

There were also two minor bugs fixed in this CL:
1) When serializing the adb keys to the XML file, if the allowedTime was
   0, they were all removed
2) If all keys are removed, the file was only an XML header and therefore
   invalid XML

Test: adb shell cmd testharness enable
Test: adb shell settings put global adb_allowed_connection_time 1;
unplug device, plug device back in, adb shell cat
/data/misc/adb/adb_temp_keys.xml (should return 'No such file or
directory')
Change-Id: I09e2998a0b80660486502f7486d4c838219c342c
2019-02-08 12:38:08 -08:00
..