Loading java/app.go +1 −6 Original line number Diff line number Diff line Loading @@ -925,8 +925,6 @@ func AndroidAppFactory() android.Module { &module.appProperties, &module.overridableAppProperties) module.usesLibrary.enforce = true android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon) android.InitDefaultableModule(module) android.InitOverridableModule(module, &module.appProperties.Overrides) Loading Loading @@ -1197,9 +1195,6 @@ type UsesLibraryProperties struct { // with knowledge of their shared libraries. type usesLibrary struct { usesLibraryProperties UsesLibraryProperties // Whether to enforce verify_uses_library check. enforce bool } func (u *usesLibrary) addLib(lib string, optional bool) { Loading Loading @@ -1284,7 +1279,7 @@ func (u *usesLibrary) classLoaderContextForUsesLibDeps(ctx android.ModuleContext func (u *usesLibrary) enforceUsesLibraries() bool { defaultEnforceUsesLibs := len(u.usesLibraryProperties.Uses_libs) > 0 || len(u.usesLibraryProperties.Optional_uses_libs) > 0 return BoolDefault(u.usesLibraryProperties.Enforce_uses_libs, u.enforce || defaultEnforceUsesLibs) return BoolDefault(u.usesLibraryProperties.Enforce_uses_libs, defaultEnforceUsesLibs) } // Freeze the value of `enforce_uses_libs` based on the current values of `uses_libs` and `optional_uses_libs`. Loading java/app_import.go +0 −2 Original line number Diff line number Diff line Loading @@ -470,8 +470,6 @@ func AndroidAppImportFactory() android.Module { android.InitDefaultableModule(module) android.InitSingleSourcePrebuiltModule(module, &module.properties, "Apk") module.usesLibrary.enforce = true return module } Loading java/app_import_test.go +9 −9 Original line number Diff line number Diff line Loading @@ -222,31 +222,31 @@ func TestAndroidAppImport_DpiVariants(t *testing.T) { name: "no preferred", aaptPreferredConfig: nil, aaptPrebuiltDPI: []string{}, expected: "verify_uses_libraries/apk/app.apk", expected: "prebuilts/apk/app.apk", }, { name: "AAPTPreferredConfig matches", aaptPreferredConfig: proptools.StringPtr("xhdpi"), aaptPrebuiltDPI: []string{"xxhdpi", "ldpi"}, expected: "verify_uses_libraries/apk/app_xhdpi.apk", expected: "prebuilts/apk/app_xhdpi.apk", }, { name: "AAPTPrebuiltDPI matches", aaptPreferredConfig: proptools.StringPtr("mdpi"), aaptPrebuiltDPI: []string{"xxhdpi", "xhdpi"}, expected: "verify_uses_libraries/apk/app_xxhdpi.apk", expected: "prebuilts/apk/app_xxhdpi.apk", }, { name: "non-first AAPTPrebuiltDPI matches", aaptPreferredConfig: proptools.StringPtr("mdpi"), aaptPrebuiltDPI: []string{"ldpi", "xhdpi"}, expected: "verify_uses_libraries/apk/app_xhdpi.apk", expected: "prebuilts/apk/app_xhdpi.apk", }, { name: "no matches", aaptPreferredConfig: proptools.StringPtr("mdpi"), aaptPrebuiltDPI: []string{"ldpi", "xxxhdpi"}, expected: "verify_uses_libraries/apk/app.apk", expected: "prebuilts/apk/app.apk", }, } Loading @@ -266,7 +266,7 @@ func TestAndroidAppImport_DpiVariants(t *testing.T) { if len(matches) != 2 { t.Errorf("failed to extract the src apk path from %q", jniRuleCommand) } if strings.HasSuffix(matches[1], test.expected) { if test.expected != matches[1] { t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1]) } } Loading Loading @@ -342,7 +342,7 @@ func TestAndroidAppImport_ArchVariants(t *testing.T) { }, } `, expected: "verify_uses_libraries/apk/app_arm64.apk", expected: "prebuilts/apk/app_arm64.apk", }, { name: "no matching arch", Loading @@ -361,7 +361,7 @@ func TestAndroidAppImport_ArchVariants(t *testing.T) { }, } `, expected: "verify_uses_libraries/apk/app.apk", expected: "prebuilts/apk/app.apk", }, { name: "no matching arch without default", Loading Loading @@ -399,7 +399,7 @@ func TestAndroidAppImport_ArchVariants(t *testing.T) { if len(matches) != 2 { t.Errorf("failed to extract the src apk path from %q", jniRuleCommand) } if strings.HasSuffix(matches[1], test.expected) { if test.expected != matches[1] { t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1]) } } Loading java/legacy_core_platform_api_usage.go +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import ( ) var legacyCorePlatformApiModules = []string{ "ArcSettings", "ahat-test-dump", "android.car", "android.test.mock", Loading @@ -42,6 +43,7 @@ var legacyCorePlatformApiModules = []string{ "car-service-test-lib", "car-service-test-static-lib", "CertInstaller", "com.qti.media.secureprocessor", "ConnectivityManagerTest", "ContactsProvider", "CorePerfTests", Loading Loading @@ -120,6 +122,7 @@ var legacyCorePlatformApiModules = []string{ "services.usage", "services.usb", "Settings-core", "SettingsGoogle", "SettingsLib", "SettingsProvider", "SettingsProviderTest", Loading Loading
java/app.go +1 −6 Original line number Diff line number Diff line Loading @@ -925,8 +925,6 @@ func AndroidAppFactory() android.Module { &module.appProperties, &module.overridableAppProperties) module.usesLibrary.enforce = true android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon) android.InitDefaultableModule(module) android.InitOverridableModule(module, &module.appProperties.Overrides) Loading Loading @@ -1197,9 +1195,6 @@ type UsesLibraryProperties struct { // with knowledge of their shared libraries. type usesLibrary struct { usesLibraryProperties UsesLibraryProperties // Whether to enforce verify_uses_library check. enforce bool } func (u *usesLibrary) addLib(lib string, optional bool) { Loading Loading @@ -1284,7 +1279,7 @@ func (u *usesLibrary) classLoaderContextForUsesLibDeps(ctx android.ModuleContext func (u *usesLibrary) enforceUsesLibraries() bool { defaultEnforceUsesLibs := len(u.usesLibraryProperties.Uses_libs) > 0 || len(u.usesLibraryProperties.Optional_uses_libs) > 0 return BoolDefault(u.usesLibraryProperties.Enforce_uses_libs, u.enforce || defaultEnforceUsesLibs) return BoolDefault(u.usesLibraryProperties.Enforce_uses_libs, defaultEnforceUsesLibs) } // Freeze the value of `enforce_uses_libs` based on the current values of `uses_libs` and `optional_uses_libs`. Loading
java/app_import.go +0 −2 Original line number Diff line number Diff line Loading @@ -470,8 +470,6 @@ func AndroidAppImportFactory() android.Module { android.InitDefaultableModule(module) android.InitSingleSourcePrebuiltModule(module, &module.properties, "Apk") module.usesLibrary.enforce = true return module } Loading
java/app_import_test.go +9 −9 Original line number Diff line number Diff line Loading @@ -222,31 +222,31 @@ func TestAndroidAppImport_DpiVariants(t *testing.T) { name: "no preferred", aaptPreferredConfig: nil, aaptPrebuiltDPI: []string{}, expected: "verify_uses_libraries/apk/app.apk", expected: "prebuilts/apk/app.apk", }, { name: "AAPTPreferredConfig matches", aaptPreferredConfig: proptools.StringPtr("xhdpi"), aaptPrebuiltDPI: []string{"xxhdpi", "ldpi"}, expected: "verify_uses_libraries/apk/app_xhdpi.apk", expected: "prebuilts/apk/app_xhdpi.apk", }, { name: "AAPTPrebuiltDPI matches", aaptPreferredConfig: proptools.StringPtr("mdpi"), aaptPrebuiltDPI: []string{"xxhdpi", "xhdpi"}, expected: "verify_uses_libraries/apk/app_xxhdpi.apk", expected: "prebuilts/apk/app_xxhdpi.apk", }, { name: "non-first AAPTPrebuiltDPI matches", aaptPreferredConfig: proptools.StringPtr("mdpi"), aaptPrebuiltDPI: []string{"ldpi", "xhdpi"}, expected: "verify_uses_libraries/apk/app_xhdpi.apk", expected: "prebuilts/apk/app_xhdpi.apk", }, { name: "no matches", aaptPreferredConfig: proptools.StringPtr("mdpi"), aaptPrebuiltDPI: []string{"ldpi", "xxxhdpi"}, expected: "verify_uses_libraries/apk/app.apk", expected: "prebuilts/apk/app.apk", }, } Loading @@ -266,7 +266,7 @@ func TestAndroidAppImport_DpiVariants(t *testing.T) { if len(matches) != 2 { t.Errorf("failed to extract the src apk path from %q", jniRuleCommand) } if strings.HasSuffix(matches[1], test.expected) { if test.expected != matches[1] { t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1]) } } Loading Loading @@ -342,7 +342,7 @@ func TestAndroidAppImport_ArchVariants(t *testing.T) { }, } `, expected: "verify_uses_libraries/apk/app_arm64.apk", expected: "prebuilts/apk/app_arm64.apk", }, { name: "no matching arch", Loading @@ -361,7 +361,7 @@ func TestAndroidAppImport_ArchVariants(t *testing.T) { }, } `, expected: "verify_uses_libraries/apk/app.apk", expected: "prebuilts/apk/app.apk", }, { name: "no matching arch without default", Loading Loading @@ -399,7 +399,7 @@ func TestAndroidAppImport_ArchVariants(t *testing.T) { if len(matches) != 2 { t.Errorf("failed to extract the src apk path from %q", jniRuleCommand) } if strings.HasSuffix(matches[1], test.expected) { if test.expected != matches[1] { t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1]) } } Loading
java/legacy_core_platform_api_usage.go +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import ( ) var legacyCorePlatformApiModules = []string{ "ArcSettings", "ahat-test-dump", "android.car", "android.test.mock", Loading @@ -42,6 +43,7 @@ var legacyCorePlatformApiModules = []string{ "car-service-test-lib", "car-service-test-static-lib", "CertInstaller", "com.qti.media.secureprocessor", "ConnectivityManagerTest", "ContactsProvider", "CorePerfTests", Loading Loading @@ -120,6 +122,7 @@ var legacyCorePlatformApiModules = []string{ "services.usage", "services.usb", "Settings-core", "SettingsGoogle", "SettingsLib", "SettingsProvider", "SettingsProviderTest", Loading