BatteryStats: use the same timestamp for comparing intervals

Use the timestamp provided by the modem to compare time.

Bug:28133571
Change-Id: I046bc1f2b90ba9b8b8245f031925476680ba5275
This commit is contained in:
Adam Lesinski
2016-04-19 18:29:50 -07:00
parent 6e08a629c4
commit 9acfd8166b

View File

@@ -3397,7 +3397,7 @@ public class BatteryStatsImpl extends BatteryStats {
powerState == DataConnectionRealTimeInfo.DC_POWER_STATE_MEDIUM
|| powerState == DataConnectionRealTimeInfo.DC_POWER_STATE_HIGH;
if (active) {
mMobileRadioActiveStartTime = realElapsedRealtimeMs = elapsedRealtime;
mMobileRadioActiveStartTime = realElapsedRealtimeMs = timestampNs / (1000 * 1000);
mHistoryCur.states |= HistoryItem.STATE_MOBILE_RADIO_ACTIVE_FLAG;
} else {
realElapsedRealtimeMs = timestampNs / (1000*1000);