summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2011-11-08 17:35:09 -0800
committerMike Lockwood <lockwood@google.com>2012-02-10 14:44:04 -0800
commitfcb310f93680b87943c90a321e2beedcb8c528b8 (patch)
tree198517d088664eb173b2677166ce8439d38638bf /tools
parentf5f4ec97916a22859abae69c7e8f522d36271eb6 (diff)
downloadframeworks_base-fcb310f93680b87943c90a321e2beedcb8c528b8.zip
frameworks_base-fcb310f93680b87943c90a321e2beedcb8c528b8.tar.gz
frameworks_base-fcb310f93680b87943c90a321e2beedcb8c528b8.tar.bz2
For events, require that the parameters be marked in.
(because they won't work otherwise)
Diffstat (limited to 'tools')
-rw-r--r--tools/aidl/aidl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp
index e5689b9..8dbbf50 100644
--- a/tools/aidl/aidl.cpp
+++ b/tools/aidl/aidl.cpp
@@ -475,6 +475,15 @@ check_method(const char* filename, int kind, method_type* m)
err = 1;
}
+ if (returnType == EVENT_FAKE_TYPE
+ && convert_direction(arg->direction.data) != IN_PARAMETER) {
+ fprintf(stderr, "%s:%d parameter %d: '%s %s' All paremeters on events must be 'in'.\n",
+ filename, m->type.type.lineno, index,
+ arg->type.type.data, arg->name.data);
+ err = 1;
+ goto next;
+ }
+
if (arg->direction.data == NULL
&& (arg->type.dimension != 0 || t->CanBeOutParameter())) {
fprintf(stderr, "%s:%d parameter %d: '%s %s' can be an out"