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

Commit 04b1e6e6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "storaged: Fix double ownership for HealthInfoCallback." am: 3d0143dc

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2035103

Change-Id: I7423073cb2b326930ad071dec854ca126ede6be9
parents eb19bcb4 3d0143dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ void storaged_t::init_health_service() {

    mUidm.init(is_charger_on(status));
    // register listener after init uid_monitor
    aidl_health_callback = std::make_shared<HealthInfoCallback>(&mUidm);
    aidl_health_callback = ndk::SharedRefBase::make<HealthInfoCallback>(&mUidm);
    ret = health->registerCallback(aidl_health_callback);
    if (!ret.isOk()) {
        LOG(WARNING) << "health: failed to register callback: " << ret.getDescription();