Closed Reflexe closed 3 years ago
@Electric1447 I think in one of your previous commits you did something similar, where the RemoteViews were recreated with every update, right? Did it have any adverse effects for you? I remember switching to updating the RemoteViews because it made my phone laggy, but that was during the initial development in 2019.
Maybe this answer is more informative: https://stackoverflow.com/a/53222877
@Electric1447 I think in one of your previous commits you did something similar, where the RemoteViews were recreated with every update, right? Did it have any adverse effects for you? I remember switching to updating the RemoteViews because it made my phone laggy, but that was during the initial development in 2019.
I did not test enough to remember any effects, however I will test the changes in this PR as I am experiencing #107 a lot.
@Electric1447 Have you managed to reproduce the issue after this PR?
Any updates on this?
At least on my device, I never saw any issue after this PR. Anyway, maybe it worth comparing CPU usage and make sure it won't affect other phones.
This has been open for a while so I'm going to merge it. Fingers crossed
Here's an APK for y'all to test if you want app-release.zip
Let me know how it works.
Fix a memory leak caused by trying to update the same RemoteViews. Instead of trying to update them, create them from scratch on every iteration.
The memory leak on RemoteViews caused the Parcel to get very big and therefore undeliverable by the Samsung NotificationService.
See https://stackoverflow.com/a/4484693/6797552
Fixes #107