Closed miguelguzmanr closed 1 month ago
I suggest we put these changes on hold while we review other pull requests @langerhans
Introduces configurable charging separation. Requires thorough testing, as this may introduce additional battery drain due to having to monitor the battery level.
This approach only works if the app is running in the background. I think this might need to be implemented as a foreground service or a background task.
Even with the fix from #23 this does not work in background? Could we just watch battery state with Intent.ACTION_BATTERY_CHANGED
?
Introduces a service to monitor the battery level. Just trying out a different approach. Sadly, the service forcefully ends when the app is terminated in any way.
Requires #23 to work in the background.
Fixed incorrectly reading restrictCharge setting as a system setting instead of as a text file. Discovered that charging separation briefly turns off when the screen is turned off. Not sure about the culprit. Added a trigger for screen off event to combat this behavior. Should work properly now.
Added an option to dump a log file for debug builds. Might be useful for troubleshooting issues.
@langerhans please let me know your thoughts!
@langerhans please let me know if this approach works better!
Yup looks good to me, LGTM
Things to note: