diff options
author | calderwoodra <calderwoodra@google.com> | 2017-07-31 16:18:50 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-01 08:41:50 -0700 |
commit | f4a53a42d1dfc994b3480cbacba9d9dac8b39295 (patch) | |
tree | 9f93fbcc408d128622598ddf0bfaf50d94c71b9e /java | |
parent | eeed13831def91d557d10e2c8c84521b20e9271f (diff) |
Pressing the ime action button with no text no longer crashes PostCallActivity.
Bug: 64172993
Test: manual
PiperOrigin-RevId: 163764485
Change-Id: Id66bc075e98cae0bcdb42e1ad82b403e7e0ae0d1
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/widget/MessageFragment.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/java/com/android/dialer/widget/MessageFragment.java b/java/com/android/dialer/widget/MessageFragment.java index 615ad3b77..7a0fcfd0f 100644 --- a/java/com/android/dialer/widget/MessageFragment.java +++ b/java/com/android/dialer/widget/MessageFragment.java @@ -134,10 +134,9 @@ public class MessageFragment extends Fragment @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { - if (getMessage() == null) { - return false; + if (!TextUtils.isEmpty(getMessage())) { + getListener().onMessageFragmentSendMessage(getMessage()); } - getListener().onMessageFragmentSendMessage(getMessage()); return true; } |