commit | f23ab16751b56cf37d7f43e6878d7d0e535ca731 | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Fri Oct 29 21:48:52 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Oct 29 21:48:52 2021 +0000 |
tree | 00000bebd00e0a717cbde8fb1aabe865502bc89d | |
parent | e2030a9129cb1897eb3812ce87d11f47ecde2b6d [diff] | |
parent | 2faf3adc2580829ef44ffd44f2f19cf94f10668f [diff] |
Merge "health impl: compare interfaces with their binders" am: 1f5c57c965 am: e1bc376ed4 am: 2faf3adc25 Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1875175 Change-Id: Idced3513c873fb3f36c177d92eba344ec5ae73e8
diff --git a/health/aidl/default/Health.cpp b/health/aidl/default/Health.cpp index 2d91ce0..812e64a 100644 --- a/health/aidl/default/Health.cpp +++ b/health/aidl/default/Health.cpp
@@ -261,7 +261,7 @@ std::lock_guard<decltype(callbacks_lock_)> lock(callbacks_lock_); auto matches = [callback](const auto& linked) { - return linked->callback() == callback; // compares shared_ptr + return linked->callback()->asBinder() == callback->asBinder(); // compares binder object }; auto it = std::remove_if(callbacks_.begin(), callbacks_.end(), matches); bool removed = (it != callbacks_.end());