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

Commit 4a527e59 authored by Jin Qian's avatar Jin Qian Committed by android-build-merger
Browse files

storaged: skip batteryproperties listener if uid_io not available

am: ba27df4d

Change-Id: I0ab4df668b3f8401a8fdb53cdcdebc66a6bf9ad1
parents 5227efa2 ba27df4d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -170,6 +170,9 @@ void storaged_t::batteryPropertiesChanged(struct BatteryProperties props) {
}

void storaged_t::init_battery_service() {
    if (!mConfig.proc_uid_io_available)
        return;

    sp<IBatteryPropertiesRegistrar> battery_properties = get_battery_properties_service();
    if (battery_properties == NULL) {
        LOG_TO(SYSTEM, WARNING) << "failed to find batteryproperties service";