From ba6ab2e791f81d1c54f10d2bd986d25a9693f3eb Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 19 Mar 2020 15:23:38 +0000 Subject: [PATCH] Make system_server stubs consistent with other stubs Include the module_api stubs in system_server one instead of putting both of these jars on the classpath. Also rename it to be in line with the other stubs. Bug: 149293194 Test: m Exempt-From-Owner-Approval: approved internally Change-Id: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e Merged-In: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e (cherry picked from commit bbd78556daf4a7e015f2e3ddfe9539909e9ebf40) --- java/java.go | 2 +- java/sdk.go | 2 +- java/sdk_test.go | 4 ++-- java/testing.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/java.go b/java/java.go index 8c779f5c4..fa2351e55 100644 --- a/java/java.go +++ b/java/java.go @@ -847,7 +847,7 @@ func (m *Module) getLinkType(name string) (ret linkType, stubs bool) { return javaModule, true case ver.kind == sdkModule: return javaModule, false - case name == "services-stubs": + case name == "android_system_server_stubs_current": return javaSystemServer, true case ver.kind == sdkSystemServer: return javaSystemServer, false diff --git a/java/sdk.go b/java/sdk.go index ded2a061b..0e132d399 100644 --- a/java/sdk.go +++ b/java/sdk.go @@ -406,7 +406,7 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep return toModule([]string{"android_module_lib_stubs_current"}, "framework-res", sdkFrameworkAidlPath(ctx)) case sdkSystemServer: // TODO(146757305): provide .apk and .aidl that have more APIs for modules - return toModule([]string{"android_module_lib_stubs_current", "services-stubs"}, "framework-res", sdkFrameworkAidlPath(ctx)) + return toModule([]string{"android_system_server_stubs_current"}, "framework-res", sdkFrameworkAidlPath(ctx)) default: panic(fmt.Errorf("invalid sdk %q", sdkVersion.raw)) } diff --git a/java/sdk_test.go b/java/sdk_test.go index ea6733d86..088db9e70 100644 --- a/java/sdk_test.go +++ b/java/sdk_test.go @@ -222,9 +222,9 @@ func TestClasspath(t *testing.T) { { name: "system_server_current", properties: `sdk_version: "system_server_current",`, - bootclasspath: []string{"android_module_lib_stubs_current", "services-stubs", "core-lambda-stubs"}, + bootclasspath: []string{"android_system_server_stubs_current", "core-lambda-stubs"}, system: "core-current-stubs-system-modules", - java9classpath: []string{"android_module_lib_stubs_current", "services-stubs"}, + java9classpath: []string{"android_system_server_stubs_current"}, aidl: "-p" + buildDir + "/framework.aidl", }, } diff --git a/java/testing.go b/java/testing.go index 5b6a39b2a..28c1a2691 100644 --- a/java/testing.go +++ b/java/testing.go @@ -148,7 +148,7 @@ func GatherRequiredDepsForTest() string { "android_system_stubs_current", "android_test_stubs_current", "android_module_lib_stubs_current", - "services-stubs", + "android_system_server_stubs_current", "core.current.stubs", "core.platform.api.stubs", "kotlin-stdlib",