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

Commit b1b4d856 authored by Paul Duffin's avatar Paul Duffin
Browse files

Add ClassLoaderContextMap.Dump()

Test: n/a
Change-Id: I1e1ad0093301a463d8d03b07cf58710b65e3dc6d
parent 49e0e811
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -15,6 +15,7 @@
package dexpreopt
package dexpreopt


import (
import (
	"encoding/json"
	"fmt"
	"fmt"
	"sort"
	"sort"
	"strconv"
	"strconv"
@@ -360,6 +361,15 @@ func (clcMap ClassLoaderContextMap) UsesLibs() (ulibs []string) {
	return ulibs
	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.
// Now that the full unconditional context is known, reconstruct conditional context.
// Apply filters for individual libraries, mirroring what the PackageManager does when it
// Apply filters for individual libraries, mirroring what the PackageManager does when it
// constructs class loader context on device.
// constructs class loader context on device.