Package com.android.manifmerger
Class ElementsTrimmer
java.lang.Object
com.android.manifmerger.ElementsTrimmer
Trims the document from unwanted, repeated elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidtrim(XmlDocument xmlDocument, MergingReport.Builder mergingReport) Trims unwanted, duplicated elements from the merged document.
-
Constructor Details
-
ElementsTrimmer
public ElementsTrimmer()
-
-
Method Details
-
trim
public static void trim(@NonNull XmlDocument xmlDocument, @NonNull MergingReport.Builder mergingReport) Trims unwanted, duplicated elements from the merged document.Current trimmed elements are :
- uses-features with glEsVersion key
- The highest 1.x version element will be kept regardless of 'required' flag value
- If the above element is present and has a 'false' required flag, there can be at most one element of a lesser version with 'required' attribute set to true.
- The highest 2.x or superior element will be kept regardless of 'required' flag value
- If the above element is present and has a 'false' required flag, there can be at most one element of a lesser version (but higher than 2.0) with a 'required' attribute set to true.
- Parameters:
xmlDocument- the xml document to trim.mergingReport- the report to log errors and actions.
- uses-features with glEsVersion key
-