summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-09-25 09:27:40 -0700
committerJean-Baptiste Queru <jbq@google.com>2012-09-25 09:27:45 -0700
commitca94050705ff1886e622a09c2691a76e92c0f9d8 (patch)
treec4f73c1cfc2b02c9adfc8d650b04f759cae165f1 /tools
parent93fd0f7a83f61d4d673b73e002bd9ad7d6ce562b (diff)
parent50a94b86307793ca9d4d8f8564e5f2ba78fdde14 (diff)
downloadframeworks_base-ca94050705ff1886e622a09c2691a76e92c0f9d8.zip
frameworks_base-ca94050705ff1886e622a09c2691a76e92c0f9d8.tar.gz
frameworks_base-ca94050705ff1886e622a09c2691a76e92c0f9d8.tar.bz2
Merge into jb-mr1-dev
Change-Id: I5a9970a011de789aaeb1c4c4ed58ae750071b135
Diffstat (limited to 'tools')
-rw-r--r--tools/aidl/aidl.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/aidl/aidl.cpp b/tools/aidl/aidl.cpp
index 8dbbf50..0728246 100644
--- a/tools/aidl/aidl.cpp
+++ b/tools/aidl/aidl.cpp
@@ -590,7 +590,8 @@ exactly_one_interface(const char* filename, const document_item_type* items, con
}
const document_item_type* next = items->next;
- if (items->next != NULL) {
+ // Allow parcelables to skip the "one-only" rule.
+ if (items->next != NULL && next->item_type != USER_DATA_TYPE) {
int lineno = -1;
if (next->item_type == INTERFACE_TYPE_BINDER) {
lineno = ((interface_type*)next)->interface_token.lineno;
@@ -598,9 +599,6 @@ exactly_one_interface(const char* filename, const document_item_type* items, con
else if (next->item_type == INTERFACE_TYPE_RPC) {
lineno = ((interface_type*)next)->interface_token.lineno;
}
- else if (next->item_type == USER_DATA_TYPE) {
- lineno = ((user_data_type*)next)->keyword_token.lineno;
- }
fprintf(stderr, "%s:%d aidl can only handle one interface per file\n",
filename, lineno);
return 1;