1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-04 09:17:29 +01:00

Fixed bug on Preference Screen start

This commit is contained in:
Daniel Dakhno 2021-12-26 15:40:12 +01:00
parent a1f9fe82d2
commit cab9ab714a

View File

@ -938,6 +938,11 @@ public class DeviceSpecificSettingsFragment extends PreferenceFragmentCompat imp
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
LOG.debug("Preference changed: {}", key); LOG.debug("Preference changed: {}", key);
if(key == null){
LOG.warn("Preference null, ignoring");
return;
}
final Preference preference = findPreference(key); final Preference preference = findPreference(key);
if (preference == null) { if (preference == null) {
LOG.warn("Preference {} not found, ignoring", key); LOG.warn("Preference {} not found, ignoring", key);