catch npe in setupIme method

This commit is contained in:
Daniel Gultsch 2015-09-07 13:31:24 +02:00
parent bf64276fa7
commit 88cdd03f0f
1 changed files with 3 additions and 1 deletions

View File

@ -348,7 +348,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
public void setupIme() {
if (activity.usingEnterKey() && activity.enterIsSend()) {
if (activity == null) {
return;
} else if (activity.usingEnterKey() && activity.enterIsSend()) {
mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_FLAG_MULTI_LINE));
mEditMessage.setInputType(mEditMessage.getInputType() & (~InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE));
} else if (activity.usingEnterKey()) {