Merge "Revert^3 "Package dexpreopt artifacts for libcore jars in the ART apex."" am: d4f1febbc3 am: a4cc733b17
am: db28e7d416

Change-Id: I078c9a6470c1a0fcdbdd36ce5012990c0670ba03
diff --git a/cc/config/vndk.go b/cc/config/vndk.go
index 3e8abac..28eb509 100644
--- a/cc/config/vndk.go
+++ b/cc/config/vndk.go
@@ -107,6 +107,8 @@
 	"libaudioutils",
 	"libbinder",
 	"libcamera_metadata",
+	"libcodec2_hidl@1.0",
+	"libcodec2_vndk",
 	"libcrypto",
 	"libdiskconfig",
 	"libdumpstateutil",
@@ -130,6 +132,7 @@
 	"libsqlite",
 	"libssl",
 	"libstagefright_amrnb_common",
+	"libstagefright_bufferpool@2.0",
 	"libstagefright_bufferqueue_helper",
 	"libstagefright_enc_common",
 	"libstagefright_flacdec",
@@ -157,6 +160,7 @@
 	"libstagefright_soft_vorbisdec",
 	"libstagefright_soft_vpxdec",
 	"libstagefright_soft_vpxenc",
+	"libstagefright_softomx",
 	"libstagefright_xmlparser",
 	"libsysutils",
 	"libtinyxml2",
diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go
index 46e0f0a..6f92153 100644
--- a/dexpreopt/dexpreopt.go
+++ b/dexpreopt/dexpreopt.go
@@ -495,8 +495,7 @@
 	}
 
 	for _, f := range global.PatternsOnSystemOther {
-		// See comment of SYSTEM_OTHER_ODEX_FILTER for details on the matching.
-		if makefileMatch("/"+f, dexLocation) || makefileMatch(filepath.Join(SystemPartition, f), dexLocation) {
+		if makefileMatch(filepath.Join(SystemPartition, f), dexLocation) {
 			return true
 		}
 	}
diff --git a/dexpreopt/dexpreopt_test.go b/dexpreopt/dexpreopt_test.go
index 6f8120e..820f9e7 100644
--- a/dexpreopt/dexpreopt_test.go
+++ b/dexpreopt/dexpreopt_test.go
@@ -103,12 +103,13 @@
 				{module: productModule, expectedPartition: "product"},
 			},
 		},
+		// product/app/% only applies to product apps inside the system partition
 		{
 			patterns: []string{"app/%", "product/app/%"},
 			moduleTests: []moduleTest{
 				{module: systemModule, expectedPartition: "system_other/system"},
 				{module: systemProductModule, expectedPartition: "system_other/system/product"},
-				{module: productModule, expectedPartition: "system_other/product"},
+				{module: productModule, expectedPartition: "product"},
 			},
 		},
 	}
@@ -128,7 +129,7 @@
 			}
 
 			if rule.Installs().String() != wantInstalls.String() {
-				t.Errorf("\npatterns: %v\nwant installs:\n   %v\ngot:\n   %v", test.patterns, wantInstalls, rule.Installs())
+				t.Errorf("\nwant installs:\n   %v\ngot:\n   %v", wantInstalls, rule.Installs())
 			}
 		}
 	}