commit | ecd8ffb08b42c558e12f539c74007fa80c991c0a | [log] [tgz] |
---|---|---|
author | Chaohui Wang <chaohuiw@google.com> | Tue Apr 04 00:15:29 2023 +0900 |
committer | Chaohui Wang <chaohuiw@google.com> | Tue Apr 04 00:15:29 2023 +0900 |
tree | 82d8d53d4ab55fb92c9179defa73ea1bf732580a | |
parent | 506a9b317dc96ff1c68c2c31396d0554ab6bcdb9 [diff] |
Fix App battery usage crash userContext.getApplicationContext() returns null, which cause crash. Use context instead to fix. userContext was used to support multiple profiles, since the app's user id is also passed to getAppBatteryUsageData(), userContext is not need. Fix: 269545838 Fix: 275957358 Test: Manually check the battery usage is still correct if an app is installed on two profiles Change-Id: I41a80e4c6edc338affb6eec0cf12da3c438cd7fd