diff options
author | calderwoodra <calderwoodra@google.com> | 2017-08-08 17:54:45 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-08-09 17:33:03 -0700 |
commit | 2ca58edc4563daa8ba4d267b6c94a9b9ad481507 (patch) | |
tree | afaf352f9d31c2ec6e7ec6af702ec9815084ad48 | |
parent | 25470938dc7d1ffd05a5b5f529760ad7c294aa63 (diff) |
Fixed crash with decline with SMS.
If a user declined a call with SMS while the answer fragment wasn't attached,
they would get a crash. This change checks to see if the fragment has been
attached or detached before attempting to show the menu. This crash was added
by cl/154094855 which fixed another issue that had been around since v6.
Bug: 64380468
Test: none
PiperOrigin-RevId: 164670788
Change-Id: I37f9c28ab0bb24da630f7f7897ecff55ae859837
-rw-r--r-- | java/com/android/incallui/answer/impl/AnswerFragment.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/incallui/answer/impl/AnswerFragment.java b/java/com/android/incallui/answer/impl/AnswerFragment.java index b5dd1175b..db6d43d49 100644 --- a/java/com/android/incallui/answer/impl/AnswerFragment.java +++ b/java/com/android/incallui/answer/impl/AnswerFragment.java @@ -954,7 +954,7 @@ public class AnswerFragment extends Fragment private void showMessageMenu() { LogUtil.i("AnswerFragment.showMessageMenu", "Show sms menu."); - if (getChildFragmentManager().isDestroyed()) { + if (getContext() == null || isDetached() || getChildFragmentManager().isDestroyed()) { return; } |