summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author William Hester <williamhester@google.com> 2022-06-15 17:24:50 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2022-06-28 01:26:35 +0000
commitc113a129072f3c73c8b56fcd35ee117ede11abe9 (patch)
tree2d67e7f48908378abe0ce327a7e43bf31ddf9cce /libs/androidfw/StringPool.cpp
parente75a6b7767a8ae22a5f71f22e755cb10faca54b9 (diff)
Fix ADB key file reading
The "adb_temp_keys.xml" file is used to keep track of each ADB key and when it was previously connected. It also keeps track of authorized WiFi networks. It is written correctly, however, the parser currently is unable to read the file that it wrote, meaning that: 1. ADB keys never properly expire 2. WiFi APs are never properly restored Furthermore, because of complex interactions with restoring the adb_keys file in Test Harness Mode, duplicate keys get appended repteatedly to the adb_keys file if they're not in the key map. This cleans up the file, making it more testable, adds tests for the previously broken functionality, and just performs some simple restructuring of bits of the code that were error-prone. Now, the adb_keys file is nothing but a view of the temp keys file. When keys are added to the temp keys file, we completely rewrite the adb_keys file with the set of keys present in the temp keys file, meaning that duplicates cannot be added. This also introduces a method for other system services (primarily for TestHarnessModeService) to notify the AdbDebuggingManager that the key files were modified, and it should reload the state. Bug: 236299256 Test: atest AdbDebuggingManagerTest Change-Id: Iae955aca17e873288d58b16f184bd4d325d50d86 (cherry picked from commit efb8194ec4f4c60817999aa190c931a41f2196c7) Merged-In: Iae955aca17e873288d58b16f184bd4d325d50d86
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions