-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
No battery options for G7 #3295
No battery options for G7 #3295
Conversation
Merge remote-tracking branch 'Navid200/Navid_2024_01_05' into schubi
@@ -1731,6 +1732,12 @@ public boolean onPreferenceChange(Preference preference, Object newValue) { | |||
} | |||
} | |||
|
|||
if (getBestCollectorHardwareName().equals("G7")) { // Remove battery options, from G5/G6/Dex1/G7 Debug Settings, if we are using G7 or One+ |
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.
Really good idea to wrap this with a try{} catch{} pair and log at wtf level if an exception is generated, otherwise future changes to preferences structure can cause crashes.
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.
Sure, thanks. It will be done.
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.
Done
After the last edit of adding try, exception, the following is the extent of the tests I performed: On Android 8, selected Dex as hardware data source. Changed the number of characters back to 6. The battery option was still missing. Again, I needed to go to home screen and go to settings again and then, the battery option was gone. I don't think this is a problem. |
Thanks |
Since we don't want to offer the option to customize the battery warning level for G7, this PR removes the setting.
The title of the category has been updated to exclude G7.
It has been tested with G6 and G7.