Loading src/com/android/settings/fuelgauge/anomaly/action/BackgroundCheckAction.java +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading tests/robotests/src/com/android/settings/fuelgauge/anomaly/action/BackgroundCheckActionTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -94,4 +94,11 @@ public class BackgroundCheckActionTest { assertThat(mBackgroundCheckAction.isActionActive(mAnomaly)).isFalse(); } @Test public void testConstructor_batteryUtilsNotNull() { mBackgroundCheckAction = new BackgroundCheckAction(mContext); assertThat(mBackgroundCheckAction.mBatteryUtils).isNotNull(); } } Loading
src/com/android/settings/fuelgauge/anomaly/action/BackgroundCheckAction.java +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
tests/robotests/src/com/android/settings/fuelgauge/anomaly/action/BackgroundCheckActionTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -94,4 +94,11 @@ public class BackgroundCheckActionTest { assertThat(mBackgroundCheckAction.isActionActive(mAnomaly)).isFalse(); } @Test public void testConstructor_batteryUtilsNotNull() { mBackgroundCheckAction = new BackgroundCheckAction(mContext); assertThat(mBackgroundCheckAction.mBatteryUtils).isNotNull(); } }