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

Commit 196d3e6b authored by Pedro Loureiro's avatar Pedro Loureiro
Browse files

Rename updatable-library to apex-library

Mostly for consistency with the names used in related changes.

Test: m nothing

Bug: 191978330
Change-Id: I34637986ead1c671bcc649891aceb3fe0f44b52a
parent 81e3ef84
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2579,11 +2579,11 @@ func (module *sdkLibraryXml) permissionsContents(ctx android.ModuleContext) stri
	implicitUntilAttr := formattedOptionalSdkLevelAttribute(ctx, "on-bootclasspath-before", module.properties.On_bootclasspath_before)
	minSdkAttr := formattedOptionalSdkLevelAttribute(ctx, "min-device-sdk", module.properties.Min_device_sdk)
	maxSdkAttr := formattedOptionalSdkLevelAttribute(ctx, "max-device-sdk", module.properties.Max_device_sdk)
	// <library> is understood in all android versions whereas <updatable-library> is only understood from API T (and ignored before that).
	// similarly, min_device_sdk is only understood from T. So if a library is using that, we need to use the updatable-library to make sure this library is not loaded before T
	// <library> is understood in all android versions whereas <apex-library> is only understood from API T (and ignored before that).
	// similarly, min_device_sdk is only understood from T. So if a library is using that, we need to use the apex-library to make sure this library is not loaded before T
	var libraryTag string
	if module.properties.Min_device_sdk != nil {
		libraryTag = `    <updatable-library\n`
		libraryTag = `    <apex-library\n`
	} else {
		libraryTag = `    <library\n`
	}
+1 −1
Original line number Diff line number Diff line
@@ -338,7 +338,7 @@ func TestJavaSdkLibrary_UpdatableLibrary_usesNewTag(t *testing.T) {
`)
	// test that updatability attributes are passed on correctly
	fooUpdatable := result.ModuleForTests("foo.xml", "android_common").Rule("java_sdk_xml")
	android.AssertStringDoesContain(t, "foo.xml java_sdk_xml command", fooUpdatable.RuleParams.Command, `<updatable-library`)
	android.AssertStringDoesContain(t, "foo.xml java_sdk_xml command", fooUpdatable.RuleParams.Command, `<apex-library`)
	android.AssertStringDoesNotContain(t, "foo.xml java_sdk_xml command", fooUpdatable.RuleParams.Command, `<library`)
}