releasetools: Add a hard-coded codename-API mapping.
This is to work around signing APKs that are still targeting 'Q' instead
of API 29.
Bug: 132882632
Test: Sign a target_files.zip with such APKs.
Change-Id: I6a58a496d555f1f18e90d1c430b83b7e13b9b825
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index c698b1c..ae77b46 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -969,6 +969,10 @@
codename = codename.strip()
if codename:
result[codename] = api_level
+
+ # Work around APKs that still target 'Q' instead of API 29 (b/132882632).
+ result['Q'] = 29
+
return result