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

Commit c1efff4f authored by Jack He's avatar Jack He
Browse files

GD Storage: Call SaveDelayed on the right thread

* To resolve a dedlock between StorageModule and ConfigCache

Fixes: 178976563
Bug: 178976563
Test: atest bluetooth_test_gd
Tag: #gd-refactor
BYPASS_LONG_LINES_REASON: Bluetooth likes 120 lines

Change-Id: I13a51931111eb3c0e1c999cd4b7f4fc30d9e1f13
parent b25d02f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ void StorageModule::Start() {
    config->SetProperty(kInfoSection, kTimeCreatedProperty, ss.str());
  }
  config->FixDeviceTypeInconsistencies();
  config->SetPersistentConfigChangedCallback([this] { this->SaveDelayed(); });
  config->SetPersistentConfigChangedCallback([this] { this->CallOn(this, &StorageModule::SaveDelayed); });
  // TODO (b/158035889) Migrate metrics module to GD
  pimpl_ = std::make_unique<impl>(GetHandler(), std::move(config.value()), temp_devices_capacity_);
  SaveDelayed();