Merge "Add ClassLoaderContextMap.Dump()"
This commit is contained in:
commit
e04058f291
1 changed files with 10 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue