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

Commit 7c63ee24 authored by Paul Duffin's avatar Paul Duffin Committed by Automerger Merge Worker
Browse files

Merge "java_sdk_library: Simplify SdkLibrary.sdkJars" into rvc-dev am: 96d9fb7d

Change-Id: I0fbac00476b22c77cb75131d0a81597c4ecac109
parents 984d9489 96d9fb7d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1298,14 +1298,15 @@ func PrebuiltJars(ctx android.BaseModuleContext, baseName string, s sdkSpec) and
func (module *SdkLibrary) sdkJars(ctx android.BaseModuleContext, sdkVersion sdkSpec, headerJars bool) android.Paths {

	// Check any special cases for java_sdk_library.
	if !sdkVersion.specified() {
	//
	// Only allow access to the implementation library in the following condition:
	// * No sdk_version specified on the referencing module.
	if sdkVersion.kind == sdkPrivate {
		if headerJars {
			return module.HeaderJars()
		} else {
			return module.ImplementationJars()
		}
	} else if sdkVersion.kind == sdkPrivate {
		return module.HeaderJars()
	}

	return module.selectHeaderJarsForSdkVersion(ctx, sdkVersion)