aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-01-03 22:40:37 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-01-03 22:40:37 +0000
commit12840dc2ec1cf3a3ab1277358522fe947697ba97 (patch)
tree1710f454d1b182294e9da8a291b65dc302015b72
parent014112f76dd2b1bdbe736971073cb5f53363a01e (diff)
parent247b304cfa05df0252fef1932b6fde8cc7aff9eb (diff)
downloadhidl-oreo-m2-s5-release.tar.gz
Change-Id: Ic2de4a29bdd58a07f5c658d163f2ac014ed38147
-rw-r--r--generateCpp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/generateCpp.cpp b/generateCpp.cpp
index eee54128..158402fb 100644
--- a/generateCpp.cpp
+++ b/generateCpp.cpp
@@ -1672,6 +1672,10 @@ status_t AST::generateStubSource(
out.indent();
+ out << "bool _hidl_is_oneway = _hidl_flags & ::android::hardware::IBinder::FLAG_ONEWAY;\n";
+ out << "if (_hidl_is_oneway != " << (method->isOneway() ? "true" : "false") << ") ";
+ out.block([&] { out << "return ::android::UNKNOWN_ERROR;\n"; }).endl().endl();
+
status_t err = generateStubSourceForMethod(out, method, superInterface);
if (err != OK) {