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

Skip to content
Commit 420ed9ef authored by Hui Yu's avatar Hui Yu
Browse files

Fix the memory leak in BatteryStatsImpl.Timebase.mObservers.

The observer does not always remove themself after adding themself into
mObservers list. The strong reference in mObservers causes memory leak.
The fix is to change mObservers to hold WeakReference.

Fix: 80443940
Test: "adb shell cmd battery unplug" and "adb shell cmd battery set ac",
observe memory usage from Android Monitor.

Change-Id: I27436e350fa0d211c4c64114411a6603824ce599
parent 038f1a19
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment