Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1acd636 authored by Joe Onorato's avatar Joe Onorato
Browse files

Make getBatteryUptimeLocked protected so it can be mocked.

Also fix test names.

Change-Id: I43477e61c22cd36735214951c45c52b39095e1b5
parent 62b9ff49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9446,7 +9446,7 @@ public class BatteryStatsImpl extends BatteryStats {
        return mDailyPackageChanges;
    }

    long getBatteryUptimeLocked() {
    protected long getBatteryUptimeLocked() {
        return mOnBatteryTimeBase.getUptime(mClocks.uptimeMillis() * 1000);
    }

+2 −2
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ public class BatteryStatsServTest extends TestCase {
     * Test startLaunchedLocked while not previously launched
     */
    @SmallTest
    public void testStartLaunchedLockedWhileNotLaunched() throws Exception  {
    public void testStartLaunchedLockedWhileLaunched() throws Exception  {
        MockBatteryStatsImpl bsi = new MockBatteryStatsImpl() {
            @Override
            public long getBatteryUptimeLocked() {
@@ -288,7 +288,7 @@ public class BatteryStatsServTest extends TestCase {
     * Test startLaunchedLocked while previously launched
     */
    @SmallTest
    public void testStartLaunchedLockedWhileLaunched() throws Exception  {
    public void testStartLaunchedLockedWhileNotLaunched() throws Exception  {
        MockBatteryStatsImpl bsi = new MockBatteryStatsImpl() {
            @Override
            public long getBatteryUptimeLocked() {