mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-07 01:25:09 +00:00
Hopefully fix some NPE crashes
This commit is contained in:
@@ -414,7 +414,8 @@ public class RemoteKeyboardPlugin extends Plugin implements SharedPreferences.On
|
||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
if (key.equals(context.getString(R.string.remotekeyboard_editing_only))) {
|
||||
final boolean editingOnly = sharedPreferences.getBoolean(context.getString(R.string.remotekeyboard_editing_only), true);
|
||||
notifyKeyboardState(editingOnly ? RemoteKeyboardService.instance.visible : true);
|
||||
final boolean visible = RemoteKeyboardService.instance != null && RemoteKeyboardService.instance.visible;
|
||||
notifyKeyboardState(!editingOnly || visible);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user