-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SettingsRepo, refactoring & setting for battery limit #28
Conversation
- Apply consistent indentation - Use android constants for color values instead of hex values
Attempt to use generic icon names to promote re-usable icons
Use consistent capitalization and punctuation.
- Add a class for system settings. - Attempt consistency in function & variable names.
Add SettingsRepo, refactoring & setting for battery limit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the name I think it's fine as it is. I'm bad at naming things so I don't worry so much about it. As for the package maybe we can move SettingsRepo and ShellExecutor to a new package "system" since they are responsible for communicating with the system. Keep DeviceUtils in tools and BootReceiver can live there for now as well. Maybe that will be a bit cleaner.
Otherwise nice work, thanks!
app/src/main/java/de/langerhans/odintools/tools/SettingsRepo.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/langerhans/odintools/tools/SettingsRepo.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/langerhans/odintools/tools/SettingsRepo.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/de/langerhans/odintools/tools/SettingsRepo.kt
Outdated
Show resolved
Hide resolved
I suggest we put these changes on hold while we review other pull requests @langerhans |
Add configuration cache to improve build performance
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 |
Only for debug builds
Introduces a service to monitor the battery level. Requires #23 to work in the background. Fixed incorrectly reading restrictCharge setting as a system setting instead of as a text file. Added an option to dump a log file for debug builds. |
@langerhans please let me know your thoughts! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to merge this, but just had two more questions :)
app/src/main/java/de/langerhans/odintools/service/BatteryLevelMonitorService.kt
Outdated
Show resolved
Hide resolved
@langerhans please let me know if this approach works better! |
Yup looks good to me, LGTM |
Things to note: