Init BatteryUtils in constructor
In this case we won't have the NPE. Bug: 63526637 Test: RunSettingsRoboTests Change-Id: I20375e535ba07deddacf74052f31476e0cb28e56
This commit is contained in:
@@ -38,6 +38,7 @@ public class BackgroundCheckAction extends AnomalyAction {
|
||||
super(context);
|
||||
mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
|
||||
mActionMetricKey = MetricsProto.MetricsEvent.ACTION_APP_BACKGROUND_CHECK;
|
||||
mBatteryUtils = BatteryUtils.getInstance(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user