Commit 52ead0a0 authored by Mygod's avatar Mygod

Fix NullPointerException in NumberPickerPreferenceDialogFragment

parent 7d099b1f
...@@ -30,7 +30,8 @@ class NumberPickerPreferenceDialogFragment extends PreferenceDialogFragment { ...@@ -30,7 +30,8 @@ class NumberPickerPreferenceDialogFragment extends PreferenceDialogFragment {
val value = picker.getValue val value = picker.getValue
if (preference.callChangeListener(value)) preference.setValue(value) if (preference.callChangeListener(value)) preference.setValue(value)
} }
inputMethodManager.hideSoftInputFromWindow(getActivity.getCurrentFocus.getWindowToken, val focus = getActivity.getCurrentFocus
InputMethodManager.HIDE_NOT_ALWAYS) if (focus != null)
inputMethodManager.hideSoftInputFromWindow(focus.getWindowToken, InputMethodManager.HIDE_NOT_ALWAYS)
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment