Only set mStartClockTime when device is fully charged.
The mStartClockTime represents the time device is fully charged. Currently mStartClockTime is set again whenever the device clock changes. Since the device clock could change many times, we lost original mStartClockTime value, unreasonable mStartClockTime values for example 26 days could be returned (because the device clock changes) when getStartClockTime() is called. A better solution is to only set mStartClockTime when device is fully charged, the value is persisted across device reboot. When getStartClockTime() is called, we return adjusted value according to current time. Change-Id: I49ded1519bc31daf1a51a572325cbbe67f1abd09 Fix: 132914064 Test: Manual test, checking Settings--Battery--Last full Charge
Loading
Please register or sign in to comment