summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/AnnotationProcessor.cpp
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-06-23 16:27:59 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-23 16:27:59 +0000
commit7c72b7f45e16c822df9aaf88f0ba87b47d995d85 (patch)
tree808c1fd040be65b53353255403b49c8ab0e330d1 /tools/aapt2/java/AnnotationProcessor.cpp
parent697892fae303f27ba29d5f0ce2ddbf6ddb182e15 (diff)
parentde6e6f2098042bb91f7dac965d2b047c74c920f2 (diff)
Merge "Don't add API annotations in the internal R.java" into rvc-dev-plus-aosp
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()) {