Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e04058f2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add ClassLoaderContextMap.Dump()"

parents 257608f9 b1b4d856
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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.