Hui Yu 420ed9ef22 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
2018-06-28 20:09:12 +00:00
2018-05-14 16:47:02 -07:00
2018-06-18 15:17:55 +00:00
Description
No description provided
21 GiB
Languages
Java 73.7%
Kotlin 14%
PowerBuilder 5.8%
C++ 5.2%
AIDL 1%