OSDN Git Service

Deal with daylight savings time in battery chart.
authorPhilip P. Moltmann <moltmann@google.com>
Tue, 27 Oct 2015 00:30:10 +0000 (17:30 -0700)
committerPhilip P. Moltmann <moltmann@google.com>
Tue, 27 Oct 2015 19:19:46 +0000 (12:19 -0700)
commit99b78b3eebd4fa75c3d8a4a4e500a91faf5a4c12
tree06cc53287c0c52e8689b30e8a2f2af001ce9f139
parent61eaed7bfb28cfbee4c4380f36c264e02064e942
Deal with daylight savings time in battery chart.

Without daylight saving time the middle between two beginnings of days
can only be another beginning of a day or noon. Due to daylight savings
time this can be shifted by up to one hour in either direction.

This change corrects the middle value.

Testing Done: Tried the calculation of the three values with Lisbon time
and

mStartWallTime = 1414254027000L;
mEndWallTime = 1414473627000L;

which spans over 10/26/2014, the day daylight saving ended in Lisbon.

Change-Id: I2d2ba6e1fd2e409ca3f6b0f7674ec250da7ffad5
src/com/android/settings/fuelgauge/BatteryHistoryChart.java