Open lfos opened 8 months ago
Next day after the screenshot in the original report was taken, and daily quota is now at 19.6GB. Note that this is rougly a doubling from yesterday's quota. Could there be a bug where the current quota is accidentally added to the daily rollover?
Next day after the screenshot in the original report was taken, and daily quota is now at 19.6GB. Note that this is rougly a doubling from yesterday's quota. Could there be a bug where the current quota is accidentally added to the daily rollover?
Looking at the code, this guess seems to be correct; new quota is currently computed as 2 * dailyQuota - dataUsage
in DataRolloverHelper, leading to the observed exponential quota growth. One way to address this is to separate "original" daily quota and current rollover amount:
As a bonus, with these changes issue #236 becomes quite simple to implement: After adding the option, all that's needed is to omit addition of current rollover amount in step 3 above.
@lfos Thanks for your input. Indeed, this particular behaviour seems to be caused due to the rollover of the remaining data entirely to the following day, causing a large accumulation over time. New quota is currently calculated by adding / subtracting the remaining / excess data as per the use case. Will have to implement some checks in place to fix the behaviour. Thanks again for suggestion.
@itsdrnoob - Thanks! A small nit: Rollover of the entierty of remaining data does not seem to be the issue. The problem is that DataMonitor "forgets" what the proper quota of the "next day" should be, and assumes it's the same as the current day's quota (which includes "original quota" and rollover, thus doubling the rollover amount). Thus the proposal above to keep track of both "original quota" and rollover amount separately.
Checklist
Affected app version
v2.4.0
Steps to reproduce the bug
Expected behavior
Data gracefully rolls over at the end of day, keeping daily quota always below remaining data left.
Actual behavior
Daily quota seems to grow much more than expected, after a few days even exceeding total available data on plan.
Screenshots/Screen recordings
Logs
No response
Affected Android/Custom ROM version
Android 14
Affected device model
Pixel 7
Additional context
Let me know if there's more information that'd be useful to have for troubleshooting.