Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5733c5c authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

shim: Wrap TRY_POSTING_ON_MAIN conditional am: d79efe4d am: 35949f63

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1678925

Change-Id: Ie487fb5c9e0070b69c0757054f6f46358e497dc2
parents 36087fa5 35949f63
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -238,11 +238,13 @@ void ValidateAclInterface(const shim::legacy::acl_interface_t& acl_interface) {
}  // namespace

#define TRY_POSTING_ON_MAIN(cb, ...)                               \
  do {                                                             \
    if (cb == nullptr) {                                           \
      LOG_WARN("Dropping ACL event with no callback");             \
    } else {                                                       \
      do_in_main_thread(FROM_HERE, base::Bind(cb, ##__VA_ARGS__)); \
  }
    }                                                              \
  } while (0)

constexpr HciHandle kInvalidHciHandle = 0xffff;