Merge "Revert "Re-land "Move odexes of non-system apps into system_other"""

This commit is contained in:
Anton Hansson
2020-09-15 09:31:07 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -568,8 +568,7 @@ func OdexOnSystemOtherByName(name string, dexLocation string, global *GlobalConf
} }
for _, f := range global.PatternsOnSystemOther { for _, f := range global.PatternsOnSystemOther {
// See comment of SYSTEM_OTHER_ODEX_FILTER for details on the matching. if makefileMatch(filepath.Join(SystemPartition, f), dexLocation) {
if makefileMatch("/"+f, dexLocation) || makefileMatch(filepath.Join(SystemPartition, f), dexLocation) {
return true return true
} }
} }

View File

@@ -109,12 +109,13 @@ func TestDexPreoptSystemOther(t *testing.T) {
{module: productModule, expectedPartition: "product"}, {module: productModule, expectedPartition: "product"},
}, },
}, },
// product/app/% only applies to product apps inside the system partition
{ {
patterns: []string{"app/%", "product/app/%"}, patterns: []string{"app/%", "product/app/%"},
moduleTests: []moduleTest{ moduleTests: []moduleTest{
{module: systemModule, expectedPartition: "system_other/system"}, {module: systemModule, expectedPartition: "system_other/system"},
{module: systemProductModule, expectedPartition: "system_other/system/product"}, {module: systemProductModule, expectedPartition: "system_other/system/product"},
{module: productModule, expectedPartition: "system_other/product"}, {module: productModule, expectedPartition: "product"},
}, },
}, },
} }
@@ -134,7 +135,7 @@ func TestDexPreoptSystemOther(t *testing.T) {
} }
if rule.Installs().String() != wantInstalls.String() { 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())
} }
} }
} }