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

Commit d054a951 authored by Todd Poynor's avatar Todd Poynor Committed by android-build-merger
Browse files

Merge "healthd: BatteryPropertiesRegistrar binder service ref count fixup" am: 36ba2fad

am: 4a129d5a

* commit '4a129d5a':
  healthd: BatteryPropertiesRegistrar binder service ref count fixup
parents 8c436669 4a129d5a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -30,8 +30,9 @@

namespace android {

void BatteryPropertiesRegistrar::publish() {
    defaultServiceManager()->addService(String16("batteryproperties"), this);
void BatteryPropertiesRegistrar::publish(
    const sp<BatteryPropertiesRegistrar>& service) {
    defaultServiceManager()->addService(String16("batteryproperties"), service);
}

void BatteryPropertiesRegistrar::notifyListeners(struct BatteryProperties props) {
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ namespace android {
class BatteryPropertiesRegistrar : public BnBatteryPropertiesRegistrar,
                                   public IBinder::DeathRecipient {
public:
    void publish();
    void publish(const sp<BatteryPropertiesRegistrar>& service);
    void notifyListeners(struct BatteryProperties props);

private:
+1 −1
Original line number Diff line number Diff line
@@ -58,5 +58,5 @@ void healthd_mode_android_init(struct healthd_config* /*config*/) {
    }

    gBatteryPropertiesRegistrar = new BatteryPropertiesRegistrar();
    gBatteryPropertiesRegistrar->publish();
    gBatteryPropertiesRegistrar->publish(gBatteryPropertiesRegistrar);
}