Do not hold direct ref BatteryStatsImpl$Uid$Proc

BatteryStatsImpl can reset its collected data, including
removing a BatteryStatsImpl$Uid$Proc object. If a ProcessRecord
has a direct reference, then the battery stats for a process
will be recorded in an old Proc object and prevent GC, causing
a memory leak.

Change-Id: I19a9cd9d8361c10446a8ebdd5c0860b56c442209
2 files changed