summaryrefslogtreecommitdiffstats
path: root/tools/aidl/generate_java_rpc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aidl/generate_java_rpc.cpp')
-rw-r--r--tools/aidl/generate_java_rpc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aidl/generate_java_rpc.cpp b/tools/aidl/generate_java_rpc.cpp
index e5fa076..5e4dacc 100644
--- a/tools/aidl/generate_java_rpc.cpp
+++ b/tools/aidl/generate_java_rpc.cpp
@@ -786,7 +786,10 @@ generate_result_dispatcher_method(const method_type* method,
}
// Call the callback method
- dispatchMethod->statements->Add(realCall);
+ IfStatement* ifst = new IfStatement;
+ ifst->expression = new Comparison(new FieldVariable(THIS_VALUE, "callback"), "!=", NULL_VALUE);
+ dispatchMethod->statements->Add(ifst);
+ ifst->statements->Add(realCall);
}
static void