summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/AnnotationProcessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/java/AnnotationProcessor.cpp')
-rw-r--r--tools/aapt2/java/AnnotationProcessor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aapt2/java/AnnotationProcessor.cpp b/tools/aapt2/java/AnnotationProcessor.cpp
index a4610b2575b9..bb667d6fa539 100644
--- a/tools/aapt2/java/AnnotationProcessor.cpp
+++ b/tools/aapt2/java/AnnotationProcessor.cpp
@@ -110,7 +110,7 @@ void AnnotationProcessor::AppendNewLine() {
}
}
-void AnnotationProcessor::Print(Printer* printer) const {
+void AnnotationProcessor::Print(Printer* printer, bool strip_api_annotations) const {
if (has_comments_) {
std::string result = comment_.str();
for (const StringPiece& line : util::Tokenize(result, '\n')) {
@@ -123,6 +123,9 @@ void AnnotationProcessor::Print(Printer* printer) const {
printer->Println("@Deprecated");
}
+ if (strip_api_annotations) {
+ return;
+ }
for (const AnnotationRule& rule : sAnnotationRules) {
if (annotation_bit_mask_ & rule.bit_mask) {
printer->Println(rule.annotation);