Remove unnecessarily complicated code. am: 634f84fed4 am: 8817ca370b am: 983714d6fe
Original change: https://android-review.googlesource.com/c/platform/system/libhwbinder/+/2000112
Change-Id: Ia13f5668444757ff1acf05d8d981a1c2257dfa11
diff --git a/Binder.cpp b/Binder.cpp
index b90639f..6d26414 100644
--- a/Binder.cpp
+++ b/Binder.cpp
@@ -129,20 +129,12 @@
}
}
- status_t err = NO_ERROR;
- switch (code) {
- default:
- err = onTransact(code, data, reply, flags,
- [&](auto &replyParcel) {
- replyParcel.setDataPosition(0);
- if (callback != nullptr) {
- callback(replyParcel);
- }
- });
- break;
- }
-
- return err;
+ return onTransact(code, data, reply, flags, [&](auto& replyParcel) {
+ replyParcel.setDataPosition(0);
+ if (callback != nullptr) {
+ callback(replyParcel);
+ }
+ });
}
status_t BHwBinder::linkToDeath(