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

Commit a103bc51 authored by Makoto Onuki's avatar Makoto Onuki Committed by android-build-merger
Browse files

Merge "Adjust future charge start time." into pi-dev

am: 6c2679d5

Change-Id: I50245cc669359bd758ddee55311af30e95adbb65
parents 53de2ed4 6c2679d5
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -4084,7 +4084,8 @@ public class BatteryStatsImpl extends BatteryStats {
    boolean ensureStartClockTime(final long currentTime) {
    boolean ensureStartClockTime(final long currentTime) {
        final long ABOUT_ONE_YEAR = 365*24*60*60*1000L;
        final long ABOUT_ONE_YEAR = 365*24*60*60*1000L;
        if (currentTime > ABOUT_ONE_YEAR && mStartClockTime < (currentTime-ABOUT_ONE_YEAR)) {
        if ((currentTime > ABOUT_ONE_YEAR && mStartClockTime < (currentTime-ABOUT_ONE_YEAR))
                || (mStartClockTime > currentTime)) {
            // If the start clock time has changed by more than a year, then presumably
            // If the start clock time has changed by more than a year, then presumably
            // the previous time was completely bogus.  So we are going to figure out a
            // the previous time was completely bogus.  So we are going to figure out a
            // new time based on how much time has elapsed since we started counting.
            // new time based on how much time has elapsed since we started counting.