diff options
author | Joe Onorato <joeo@google.com> | 2011-11-08 17:35:09 -0800 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2011-11-08 17:35:09 -0800 |
commit | 2037c2585c4e00a11d85731a6a6a2152589dde63 (patch) | |
tree | 326fc319165dd6df21559166a0bbc832fb02a0df /tools/aidl | |
parent | 44c620da02fd55f589b910863da892972f01ebc5 (diff) | |
download | frameworks_base-2037c2585c4e00a11d85731a6a6a2152589dde63.zip frameworks_base-2037c2585c4e00a11d85731a6a6a2152589dde63.tar.gz frameworks_base-2037c2585c4e00a11d85731a6a6a2152589dde63.tar.bz2 |
For events, require that the parameters be marked in.
(because they won't work otherwise)
Change-Id: I77f370ca1bc381ea07fc2854d2a90d8138ca1796
Diffstat (limited to 'tools/aidl')
-rw-r--r-- | tools/aidl/aidl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp index cd23b65..3d314db 100644 --- a/tools/aidl/aidl.cpp +++ b/tools/aidl/aidl.cpp @@ -476,6 +476,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" |