diff options
author | calderwoodra <calderwoodra@google.com> | 2018-01-24 12:19:56 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-24 15:23:46 -0800 |
commit | a584bcd04d287e7771b0420156a1892a7962e4ff (patch) | |
tree | fba69be829c3a95cc98c821fd52d003966b380d1 /java | |
parent | 1f58ac19169a1a39e824ab3ea9826af135720df9 (diff) |
Fixed a regression where we incorrectly reported that the dialpad was visible.
A request was made to update the value of #isDialpadVisible, in the process a
regression was introduced that would cause #isDialpadVisible to return true
when the dialpad's root view was null. This caused a NPE when we tried to
animate it.
We should now return the correct value in the scenarios important to our
partners as well our users and animations.
Bug: 64657832,72384544
Test: manual/logging
PiperOrigin-RevId: 183122628
Change-Id: I981e944dbb003064163b8ec11883dbc5381cba0e
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/incallui/InCallActivity.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java index 990560674..535b894f6 100644 --- a/java/com/android/incallui/InCallActivity.java +++ b/java/com/android/incallui/InCallActivity.java @@ -822,7 +822,11 @@ public class InCallActivity extends TransactionSafeFragmentActivity public boolean isDialpadVisible() { DialpadFragment dialpadFragment = getDialpadFragment(); - return dialpadFragment != null && dialpadFragment.getUserVisibleHint(); + return dialpadFragment != null + && dialpadFragment.isAdded() + && !dialpadFragment.isHidden() + && dialpadFragment.getView() != null + && dialpadFragment.getUserVisibleHint(); } /** Returns the {@link DialpadFragment} that's shown by this activity, or {@code null} */ |