mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-25 16:50:44 +02:00
Fix crash when device has no device specific settings
This commit is contained in:
parent
b138c54b52
commit
03db850b3e
@ -950,11 +950,11 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
|
|||||||
* @param preferenceGroup the {@link PreferenceGroup} for which preferences will be reloaded
|
* @param preferenceGroup the {@link PreferenceGroup} for which preferences will be reloaded
|
||||||
*/
|
*/
|
||||||
private void reloadPreferences(final SharedPreferences sharedPreferences, final PreferenceGroup preferenceGroup) {
|
private void reloadPreferences(final SharedPreferences sharedPreferences, final PreferenceGroup preferenceGroup) {
|
||||||
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
|
|
||||||
if (preferenceGroup == null) {
|
if (preferenceGroup == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < preferenceGroup.getPreferenceCount(); i++) {
|
||||||
final Preference preference = preferenceGroup.getPreference(i);
|
final Preference preference = preferenceGroup.getPreference(i);
|
||||||
|
|
||||||
LOG.debug("Reloading {}", preference.getKey());
|
LOG.debug("Reloading {}", preference.getKey());
|
||||||
|
Loading…
Reference in New Issue
Block a user