diff options
author | 2022-04-27 17:51:49 +0100 | |
---|---|---|
committer | 2022-04-28 13:22:52 +0100 | |
commit | 91f015e73e6260b10f055972dd9f6bca9ca30f9d (patch) | |
tree | 90cbc5f68ecbb92d97ee2f4f7b77c66b93344c0f /dexpreopt/class_loader_context.go | |
parent | a465e28bcb6c65ebb6fb67ce06ec748d5bfb700f (diff) |
Correctly serialize class loader context for "any" SDK version to JSON.
Previously "any" was serialized as its numeric value, 10000. But other
code in makefiles and scripts expects string "any", and dexpreopt.config
files generated by Make (for Android.mk modules) have "any" not 10000.
Bug: 214255490
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
&& adb wait-for-device && adb root \
&& adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'
# empty output, no errors at boot
Change-Id: Id5e80eb8a90d9786b5cb999c172aaecb44952f76
Diffstat (limited to 'dexpreopt/class_loader_context.go')
-rw-r--r-- | dexpreopt/class_loader_context.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dexpreopt/class_loader_context.go b/dexpreopt/class_loader_context.go index 36513b64b..d0a6a39df 100644 --- a/dexpreopt/class_loader_context.go +++ b/dexpreopt/class_loader_context.go @@ -678,6 +678,9 @@ func toJsonClassLoaderContext(clcMap ClassLoaderContextMap) jsonClassLoaderConte jClcMap := make(jsonClassLoaderContextMap) for sdkVer, clcs := range clcMap { sdkVerStr := fmt.Sprintf("%d", sdkVer) + if sdkVer == AnySdkVersion { + sdkVerStr = "any" + } jClcMap[sdkVerStr] = toJsonClassLoaderContextRec(clcs) } return jClcMap |