Skip to content
Commit 610a0a09 authored by jackqdyulei's avatar jackqdyulei
Browse files

Write currentDuration into Parcel

This cl writes currentDuration to Parcel, so in battery settings we could
use this data in anomaly detection.

Also note that in getTotalDurationMsLock(aka method1), the logic is:

result = mTotalDurationMs + getCurrentDurationMsLocked(aka method2)

Since now method2 is not zero, we also tweaked the value for
mTotalDurationMs to make method1 return the same value compared with
before.

Since getMaxDurationMsLocked depends on mNesting, which is always zero,
so we don't need to tweak value for mMaxDurationMs

All these methods are covered in BatteryStatsDurationTimerTest

Bug: 64255589
Test: runtest -x BatteryStatsTest
Change-Id: I9168be099d00bb68fedbc5bfbb7bf7f0d9aae85a
parent 98af408a
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