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

Commit 26b2be0d authored by Jin Qian's avatar Jin Qian
Browse files

storaged: stop binder threads before exiting

Test: kill healthd when storaged is running
Bug: 36652060
Change-Id: Ie55fb6cb7c8c6df6ce6bc4820c476b90cc0f4165
parent 566e63da
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#include <android-base/logging.h>
#include <batteryservice/BatteryServiceConstants.h>
#include <batteryservice/IBatteryPropertiesRegistrar.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <cutils/properties.h>
#include <log/log.h>
@@ -192,6 +193,7 @@ void storaged_t::binderDied(const wp<IBinder>& who) {
    if (battery_properties != NULL &&
        IInterface::asBinder(battery_properties) == who) {
        LOG_TO(SYSTEM, ERROR) << "batteryproperties service died, exiting";
        IPCThreadState::self()->stopProcess();
        exit(1);
    } else {
        LOG_TO(SYSTEM, ERROR) << "unknown service died";