mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 14:45:08 +00:00
Add null check before using RemoteKeyboardService.instance.visible
This commit is contained in:
committed by
Nicolas Fella
parent
7ad78d95c4
commit
fd29755cf1
@@ -131,7 +131,8 @@ public class RemoteKeyboardPlugin extends Plugin implements SharedPreferences.On
|
|||||||
PreferenceManager.getDefaultSharedPreferences(context).registerOnSharedPreferenceChangeListener(this);
|
PreferenceManager.getDefaultSharedPreferences(context).registerOnSharedPreferenceChangeListener(this);
|
||||||
|
|
||||||
final boolean editingOnly = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.remotekeyboard_editing_only), true);
|
final boolean editingOnly = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.remotekeyboard_editing_only), true);
|
||||||
notifyKeyboardState(editingOnly ? RemoteKeyboardService.instance.visible : true);
|
if (RemoteKeyboardService.instance != null)
|
||||||
|
notifyKeyboardState(editingOnly ? RemoteKeyboardService.instance.visible : true);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user