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

Commit 75e8e39f authored by Myles Watson's avatar Myles Watson Committed by Automerger Merge Worker
Browse files

Merge "Sleep before crashing when the HIDL HAL dies" into main am: bd5606aa

parents d4e4033c bd5606aa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -61,9 +61,11 @@ 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. Calling exit(0);");
    LOG_ERROR("The Bluetooth HAL service died. Dumping logs and crashing in 1 second.");
    common::StopWatch::DumpStopWatchLog();
    exit(0);
    // At shutdown, sometimes the HAL service gets killed before Bluetooth.
    std::this_thread::sleep_for(std::chrono::seconds(1));
    LOG_ALWAYS_FATAL("The Bluetooth HAL died.");
  }
};