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

Commit eab4bde5 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by android-build-merger
Browse files

Merge \\\"Fix clang-tidy performance warnings in healthd.\\\" am: b66b16b3 am: 119d41c1

am: c15b1f9c

Change-Id: Iba64d6947e047324c306f5a9f03a8cbb701bf384
parents b3e6bca5 c15b1f9c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -35,7 +35,7 @@ void BatteryPropertiesRegistrar::publish(
    defaultServiceManager()->addService(String16("batteryproperties"), service);
    defaultServiceManager()->addService(String16("batteryproperties"), service);
}
}


void BatteryPropertiesRegistrar::notifyListeners(struct BatteryProperties props) {
void BatteryPropertiesRegistrar::notifyListeners(const struct BatteryProperties& props) {
    Mutex::Autolock _l(mRegistrationLock);
    Mutex::Autolock _l(mRegistrationLock);
    for (size_t i = 0; i < mListeners.size(); i++) {
    for (size_t i = 0; i < mListeners.size(); i++) {
        mListeners[i]->batteryPropertiesChanged(props);
        mListeners[i]->batteryPropertiesChanged(props);
+1 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,7 @@ class BatteryPropertiesRegistrar : public BnBatteryPropertiesRegistrar,
                                   public IBinder::DeathRecipient {
                                   public IBinder::DeathRecipient {
public:
public:
    void publish(const sp<BatteryPropertiesRegistrar>& service);
    void publish(const sp<BatteryPropertiesRegistrar>& service);
    void notifyListeners(struct BatteryProperties props);
    void notifyListeners(const struct BatteryProperties& props);


private:
private:
    Mutex mRegistrationLock;
    Mutex mRegistrationLock;