Fix crash when clicking on notification on some devices
This commit is contained in:
parent
4dbea26ff8
commit
6be8df9ff8
3 changed files with 9 additions and 3 deletions
|
@ -189,8 +189,10 @@ public class ChatCreationFragment extends Fragment implements View.OnClickListen
|
|||
super.onResume();
|
||||
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (getActivity().getCurrentFocus() != null) {
|
||||
inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
|
|
@ -223,7 +223,9 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
|||
// Force hide keyboard
|
||||
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (getActivity().getCurrentFocus() != null) {
|
||||
inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
|
||||
initChatRoom();
|
||||
displayChatRoomHeader();
|
||||
|
|
|
@ -312,8 +312,10 @@ public class GroupInfoFragment extends Fragment implements ChatRoomListener {
|
|||
super.onResume();
|
||||
|
||||
InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(INPUT_METHOD_SERVICE);
|
||||
if (getActivity().getCurrentFocus() != null) {
|
||||
inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
|
|
Loading…
Reference in a new issue