sdk_version: "module_current" is supported

module_* is a new API surface for OS modules (e.g. APEXes). It has
slightly bigger API surface than the system_* SDK. Specifically, APIs
with @SystemApi(client=MODULE_LIBRARIES) are added there.

Bug: 146757305
Test: m

Change-Id: I8980e50c0e3a4cd843048e0de1f638e854384f46
This commit is contained in:
Jiyong Park
2020-01-30 18:00:15 +09:00
parent 67edce7adb
commit 50146e9c8e
4 changed files with 32 additions and 1 deletions

View File

@@ -71,6 +71,7 @@ const (
sdkPublic
sdkSystem
sdkTest
sdkModule
sdkPrivate
)
@@ -91,6 +92,8 @@ func (k sdkKind) String() string {
return "core"
case sdkCorePlatform:
return "core_platform"
case sdkModule:
return "module"
default:
return "invalid"
}
@@ -256,6 +259,8 @@ func sdkSpecFrom(str string) sdkSpec {
kind = sdkSystem
case "test":
kind = sdkTest
case "module":
kind = sdkModule
default:
return sdkSpec{sdkInvalid, sdkVersionNone, str}
}
@@ -382,6 +387,9 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep
return toModule("android_test_stubs_current", "framework-res", sdkFrameworkAidlPath(ctx))
case sdkCore:
return toModule("core.current.stubs", "", nil)
case sdkModule:
// TODO(146757305): provide .apk and .aidl that have more APIs for modules
return toModule("android_module_lib_stubs_current", "framework-res", sdkFrameworkAidlPath(ctx))
default:
panic(fmt.Errorf("invalid sdk %q", sdkVersion.raw))
}