commit | 31cdfb401da53bec41a020f300c8f10dd7733290 | [log] [tgz] |
---|---|---|
author | Mike Ma <yanmin@google.com> | Fri Jun 29 12:18:27 2018 -0700 |
committer | Mike Ma <yanmin@google.com> | Fri Jun 29 16:55:17 2018 -0700 |
tree | 924928cb061ac7823ef62934dc20eb79e7cb8124 | |
parent | 304c3b3b8a526f9cc78e8222a4a2e1e8d9c84355 [diff] |
Fix a NPE in BatteryStatsImpl ServiceManager.getService("batteryproperties")) may return null for some devices right after boot. (We don't know why, need further investigation) This causes async batterystats update to crash, leaving BatteryStats in a bad state (OnBattery() == true, but mOnBatteryTimeBase is not running), which does not accept aggregated stats update anymore. Bug: 109930230 Test: manual Change-Id: I0654beff95f0a2b9df2567f1a2efffd3330e58ff