diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-07-14 12:57:56 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-07-14 12:57:56 +0000 |
commit | e04058f291041531ed45b4d4da2eaea647dcb942 (patch) | |
tree | f051e92cff13c3eae4085d5663ec0ea4b0d12564 | |
parent | 257608f993c4505bcc6cbf640ffe07adf16ab45f (diff) | |
parent | b1b4d856e171b0c6089ea32bbca6ea4a2496565b (diff) | |
download | soong-android-s-beta-4.tar.gz |
Merge "Add ClassLoaderContextMap.Dump()"android-s-beta-4android-s-beta-3android-s-beta-4
-rw-r--r-- | dexpreopt/class_loader_context.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dexpreopt/class_loader_context.go b/dexpreopt/class_loader_context.go index f76a205aa..b79f2d7a6 100644 --- a/dexpreopt/class_loader_context.go +++ b/dexpreopt/class_loader_context.go @@ -15,6 +15,7 @@ package dexpreopt import ( + "encoding/json" "fmt" "sort" "strconv" @@ -360,6 +361,15 @@ func (clcMap ClassLoaderContextMap) UsesLibs() (ulibs []string) { return ulibs } +func (clcMap ClassLoaderContextMap) Dump() string { + jsonCLC := toJsonClassLoaderContext(clcMap) + bytes, err := json.MarshalIndent(jsonCLC, "", " ") + if err != nil { + panic(err) + } + return string(bytes) +} + // Now that the full unconditional context is known, reconstruct conditional context. // Apply filters for individual libraries, mirroring what the PackageManager does when it // constructs class loader context on device. |