private static void addToElementInAndroidNS(
@NonNull ManifestSystemProperty manifestSystemProperty,
@NonNull ActionRecorder actionRecorder,
String value,
@NonNull XmlElement to) {
String toolsPrefix = getAndroidPrefix(to.getXml());
to.getXml().setAttributeNS(SdkConstants.ANDROID_URI,
toolsPrefix + XmlUtils.NS_SEPARATOR + manifestSystemProperty.toCamelCase(),
value);
Attr attr = to.getXml().getAttributeNodeNS(SdkConstants.ANDROID_URI,
manifestSystemProperty.toCamelCase());
XmlAttribute xmlAttribute = new XmlAttribute(to, attr, null);
actionRecorder.recordAttributeAction(xmlAttribute,
new Actions.AttributeRecord(
Actions.ActionType.INJECTED,
new SourceFilePosition(to.getSourceFile(), SourcePosition.UNKNOWN),
xmlAttribute.getId(),
null,
null
)
);
}