1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

Discovery: prevent crash on long tap when a device has no device specific settings

This commit is contained in:
Andreas Shimokawa 2022-07-10 19:29:43 +02:00
parent 7cf7d615a6
commit 6ce62008dd

View File

@ -951,6 +951,10 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
*/
private void reloadPreferences(final SharedPreferences sharedPreferences, final PreferenceGroup preferenceGroup) {
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
if (preferenceGroup == null) {
return;
}
final Preference preference = preferenceGroup.getPreference(i);
LOG.debug("Reloading {}", preference.getKey());