Skip to content
Commit 5104da00 authored by Hui Yu's avatar Hui Yu
Browse files

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
parent d1ca4823
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment