Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d419826d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "ApiLevel of "" and "core_platform" is FutureApiLevel"

parents 53e5f2a9 c7022043
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -147,6 +147,11 @@ func (s SdkSpec) ForVendorPartition(ctx EarlyModuleContext) SdkSpec {

// UsePrebuilt determines whether prebuilt SDK should be used for this SdkSpec with the given context.
func (s SdkSpec) UsePrebuilt(ctx EarlyModuleContext) bool {
	switch s {
	case SdkSpecNone, SdkSpecCorePlatform, SdkSpecPrivate:
		return false
	}

	if s.ApiLevel.IsCurrent() {
		// "current" can be built from source and be from prebuilt SDK
		return ctx.Config().AlwaysUsePrebuiltSdks()
@@ -159,7 +164,6 @@ func (s SdkSpec) UsePrebuilt(ctx EarlyModuleContext) bool {
		// numbered SDKs are always from prebuilt
		return true
	}
	// "", "none", "core_platform" fall here
	return false
}

@@ -203,10 +207,8 @@ func (s SdkSpec) EffectiveVersionString(ctx EarlyModuleContext) (string, error)

var (
	SdkSpecNone         = SdkSpec{SdkNone, NoneApiLevel, "(no version)"}
	// TODO(b/175678607) ApiLevel of SdkSpecPrivate should be FutureApiLevel
	SdkSpecPrivate = SdkSpec{SdkPrivate, NoneApiLevel, ""}
	// TODO(b/175678607) ApiLevel of SdkSpecCorePlatform should be FutureApiLevel
	SdkSpecCorePlatform = SdkSpec{SdkCorePlatform, NoneApiLevel, "core_platform"}
	SdkSpecPrivate      = SdkSpec{SdkPrivate, FutureApiLevel, ""}
	SdkSpecCorePlatform = SdkSpec{SdkCorePlatform, FutureApiLevel, "core_platform"}
)

func SdkSpecFrom(ctx EarlyModuleContext, str string) SdkSpec {