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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user