aboutsummaryrefslogtreecommitdiff
path: root/aidl_checkapi.cpp
diff options
context:
space:
mode:
authorJeongik Cha <jeongik@google.com>2020-07-28 00:25:52 +0900
committerTreehugger Robot <treehugger-gerrit@google.com>2020-07-29 04:13:08 +0000
commit36f76c39317e665cd15abb436f972c001006d063 (patch)
treef749e09016aaf823870b9eb155f3c1411e98a368 /aidl_checkapi.cpp
parent30b1843f6c1d2355742c162aacb67aa18478e794 (diff)
downloadaidl-36f76c39317e665cd15abb436f972c001006d063.tar.gz
Support @Immutable for a parcelable
In Java, an immutable parcelable has only final field. And with regard to List or Map, it is always unmodifiableList or Map And also, it can be return type or in argument in an interface. For the other backend, it doesn't affect anything. Bug: 161506914 Test: atest aidl_integration_test aidl_unittests Change-Id: If0aee76ac26554c087031371c88f827e56be1d98
Diffstat (limited to 'aidl_checkapi.cpp')
-rw-r--r--aidl_checkapi.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/aidl_checkapi.cpp b/aidl_checkapi.cpp
index 5a4daa65..9e73f31d 100644
--- a/aidl_checkapi.cpp
+++ b/aidl_checkapi.cpp
@@ -52,6 +52,7 @@ static set<AidlAnnotation> get_strict_annotations(const AidlAnnotatable& node) {
static const set<AidlAnnotation::Type> kIgnoreAnnotations{
AidlAnnotation::Type::NULLABLE,
AidlAnnotation::Type::JAVA_DEBUG,
+ AidlAnnotation::Type::IMMUTABLE,
};
set<AidlAnnotation> annotations;
for (const AidlAnnotation& annotation : node.GetAnnotations()) {