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

Commit d43724d0 authored by Stephane Lee's avatar Stephane Lee
Browse files

Initialize key structure to zero in charger

This is necessary because the key callback may not
be called before the states are checked.

Bug: 149107347
Test: Ensure charger does not reboot

Change-Id: I08d9e4b4046768eb0c0ca6171a2e5b7e5409d073
parent 770a0f07
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ class Charger : public ::android::hardware::health::V2_1::implementation::HalHea
    int64_t next_pwr_check_ = 0;
    int64_t wait_batt_level_timestamp_ = 0;

    key_state keys_[KEY_MAX + 1];
    key_state keys_[KEY_MAX + 1] = {};

    animation batt_anim_;
    GRSurface* surf_unknown_ = nullptr;