diff --git a/java/java.go b/java/java.go index 0dd64ef99..b60f9c739 100644 --- a/java/java.go +++ b/java/java.go @@ -412,7 +412,7 @@ type sdkContext interface { func sdkVersionOrDefault(ctx android.BaseContext, v string) string { switch v { - case "", "current", "system_current", "test_current", "core_current": + case "", "current", "system_current", "test_current", "core_current", "core_platform_current": return ctx.Config().DefaultAppTargetSdk() default: return v @@ -423,7 +423,7 @@ func sdkVersionOrDefault(ctx android.BaseContext, v string) string { // it returns android.FutureApiLevel (10000). func sdkVersionToNumber(ctx android.BaseContext, v string) (int, error) { switch v { - case "", "current", "test_current", "system_current", "core_current": + case "", "current", "test_current", "system_current", "core_current", "core_platform_current": return ctx.Config().DefaultAppTargetSdkInt(), nil default: n := android.GetNumericSdkVersion(v) @@ -520,6 +520,8 @@ func decodeSdkDep(ctx android.BaseContext, sdkContext sdkContext) sdkDep { } if m == "core.current.stubs" { ret.systemModules = "core-system-modules" + } else if m == "core.platform.api.stubs" { + ret.systemModules = "core-platform-api-stubs-system-modules" } return ret } @@ -542,6 +544,8 @@ func decodeSdkDep(ctx android.BaseContext, sdkContext sdkContext) sdkDep { return toModule("android_test_stubs_current", "framework-res") case "core_current": return toModule("core.current.stubs", "") + case "core_platform_current": + return toModule("core.platform.api.stubs", "") default: return toPrebuilt(v) } @@ -704,8 +708,9 @@ func getLinkType(m *Module, name string) linkType { ver := m.sdkVersion() noStdLibs := Bool(m.properties.No_standard_libs) switch { - case name == "core.current.stubs" || ver == "core_current" || noStdLibs || name == "stub-annotations" || - name == "private-stub-annotations-jar": + case name == "core.current.stubs" || ver == "core_current" || + name == "core.platform.api.stubs" || ver == "core_platform_current" || + noStdLibs || name == "stub-annotations" || name == "private-stub-annotations-jar": return javaCore case name == "android_system_stubs_current" || strings.HasPrefix(ver, "system_"): return javaSystem