Revert^3 "Enforce <uses-library> checks for android_app and android_app_import."
This reverts commit c2b6b65d7380407757dc596af00ee954b3cc2968.
Reason for revert: These changes should only be reverted in
rvc-qpr-dev-plus-aosp, but not in master.
Bug: 132357300
Test: treehugger
Change-Id: I3243668ce9a399936b0e9dde09c42db6cc45d562
diff --git a/java/app_import_test.go b/java/app_import_test.go
index 0f45a62..d7f69eb 100644
--- a/java/app_import_test.go
+++ b/java/app_import_test.go
@@ -182,31 +182,31 @@
name: "no preferred",
aaptPreferredConfig: nil,
aaptPrebuiltDPI: []string{},
- expected: "prebuilts/apk/app.apk",
+ expected: "verify_uses_libraries/apk/app.apk",
},
{
name: "AAPTPreferredConfig matches",
aaptPreferredConfig: proptools.StringPtr("xhdpi"),
aaptPrebuiltDPI: []string{"xxhdpi", "ldpi"},
- expected: "prebuilts/apk/app_xhdpi.apk",
+ expected: "verify_uses_libraries/apk/app_xhdpi.apk",
},
{
name: "AAPTPrebuiltDPI matches",
aaptPreferredConfig: proptools.StringPtr("mdpi"),
aaptPrebuiltDPI: []string{"xxhdpi", "xhdpi"},
- expected: "prebuilts/apk/app_xxhdpi.apk",
+ expected: "verify_uses_libraries/apk/app_xxhdpi.apk",
},
{
name: "non-first AAPTPrebuiltDPI matches",
aaptPreferredConfig: proptools.StringPtr("mdpi"),
aaptPrebuiltDPI: []string{"ldpi", "xhdpi"},
- expected: "prebuilts/apk/app_xhdpi.apk",
+ expected: "verify_uses_libraries/apk/app_xhdpi.apk",
},
{
name: "no matches",
aaptPreferredConfig: proptools.StringPtr("mdpi"),
aaptPrebuiltDPI: []string{"ldpi", "xxxhdpi"},
- expected: "prebuilts/apk/app.apk",
+ expected: "verify_uses_libraries/apk/app.apk",
},
}
@@ -225,7 +225,7 @@
if len(matches) != 2 {
t.Errorf("failed to extract the src apk path from %q", jniRuleCommand)
}
- if test.expected != matches[1] {
+ if strings.HasSuffix(matches[1], test.expected) {
t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1])
}
}
@@ -302,7 +302,7 @@
},
}
`,
- expected: "prebuilts/apk/app_arm64.apk",
+ expected: "verify_uses_libraries/apk/app_arm64.apk",
},
{
name: "no matching arch",
@@ -321,7 +321,7 @@
},
}
`,
- expected: "prebuilts/apk/app.apk",
+ expected: "verify_uses_libraries/apk/app.apk",
},
{
name: "no matching arch without default",
@@ -359,7 +359,7 @@
if len(matches) != 2 {
t.Errorf("failed to extract the src apk path from %q", jniRuleCommand)
}
- if test.expected != matches[1] {
+ if strings.HasSuffix(matches[1], test.expected) {
t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1])
}
}