diff options
Diffstat (limited to 'java/sdk.go')
| -rw-r--r-- | java/sdk.go | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/java/sdk.go b/java/sdk.go index 9dfb38bf4..6ffe399fb 100644 --- a/java/sdk.go +++ b/java/sdk.go @@ -45,16 +45,13 @@ type sdkContext interface { // targetSdkVersion returns the target_sdk_version property of the current module, or sdkVersion() if it is not set. targetSdkVersion() string - // Temporarily provide access to the no_standard_libs property (where present). - noStandardLibs() bool - // Temporarily provide access to the no_frameworks_libs property (where present). noFrameworkLibs() bool } func sdkVersionOrDefault(ctx android.BaseModuleContext, v string) string { switch v { - case "", "none", "current", "system_current", "test_current", "core_current": + case "", "none", "current", "test_current", "system_current", "core_current", "core_platform": return ctx.Config().DefaultAppTargetSdk() default: return v @@ -65,7 +62,7 @@ func sdkVersionOrDefault(ctx android.BaseModuleContext, v string) string { // it returns android.FutureApiLevel (10000). func sdkVersionToNumber(ctx android.BaseModuleContext, v string) (int, error) { switch v { - case "", "none", "current", "test_current", "system_current", "core_current": + case "", "none", "current", "test_current", "system_current", "core_current", "core_platform": return ctx.Config().DefaultAppTargetSdkInt(), nil default: n := android.GetNumericSdkVersion(v) @@ -145,8 +142,7 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { jars: android.Paths{jarPath.Path(), lambdaStubsPath}, aidl: android.OptionalPathForPath(aidlPath.Path()), - // Pass values straight through for now to match previous behavior. - noStandardLibs: sdkContext.noStandardLibs(), + // Pass value straight through for now to match previous behavior. noFrameworksLibs: sdkContext.noFrameworkLibs(), } } @@ -159,8 +155,7 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { frameworkResModule: r, aidl: android.OptionalPathForPath(aidl), - // Pass values straight through for now to match previous behavior. - noStandardLibs: sdkContext.noStandardLibs(), + // Pass value straight through for now to match previous behavior. noFrameworksLibs: sdkContext.noFrameworkLibs(), } @@ -187,7 +182,8 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { } } - if ctx.Config().UnbundledBuildUsePrebuiltSdks() && v != "" && v != "none" { + if ctx.Config().UnbundledBuildUsePrebuiltSdks() && + v != "" && v != "none" && v != "core_platform" { return toPrebuilt(v) } @@ -197,14 +193,19 @@ func decodeSdkDep(ctx android.BaseModuleContext, sdkContext sdkContext) sdkDep { useDefaultLibs: true, frameworkResModule: "framework-res", - // Pass values straight through for now to match previous behavior. - noStandardLibs: sdkContext.noStandardLibs(), + // Pass value straight through for now to match previous behavior. noFrameworksLibs: sdkContext.noFrameworkLibs(), } case "none": return sdkDep{ noStandardLibs: true, } + case "core_platform": + return sdkDep{ + useDefaultLibs: true, + frameworkResModule: "framework-res", + noFrameworksLibs: true, + } case "current": return toModule("android_stubs_current", "framework-res", sdkFrameworkAidlPath(ctx)) case "system_current": |