summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/AnnotationProcessor.cpp
diff options
context:
space:
mode:
authorDaniel Norman <danielnorman@google.com>2020-08-31 12:05:49 -0700
committerBill Peckham <bpeckham@google.com>2020-09-09 10:21:03 -0700
commit8abdf0e95a5d15a310b6df69d33a4510a0b44b4a (patch)
treef0c990be5370711e157b2e9e5ae746cb1af915b9 /tools/aapt2/java/AnnotationProcessor.cpp
parent93e6c963c3228074d0e0dd5f3f8d057d9bd11e05 (diff)
parent6997558ebbaa0c3e5708246807239f11e70ad35d (diff)
Merge SP1A.200727.001
Change-Id: Ibb86a528ed692cde325705779c7fa57e4b4de682
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 cec59e75831d..482d91aeb491 100644
--- a/tools/aapt2/java/AnnotationProcessor.cpp
+++ b/tools/aapt2/java/AnnotationProcessor.cpp
@@ -123,7 +123,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')) {
@@ -137,6 +137,9 @@ void AnnotationProcessor::Print(Printer* printer) const {
printer->Println("@Deprecated");
}
+ if (strip_api_annotations) {
+ return;
+ }
for (const AnnotationRule& rule : sAnnotationRules) {
const auto& it = annotation_parameter_map_.find(rule.bit_mask);
if (it != annotation_parameter_map_.end()) {