Skip to content
Commit 6f1754ea authored by Ahmed ElArabawy's avatar Ahmed ElArabawy
Browse files

Wifi: Fix Wifi Multicast Wakelock Statistics

In current implementation, when the same UID holds multiple WiFi
wakelocks, the timer for the lock acquisition in batterystats is started
with the first wakelock acquire and stops with first release.
So the nesting of wakelocks of the same Uid is not correctly accounted for.
(so if Lock#1 acquired at T1, Lock# 2 acquired at T2, Lock#2 released at T3,
lock #1 released at T4 , the timer will only consider the interval T3 - T1 which
is not the correct value).

This commit fixes this issue by starting the timer on the first
acquisition, and stopping it on the last release

Bug: 70691435
Test: Unit Test
Test: $ atest BatteryStatsImplTest

Change-Id: Ie955b6ab0eb1e9837fdda2b8d81835038b8d71da
parent 28794a6c
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