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

Commit b2148ebf authored by Myles Watson's avatar Myles Watson
Browse files

Bluetooth: Exit when the HAL dies

Bug: 277019596
Test: reboot cuttlefish and watch it kill the HAL, look for the crash
Change-Id: I01ba6bf91f89fe93ec2c88db5de0e3bd137e0a72
parent 41acc1fd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -62,9 +62,9 @@ namespace {
class HciDeathRecipient : public ::android::hardware::hidl_death_recipient {
 public:
  virtual void serviceDied(uint64_t /*cookie*/, const android::wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
    LOG_ERROR("Bluetooth HAL service died!");
    LOG_ERROR("Bluetooth HAL service died. Calling exit(0);");
    common::StopWatch::DumpStopWatchLog();
    abort();
    exit(0);
  }
};

@@ -417,9 +417,9 @@ class HciHalHidl : public HciHal {
      LOG_INFO("Using the AIDL interface");
      aidl_death_recipient_ =
          ::ndk::ScopedAIBinder_DeathRecipient(AIBinder_DeathRecipient_new([](void* cookie) {
            LOG_ERROR("Bluetooth HAL service died!");
            LOG_ERROR("Bluetooth HAL service died. Calling exit(0);");
            common::StopWatch::DumpStopWatchLog();
            abort();
            exit(0);
          }));

      auto death_link =