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

Commit 48991228 authored by Pedro Loureiro's avatar Pedro Loureiro
Browse files

Translate SDK codenames to SDK versions for finalized releases

This applies to updatability attributes of shared libraries.

Bug: 235318264

Test: atest UpdatableSharedLibsTest
Change-Id: Id2c2b769a99ca1debb5d8525e46d37698ef2fc6c
parent 9e8e7d7b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2584,7 +2584,10 @@ func formattedOptionalSdkLevelAttribute(ctx android.ModuleContext, attrName stri
			`"current" is not an allowed value for this attribute`)
		return ""
	}
	return formattedOptionalAttribute(attrName, value)
	// "safeValue" is safe because it translates finalized codenames to a string
	// with their SDK int.
	safeValue := apiLevel.String()
	return formattedOptionalAttribute(attrName, &safeValue)
}

// formats an attribute for the xml permissions file if the value is not null