Class ToolsInstructionsCleaner

java.lang.Object
com.android.manifmerger.ToolsInstructionsCleaner

@Immutable public class ToolsInstructionsCleaner extends Object
Removes all "tools:" statements from the resulting xml. All attributes belonging to the SdkConstants.ANDROID_URI namespace will be removed. If an element contained a "tools:node=\"remove\"" attribute, the element will be deleted. And elements that are themselves in the tools namespace will also be removed.
  • Constructor Details

    • ToolsInstructionsCleaner

      public ToolsInstructionsCleaner()
  • Method Details

    • cleanToolsReferences

      public static com.google.common.base.Optional<Document> cleanToolsReferences(@NonNull ManifestMerger2.MergeType mergeType, @NonNull XmlDocument document, @NonNull com.android.utils.ILogger logger)
      Cleans all attributes belonging to the SdkConstants.TOOLS_URI namespace.
      Parameters:
      document - the document to clean
      logger - logger to use in case of errors and warnings.
      Returns:
      the cleaned document or null if an error occurred.