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

Commit 577287d0 authored by Jeff Gaston's avatar Jeff Gaston Committed by android-build-merger
Browse files

Merge "Remove unused property" am: 491ace3c

am: 3181870d

Change-Id: I80c062106d0ab7cc233ded84cc084e5999b1f739
parents 1e2e5518 3181870d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -130,6 +130,9 @@ func rewriteIncorrectAndroidmkPrebuilts(tree *parser.File) error {
		case ".aar":
			renameProperty(mod, "srcs", "aars")
			mod.Type = "android_library_import"

			// An android_library_import doesn't get installed, so setting "installable = false" isn't supported
			removeProperty(mod, "installable")
		}
	}

@@ -195,3 +198,13 @@ func renameProperty(mod *parser.Module, from, to string) {
		}
	}
}

func removeProperty(mod *parser.Module, propertyName string) {
	newList := make([]*parser.Property, 0, len(mod.Properties))
	for _, prop := range mod.Properties {
		if prop.Name != propertyName {
			newList = append(newList, prop)
		}
	}
	mod.Properties = newList
}