summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/bootclasspath_fragment.go4
-rw-r--r--java/platform_compat_config.go6
-rw-r--r--java/sdk.go4
3 files changed, 6 insertions, 8 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go
index ef2cdae27..5c1c5f0c9 100644
--- a/java/bootclasspath_fragment.go
+++ b/java/bootclasspath_fragment.go
@@ -150,7 +150,7 @@ func bootclasspathFragmentInitContentsFromImage(ctx android.EarlyModuleContext,
imageName := proptools.String(m.properties.Image_name)
if imageName == "art" {
// TODO(b/177892522): Prebuilts (versioned or not) should not use the image_name property.
- if m.MemberName() != "" {
+ if android.IsModuleInVersionedSdk(m) {
// The module is a versioned prebuilt so ignore it. This is done for a couple of reasons:
// 1. There is no way to use this at the moment so ignoring it is safe.
// 2. Attempting to initialize the contents property from the configuration will end up having
@@ -205,7 +205,7 @@ func (b *BootclasspathFragmentModule) bootclasspathImageNameContentsConsistencyC
imageName := proptools.String(b.properties.Image_name)
if imageName == "art" {
// TODO(b/177892522): Prebuilts (versioned or not) should not use the image_name property.
- if b.MemberName() != "" {
+ if android.IsModuleInVersionedSdk(b) {
// The module is a versioned prebuilt so ignore it. This is done for a couple of reasons:
// 1. There is no way to use this at the moment so ignoring it is safe.
// 2. Attempting to initialize the contents property from the configuration will end up having
diff --git a/java/platform_compat_config.go b/java/platform_compat_config.go
index edfa146f9..712c2a203 100644
--- a/java/platform_compat_config.go
+++ b/java/platform_compat_config.go
@@ -226,10 +226,8 @@ type platformCompatConfigSingleton struct {
func isModulePreferredByCompatConfig(module android.Module) bool {
// A versioned prebuilt_platform_compat_config, i.e. foo-platform-compat-config@current should be
// ignored.
- if s, ok := module.(android.SdkAware); ok {
- if !s.ContainingSdk().Unversioned() {
- return false
- }
+ if android.IsModuleInVersionedSdk(module) {
+ return false
}
return android.IsModulePreferred(module)
diff --git a/java/sdk.go b/java/sdk.go
index 1c097d5b7..cbd873d33 100644
--- a/java/sdk.go
+++ b/java/sdk.go
@@ -356,6 +356,7 @@ func createAPIFingerprint(ctx android.SingletonContext) {
"frameworks-base-api-current.txt",
"frameworks-base-api-system-current.txt",
"frameworks-base-api-module-lib-current.txt",
+ "services-system-server-current.txt",
}
count := 0
ctx.VisitAllModules(func(module android.Module) {
@@ -369,8 +370,7 @@ func createAPIFingerprint(ctx android.SingletonContext) {
ctx.Errorf("Could not find all the expected API modules %v, found %d\n", apiTxtFileModules, count)
return
}
- cmd.Input(android.PathForSource(ctx, "frameworks/base/services/api/current.txt")).
- Text("| md5sum | cut -d' ' -f1 >").
+ cmd.Text("| md5sum | cut -d' ' -f1 >").
Output(out)
} else {
// Unbundled build