-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I could find some applications for which the getSessions() in AppUsageManager.kt gives Session object starting from midnight i.e from 00:00:00 to a time from where the actual first session started which is the subsequent session in the sessions list.
This causes the overall usage time to be much more than what it actually is and gives the wrong session info as well..
For reference, I am attaching some screenshots,
I believe this is due to the fact that we consider 'startTime' for events that are not initialized as 'timeStart' - I will test some more and put my observations here, meanwhile please check if you are getting the same issue as well.
UsageEvents.Event.ACTIVITY_PAUSED -> { // same as MOVE_TO_BACKGROUND
// end time
if(startTime == 0L) {
if(!isInitialized) {
startTime = timeStart
endTime = event.timeStamp
}
} else {
endTime = event.timeStamp
}
}
I appreciate your time and effort put in this project, Thanks for this project.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels


