blob: c3eff088713a1a9b944d116cebd4383b327df8e4 [file] [log] [blame]
Jiyong Park3656c3c2018-08-01 20:02:01 +09001/*
Will McVickerd7d18df2019-09-12 13:40:50 -07002 * Copyright (C) 2018, The Android Open Source Project
3 *
Jiyong Park3656c3c2018-08-01 20:02:01 +09004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "aidl.h"
18#include "aidl_language.h"
19#include "import_resolver.h"
Jeongik Cha047c5ee2019-08-07 23:16:49 +090020#include "logging.h"
Jiyong Park3656c3c2018-08-01 20:02:01 +090021#include "options.h"
Jiyong Park3656c3c2018-08-01 20:02:01 +090022
23#include <map>
24#include <string>
25#include <vector>
26
Jiyong Park0cf03b12020-07-22 19:36:34 +090027#include <android-base/result.h>
Jiyong Parkf7534672019-08-12 22:06:22 +090028#include <android-base/strings.h>
29
Jiyong Park3656c3c2018-08-01 20:02:01 +090030namespace android {
31namespace aidl {
32
Jiyong Park0cf03b12020-07-22 19:36:34 +090033using android::base::Error;
34using android::base::Result;
Jooyung Han00073272020-11-27 14:20:20 +090035using android::base::StartsWith;
Jiyong Park3656c3c2018-08-01 20:02:01 +090036using std::map;
37using std::set;
38using std::string;
39using std::vector;
40
Jooyung Han69ea4ba2020-10-29 15:33:37 +090041static vector<string> get_strict_annotations(const AidlAnnotatable& node) {
Steven Moreland7b6a7d92020-04-20 22:00:33 -070042 // This must be symmetrical (if you can add something, you must be able to
43 // remove it). The reason is that we have no way of knowing which interface a
44 // server serves and which interface a client serves (e.g. a callback
45 // interface). Note that this is being overly lenient. It makes sense for
46 // newer code to start accepting nullable things. However, here, we don't know
47 // if the client of an interface or the server of an interface is newer.
48 //
49 // Here are two examples to demonstrate this:
50 // - a new implementation might change so that it no longer returns null
51 // values (remove @nullable)
52 // - a new implementation might start accepting null values (add @nullable)
53 static const set<AidlAnnotation::Type> kIgnoreAnnotations{
54 AidlAnnotation::Type::NULLABLE,
Jooyung Han69ea4ba2020-10-29 15:33:37 +090055 // @JavaDerive doesn't affect read/write
Jooyung Han90345002020-10-23 15:28:53 +090056 AidlAnnotation::Type::JAVA_DERIVE,
Jeongik Chad0a10272020-08-06 16:33:36 +090057 AidlAnnotation::Type::JAVA_ONLY_IMMUTABLE,
Jooyung Han69ea4ba2020-10-29 15:33:37 +090058 // @Backing for a enum type is checked by the enum checker
59 AidlAnnotation::Type::BACKING,
60 // @RustDerive doesn't affect read/write
61 AidlAnnotation::Type::RUST_DERIVE,
Steven Moreland7b6a7d92020-04-20 22:00:33 -070062 };
Jooyung Han69ea4ba2020-10-29 15:33:37 +090063 vector<string> annotations;
Steven Moreland7b6a7d92020-04-20 22:00:33 -070064 for (const AidlAnnotation& annotation : node.GetAnnotations()) {
Jooyung Han00073272020-11-27 14:20:20 +090065 if (kIgnoreAnnotations.find(annotation.GetType()) != kIgnoreAnnotations.end()) {
66 continue;
Steven Moreland7b6a7d92020-04-20 22:00:33 -070067 }
Jooyung Han00073272020-11-27 14:20:20 +090068 auto annotation_string = annotation.ToString();
69 // adding @Deprecated (with optional args) is okay
70 if (StartsWith(annotation_string, "@JavaPassthrough(annotation=\"@Deprecated")) {
71 continue;
72 }
73 annotations.push_back(annotation_string);
Steven Moreland7b6a7d92020-04-20 22:00:33 -070074 }
75 return annotations;
76}
77
Jiyong Park3656c3c2018-08-01 20:02:01 +090078static bool have_compatible_annotations(const AidlAnnotatable& older,
79 const AidlAnnotatable& newer) {
Jooyung Han69ea4ba2020-10-29 15:33:37 +090080 vector<string> olderAnnotations = get_strict_annotations(older);
81 vector<string> newerAnnotations = get_strict_annotations(newer);
82 sort(olderAnnotations.begin(), olderAnnotations.end());
83 sort(newerAnnotations.begin(), newerAnnotations.end());
Jeongik Cha3271ffa2018-12-04 15:19:20 +090084 if (olderAnnotations != newerAnnotations) {
Jiyong Park3656c3c2018-08-01 20:02:01 +090085 const string from = older.ToString().empty() ? "(empty)" : older.ToString();
86 const string to = newer.ToString().empty() ? "(empty)" : newer.ToString();
87 AIDL_ERROR(newer) << "Changed annotations: " << from << " to " << to;
88 return false;
89 }
90 return true;
91}
92
93static bool are_compatible_types(const AidlTypeSpecifier& older, const AidlTypeSpecifier& newer) {
94 bool compatible = true;
Jooyung Han965e31d2020-11-27 12:30:16 +090095 if (older.Signature() != newer.Signature()) {
96 AIDL_ERROR(newer) << "Type changed: " << older.Signature() << " to " << newer.Signature()
97 << ".";
Jiyong Park3656c3c2018-08-01 20:02:01 +090098 compatible = false;
99 }
100 compatible &= have_compatible_annotations(older, newer);
101 return compatible;
102}
103
Jooyung Han829ec7c2020-12-02 12:07:36 +0900104static bool are_compatible_constants(const AidlDefinedType& older, const AidlDefinedType& newer) {
Jooyung Han3f347ca2020-12-01 12:41:50 +0900105 bool compatible = true;
106
107 map<string, AidlConstantDeclaration*> new_constdecls;
108 for (const auto& c : newer.GetConstantDeclarations()) {
109 new_constdecls[c->GetName()] = &*c;
110 }
111
112 for (const auto& old_c : older.GetConstantDeclarations()) {
113 const auto found = new_constdecls.find(old_c->GetName());
114 if (found == new_constdecls.end()) {
115 AIDL_ERROR(old_c) << "Removed constant declaration: " << older.GetCanonicalName() << "."
116 << old_c->GetName();
117 compatible = false;
118 continue;
119 }
120
121 const auto new_c = found->second;
122 compatible &= are_compatible_types(old_c->GetType(), new_c->GetType());
123
Jooyung Hanfdaae1d2020-12-14 13:16:15 +0900124 const string old_value = old_c->GetValue().Literal();
125 const string new_value = new_c->GetValue().Literal();
Jooyung Han3f347ca2020-12-01 12:41:50 +0900126 if (old_value != new_value) {
127 AIDL_ERROR(newer) << "Changed constant value: " << older.GetCanonicalName() << "."
128 << old_c->GetName() << " from " << old_value << " to " << new_value << ".";
129 compatible = false;
130 }
131 }
132 return compatible;
133}
134
Jiyong Park3656c3c2018-08-01 20:02:01 +0900135static bool are_compatible_interfaces(const AidlInterface& older, const AidlInterface& newer) {
136 bool compatible = true;
Jiyong Park3656c3c2018-08-01 20:02:01 +0900137
138 map<string, AidlMethod*> new_methods;
139 for (const auto& m : newer.AsInterface()->GetMethods()) {
140 new_methods.emplace(m->Signature(), m.get());
141 }
142
143 for (const auto& old_m : older.AsInterface()->GetMethods()) {
144 const auto found = new_methods.find(old_m->Signature());
145 if (found == new_methods.end()) {
Steven Moreland4ee68632018-12-14 15:52:46 -0800146 AIDL_ERROR(old_m) << "Removed or changed method: " << older.GetCanonicalName() << "."
Jiyong Park3656c3c2018-08-01 20:02:01 +0900147 << old_m->Signature();
148 compatible = false;
149 continue;
150 }
151
152 // Compare IDs to detect method reordering. IDs are assigned by their
153 // textual order, so if there is an ID mismatch, that means reordering
154 // has happened.
155 const auto new_m = found->second;
Steven Moreland4ee68632018-12-14 15:52:46 -0800156
157 if (old_m->IsOneway() != new_m->IsOneway()) {
158 AIDL_ERROR(new_m) << "Oneway attribute " << (old_m->IsOneway() ? "removed" : "added") << ": "
159 << older.GetCanonicalName() << "." << old_m->Signature();
160 compatible = false;
161 }
162
Jiyong Park3656c3c2018-08-01 20:02:01 +0900163 if (old_m->GetId() != new_m->GetId()) {
164 AIDL_ERROR(new_m) << "Transaction ID changed: " << older.GetCanonicalName() << "."
165 << old_m->Signature() << " is changed from " << old_m->GetId() << " to "
166 << new_m->GetId() << ".";
167 compatible = false;
168 }
169
170 compatible &= are_compatible_types(old_m->GetType(), new_m->GetType());
171
172 const auto& old_args = old_m->GetArguments();
173 const auto& new_args = new_m->GetArguments();
174 // this is guaranteed because arguments are part of AidlMethod::Signature()
Steven Moreland21780812020-09-11 01:29:45 +0000175 AIDL_FATAL_IF(old_args.size() != new_args.size(), old_m);
Jiyong Park3656c3c2018-08-01 20:02:01 +0900176 for (size_t i = 0; i < old_args.size(); i++) {
177 const AidlArgument& old_a = *(old_args.at(i));
178 const AidlArgument& new_a = *(new_args.at(i));
179 compatible &= are_compatible_types(old_a.GetType(), new_a.GetType());
180
181 if (old_a.GetDirection() != new_a.GetDirection()) {
182 AIDL_ERROR(new_m) << "Direction changed: " << old_a.GetDirectionSpecifier() << " to "
183 << new_a.GetDirectionSpecifier() << ".";
184 compatible = false;
185 }
186 }
187 }
Jiyong Parka428d212018-08-29 22:26:30 +0900188
Jooyung Han3f347ca2020-12-01 12:41:50 +0900189 compatible = are_compatible_constants(older, newer) && compatible;
Jiyong Parka428d212018-08-29 22:26:30 +0900190
Jiyong Park3656c3c2018-08-01 20:02:01 +0900191 return compatible;
192}
193
Steven Moreland370ed342020-04-28 18:14:39 -0700194// returns whether the given type when defaulted will be accepted by
195// unmarshalling code
196static bool has_usable_nil_type(const AidlTypeSpecifier& specifier) {
197 // TODO(b/155238508): fix for primitives
198
199 // This technically only applies in C++, but even if both the client and the
200 // server of an interface are in Java at a particular point in time, where
201 // null is currently always acceptable, we want to make sure that versions
202 // of this service can work in native and future backends without a problem.
203 // Also, in that case, adding nullable does not hurt.
204 return specifier.IsNullable();
205}
206
Jooyung Han636fd2f2020-10-22 11:33:45 +0900207static bool HasZeroEnumerator(const AidlEnumDeclaration& enum_decl) {
208 return std::any_of(enum_decl.GetEnumerators().begin(), enum_decl.GetEnumerators().end(),
209 [&](const unique_ptr<AidlEnumerator>& enumerator) {
Jooyung Hanfdaae1d2020-12-14 13:16:15 +0900210 return enumerator->GetValue()->Literal() == "0";
Jooyung Han636fd2f2020-10-22 11:33:45 +0900211 });
212}
213
Jooyung Han829ec7c2020-12-02 12:07:36 +0900214static bool are_compatible_parcelables(const AidlDefinedType& older, const AidlTypenames&,
215 const AidlDefinedType& newer,
Jooyung Han636fd2f2020-10-22 11:33:45 +0900216 const AidlTypenames& new_types) {
Jiyong Park3656c3c2018-08-01 20:02:01 +0900217 const auto& old_fields = older.GetFields();
218 const auto& new_fields = newer.GetFields();
219 if (old_fields.size() > new_fields.size()) {
220 // you can add new fields only at the end
221 AIDL_ERROR(newer) << "Number of fields in " << older.GetCanonicalName() << " is reduced from "
222 << old_fields.size() << " to " << new_fields.size() << ".";
223 return false;
224 }
Devin Moorec7e47a32020-08-07 10:55:25 -0700225 if (newer.IsFixedSize() && old_fields.size() != new_fields.size()) {
226 AIDL_ERROR(newer) << "Number of fields in " << older.GetCanonicalName() << " is changed from "
227 << old_fields.size() << " to " << new_fields.size()
228 << ". This is an incompatible change for FixedSize types.";
229 return false;
230 }
Jiyong Park3656c3c2018-08-01 20:02:01 +0900231
232 bool compatible = true;
233 for (size_t i = 0; i < old_fields.size(); i++) {
Jiyong Parka468e2a2018-08-29 21:25:18 +0900234 const auto& old_field = old_fields.at(i);
235 const auto& new_field = new_fields.at(i);
236 compatible &= are_compatible_types(old_field->GetType(), new_field->GetType());
Jiyong Park3656c3c2018-08-01 20:02:01 +0900237
Jooyung Hanfdaae1d2020-12-14 13:16:15 +0900238 string old_value = old_field->GetDefaultValue() ? old_field->GetDefaultValue()->Literal() : "";
239 string new_value = new_field->GetDefaultValue() ? new_field->GetDefaultValue()->Literal() : "";
Jiyong Parka468e2a2018-08-29 21:25:18 +0900240 if (old_value != new_value) {
Steven Moreland370ed342020-04-28 18:14:39 -0700241 AIDL_ERROR(new_field) << "Changed default value: " << old_value << " to " << new_value << ".";
242 compatible = false;
243 }
244 }
245
Jiyong Parkb07d9932020-05-15 12:56:54 +0900246 // Reordering of fields is an incompatible change.
247 for (size_t i = 0; i < new_fields.size(); i++) {
248 const auto& new_field = new_fields.at(i);
249 auto found = std::find_if(old_fields.begin(), old_fields.end(), [&new_field](const auto& f) {
250 return new_field->GetName() == f->GetName();
251 });
252 if (found != old_fields.end()) {
253 size_t old_index = std::distance(old_fields.begin(), found);
254 if (old_index != i) {
255 AIDL_ERROR(new_field) << "Reordered " << new_field->GetName() << " from " << old_index
256 << " to " << i << ".";
257 compatible = false;
258 }
259 }
260 }
261
Steven Moreland370ed342020-04-28 18:14:39 -0700262 for (size_t i = old_fields.size(); i < new_fields.size(); i++) {
263 const auto& new_field = new_fields.at(i);
Jooyung Han636fd2f2020-10-22 11:33:45 +0900264 if (new_field->GetDefaultValue()) {
265 continue;
Jiyong Park3656c3c2018-08-01 20:02:01 +0900266 }
Jooyung Han636fd2f2020-10-22 11:33:45 +0900267
268 // null is accepted as a valid default value
269 if (has_usable_nil_type(new_field->GetType())) {
270 continue;
271 }
272
273 // enum can't be nullable, but it's okay if it has 0 as a valid enumerator.
274 if (const auto& enum_decl = new_types.GetEnumDeclaration(new_field->GetType());
275 enum_decl != nullptr) {
276 if (HasZeroEnumerator(*enum_decl)) {
277 continue;
278 }
279
280 // TODO(b/142893595): Rephrase the message: "provide a default value or make sure ..."
281 AIDL_ERROR(new_field) << "Field '" << new_field->GetName() << "' of enum '"
282 << enum_decl->GetName()
283 << "' can't be initialized as '0'. Please make sure '"
284 << enum_decl->GetName() << "' has '0' as a valid value.";
285 compatible = false;
286 continue;
287 }
288
289 // Old API versions may suffer from the issue presented here. There is
290 // only a finite number in Android, which we must allow indefinitely.
291 struct HistoricalException {
292 std::string canonical;
293 std::string field;
294 };
295 static std::vector<HistoricalException> exceptions = {
296 {"android.net.DhcpResultsParcelable", "serverHostName"},
297 {"android.net.ResolverParamsParcel", "resolverOptions"},
298 };
299 bool excepted = false;
300 for (const HistoricalException& exception : exceptions) {
301 if (older.GetCanonicalName() == exception.canonical &&
302 new_field->GetName() == exception.field) {
303 excepted = true;
304 break;
305 }
306 }
307 if (excepted) continue;
308
309 AIDL_ERROR(new_field)
310 << "Field '" << new_field->GetName()
311 << "' does not have a useful default in some backends. Please either provide a default "
312 "value for this field or mark the field as @nullable. This value or a null value will "
313 "be used automatically when an old version of this parcelable is sent to a process "
314 "which understands a new version of this parcelable. In order to make sure your code "
315 "continues to be backwards compatible, make sure the default or null value does not "
316 "cause a semantic change to this parcelable.";
317 compatible = false;
Jiyong Park3656c3c2018-08-01 20:02:01 +0900318 }
Jooyung Han3f347ca2020-12-01 12:41:50 +0900319
320 compatible = are_compatible_constants(older, newer) && compatible;
321
Jiyong Park3656c3c2018-08-01 20:02:01 +0900322 return compatible;
323}
324
Daniel Norman85aed542019-08-21 12:01:14 -0700325static bool are_compatible_enums(const AidlEnumDeclaration& older,
326 const AidlEnumDeclaration& newer) {
327 if (!are_compatible_types(older.GetBackingType(), newer.GetBackingType())) {
328 AIDL_ERROR(newer) << "Changed backing types.";
329 return false;
330 }
331
332 std::map<std::string, const AidlConstantValue*> old_enum_map;
333 for (const auto& enumerator : older.GetEnumerators()) {
334 old_enum_map[enumerator->GetName()] = enumerator->GetValue();
335 }
336 std::map<std::string, const AidlConstantValue*> new_enum_map;
337 for (const auto& enumerator : newer.GetEnumerators()) {
338 new_enum_map[enumerator->GetName()] = enumerator->GetValue();
339 }
340
341 bool compatible = true;
342 for (const auto& [name, value] : old_enum_map) {
343 if (new_enum_map.find(name) == new_enum_map.end()) {
344 AIDL_ERROR(newer) << "Removed enumerator from " << older.GetCanonicalName() << ": " << name;
345 compatible = false;
346 continue;
347 }
Jooyung Hanfdaae1d2020-12-14 13:16:15 +0900348 const string old_value = old_enum_map[name]->Literal();
349 const string new_value = new_enum_map[name]->Literal();
Daniel Norman85aed542019-08-21 12:01:14 -0700350 if (old_value != new_value) {
351 AIDL_ERROR(newer) << "Changed enumerator value: " << older.GetCanonicalName() << "::" << name
352 << " from " << old_value << " to " << new_value << ".";
353 compatible = false;
354 }
355 }
356 return compatible;
357}
358
Jiyong Park0cf03b12020-07-22 19:36:34 +0900359static Result<AidlTypenames> load_from_dir(const Options& options, const IoDelegate& io_delegate,
360 const std::string& dir) {
361 AidlTypenames typenames;
362 for (const auto& file : io_delegate.ListFiles(dir)) {
363 if (!android::base::EndsWith(file, ".aidl")) continue;
364 if (internals::load_and_validate_aidl(file, options, io_delegate, &typenames,
365 nullptr /* imported_files */) != AidlError::OK) {
366 AIDL_ERROR(file) << "Failed to read.";
367 return Error();
368 }
369 }
370 return typenames;
371}
372
Jiyong Park3656c3c2018-08-01 20:02:01 +0900373bool check_api(const Options& options, const IoDelegate& io_delegate) {
Steven Moreland21780812020-09-11 01:29:45 +0000374 AIDL_FATAL_IF(!options.IsStructured(), AIDL_LOCATION_HERE);
375 AIDL_FATAL_IF(options.InputFiles().size() != 2, AIDL_LOCATION_HERE)
376 << "--checkapi requires two inputs "
377 << "but got " << options.InputFiles().size();
Jiyong Park0cf03b12020-07-22 19:36:34 +0900378 auto old_tns = load_from_dir(options, io_delegate, options.InputFiles().at(0));
379 if (!old_tns.ok()) {
Jiyong Park3656c3c2018-08-01 20:02:01 +0900380 return false;
381 }
Jiyong Park0cf03b12020-07-22 19:36:34 +0900382 auto new_tns = load_from_dir(options, io_delegate, options.InputFiles().at(1));
383 if (!new_tns.ok()) {
Jiyong Park3656c3c2018-08-01 20:02:01 +0900384 return false;
385 }
Jiyong Parkf7534672019-08-12 22:06:22 +0900386
Jiyong Park0cf03b12020-07-22 19:36:34 +0900387 std::vector<AidlDefinedType*> old_types = old_tns->AllDefinedTypes();
388 std::vector<AidlDefinedType*> new_types = new_tns->AllDefinedTypes();
Jiyong Park3656c3c2018-08-01 20:02:01 +0900389
390 map<string, AidlDefinedType*> new_map;
391 for (const auto t : new_types) {
392 new_map.emplace(t->GetCanonicalName(), t);
393 }
394
395 bool compatible = true;
396 for (const auto old_type : old_types) {
397 const auto found = new_map.find(old_type->GetCanonicalName());
398 if (found == new_map.end()) {
399 AIDL_ERROR(old_type) << "Removed type: " << old_type->GetCanonicalName();
400 compatible = false;
401 continue;
402 }
403 const auto new_type = found->second;
404
Devin Mooredb7ac512020-08-07 11:17:36 -0700405 if (!have_compatible_annotations(*old_type, *new_type)) {
406 compatible = false;
407 }
Daniel Norman85aed542019-08-21 12:01:14 -0700408 if (old_type->AsInterface() != nullptr) {
409 if (new_type->AsInterface() == nullptr) {
410 AIDL_ERROR(new_type) << "Type mismatch: " << old_type->GetCanonicalName()
411 << " is changed from " << old_type->GetPreprocessDeclarationName()
412 << " to " << new_type->GetPreprocessDeclarationName();
413 compatible = false;
414 continue;
415 }
Jiyong Park3656c3c2018-08-01 20:02:01 +0900416 compatible &=
417 are_compatible_interfaces(*(old_type->AsInterface()), *(new_type->AsInterface()));
Daniel Norman85aed542019-08-21 12:01:14 -0700418 } else if (old_type->AsStructuredParcelable() != nullptr) {
419 if (new_type->AsStructuredParcelable() == nullptr) {
420 AIDL_ERROR(new_type) << "Parcelable" << new_type->GetCanonicalName()
421 << " is not structured. ";
422 compatible = false;
423 continue;
424 }
Jooyung Han636fd2f2020-10-22 11:33:45 +0900425 compatible &= are_compatible_parcelables(*(old_type->AsStructuredParcelable()), *old_tns,
426 *(new_type->AsStructuredParcelable()), *new_tns);
Jooyung Han2946afc2020-10-05 20:29:16 +0900427 } else if (old_type->AsUnionDeclaration() != nullptr) {
428 if (new_type->AsUnionDeclaration() == nullptr) {
429 AIDL_ERROR(new_type) << "Type mismatch: " << old_type->GetCanonicalName()
430 << " is changed from " << old_type->GetPreprocessDeclarationName()
431 << " to " << new_type->GetPreprocessDeclarationName();
432 compatible = false;
433 continue;
434 }
Jooyung Han636fd2f2020-10-22 11:33:45 +0900435 compatible &= are_compatible_parcelables(*(old_type->AsUnionDeclaration()), *old_tns,
436 *(new_type->AsUnionDeclaration()), *new_tns);
Daniel Norman85aed542019-08-21 12:01:14 -0700437 } else if (old_type->AsEnumDeclaration() != nullptr) {
438 if (new_type->AsEnumDeclaration() == nullptr) {
439 AIDL_ERROR(new_type) << "Type mismatch: " << old_type->GetCanonicalName()
440 << " is changed from " << old_type->GetPreprocessDeclarationName()
441 << " to " << new_type->GetPreprocessDeclarationName();
442 compatible = false;
443 continue;
444 }
445 compatible &=
446 are_compatible_enums(*(old_type->AsEnumDeclaration()), *(new_type->AsEnumDeclaration()));
447 } else {
448 AIDL_ERROR(old_type) << "Unsupported type " << old_type->GetPreprocessDeclarationName()
449 << " for " << old_type->GetCanonicalName();
450 compatible = false;
Jiyong Park3656c3c2018-08-01 20:02:01 +0900451 }
452 }
453
454 return compatible;
455}
456
457} // namespace aidl
458} // namespace android