summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramStore.java
diff options
context:
space:
mode:
authorAdam Bookatz <bookatz@google.com>2021-02-24 01:35:16 +0000
committerAdam Bookatz <bookatz@google.com>2021-02-24 21:30:59 +0000
commit5bb1ec89d3f4435c0e91387388dc76f0494d749c (patch)
treed84e5060dfd0cd849af84e53164bbe4a403ef876 /rs/java/android/renderscript/ProgramStore.java
parent0088eefaac7fb499929d6c8f28e844681cfe3041 (diff)
BatteryStats custom buckets: don't revive dead Uids
It is possible for old uids to be reported to BatteryStats in updateCustomMeasuredEnergyDataLocked(). This can happen, e.g., if a uid was uninstalled between successive custom energy updates, so that the uid did use non-zero energy but BatteryStats doesn't care anymore since the uid is gone. If this happens, we don't want to recreate any removed Uid objects, so we need to be careful to only consider Uids that aren't removed. In practice, this method will only be called after the CPU update, which means that BatteryStats should already know about all active uids (assuming they used CPU). Therefore, there shouldn't be any unknown uids actively using custom energy buckets at this point. We therefore simply ignore any unknown uids (just log them), on the assumption that they refer to removed uids or stopped users. Test: atest BatteryStatsTests Bug: 180030409 Change-Id: If4fee7a1d11b148ca16d464d6ce4720c5a251130
Diffstat (limited to 'rs/java/android/renderscript/ProgramStore.java')
0 files changed, 0 insertions, 0 deletions