summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dexpreopt/class_loader_context.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/dexpreopt/class_loader_context.go b/dexpreopt/class_loader_context.go
index b79f2d7a6..94b9adf76 100644
--- a/dexpreopt/class_loader_context.go
+++ b/dexpreopt/class_loader_context.go
@@ -258,6 +258,9 @@ const AnySdkVersion int = android.FutureApiLevelInt
func (clcMap ClassLoaderContextMap) addContext(ctx android.ModuleInstallPathContext, sdkVer int, lib string,
hostPath, installPath android.Path, nestedClcMap ClassLoaderContextMap) error {
+ // For prebuilts, library should have the same name as the source module.
+ lib = android.RemoveOptionalPrebuiltPrefix(lib)
+
devicePath := UnknownInstallLibraryPath
if installPath == nil {
if android.InList(lib, CompatUsesLibs) || android.InList(lib, OptionalCompatUsesLibs) {