public class PostValidator
extends java.lang.Object
This is primarily to catch situations like a user entered a tools:remove="foo" directory on one of its elements and that particular attribute was never removed during the merges possibly indicating an unforeseen change of configuration.
Most of the output from this validation should be warnings.
| Constructor and Description |
|---|
PostValidator() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
enforceToolsNamespaceDeclaration(XmlDocument xmlDocument)
Enforces
SdkConstants.TOOLS_URI declaration in the top level element, if
necessary. |
static void |
validate(XmlDocument xmlDocument,
MergingReport.Builder mergingReport)
Post validation of the merged document.
|
public static void validate(@NonNull
XmlDocument xmlDocument,
@NonNull
MergingReport.Builder mergingReport)
xmlDocument - merged document to check.mergingReport - report for errors and warnings.protected static void enforceToolsNamespaceDeclaration(@NonNull
XmlDocument xmlDocument)
SdkConstants.TOOLS_URI declaration in the top level element, if
necessary. It is possible that the original manifest file did not contain any attribute
declaration, therefore not requiring a xmlns: declaration. Yet the implicit elements handling
may have added attributes requiring the namespace declaration.