Skip to content
Commit 941d98fe authored by Bookatz's avatar Bookatz
Browse files

Wakelock durations are 0 instead of -1 if unused

Previously, wakelock max/current/total durations were initialized to -1,
instead of 0. So if, e.g., an app held a full wakelock but not a partial
wakelock, then the partial wakelock would return -1 for these data. This
cl changes that to be 0. The value will only be -1 if the data is not
tracked (as is currently the case for full and window wakelocks), in
which case if the wakelock was held, -1 will be given to signify the
lack of tracking.

Test: manually confirm 0 instead of -1 in batterystats dump.
Change-Id: I934022294ba5adafb2e4d9a5be1dc20aab045cb0
parent 506a8183
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