diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go index 93351f1fc..d44cf7ea3 100644 --- a/dexpreopt/dexpreopt.go +++ b/dexpreopt/dexpreopt.go @@ -532,7 +532,7 @@ func OdexOnSystemOtherByName(name string, dexLocation string, global *GlobalConf } for _, f := range global.PatternsOnSystemOther { - if makefileMatch(filepath.Join(SystemPartition, f), dexLocation) { + if makefileMatch("/" + f, dexLocation) || makefileMatch(filepath.Join(SystemPartition, f), dexLocation) { return true } } diff --git a/dexpreopt/dexpreopt_test.go b/dexpreopt/dexpreopt_test.go index eff2416e5..6f7d3bb67 100644 --- a/dexpreopt/dexpreopt_test.go +++ b/dexpreopt/dexpreopt_test.go @@ -153,7 +153,7 @@ func TestDexPreoptSystemOther(t *testing.T) { moduleTests: []moduleTest{ {module: systemModule, expectedPartition: "system_other/system"}, {module: systemProductModule, expectedPartition: "system_other/system/product"}, - {module: productModule, expectedPartition: "product"}, + {module: productModule, expectedPartition: "system_other/product"}, }, }, }