diff options
author | Santos Cordon <santoscordon@google.com> | 2014-11-14 19:17:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-14 19:17:22 +0000 |
commit | 0c4975f35105e6fa3ee366e1e264af2d64bde7fd (patch) | |
tree | a8a6a53e7051f0da5bb9687f3467754f5bcdcbbb | |
parent | 0056ec78ab478ce0c7f8d0d7ffec3afe80dfef56 (diff) | |
parent | 82e55d6d731446293eb4b3ac77a20e9ccadbf67f (diff) |
am 7dfe2ab5: am b2060d8c: am cbaa95b6: Add Null check for CanAddCall.
* commit '7dfe2ab5b5de726f6dd93547b2356a8083796e5a':
Add Null check for CanAddCall.
-rw-r--r-- | InCallUI/src/com/android/incallui/CallButtonPresenter.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index 35410261d..8c3829403 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -114,12 +114,9 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto */ @Override public void onDetailsChanged(Call call, android.telecom.Call.Details details) { - // If the details change is not for the currently active call no update is required. - if (!Objects.equals(call, mCall)) { - return; + if (getUi() != null && Objects.equals(call, mCall)) { + updateCallButtons(call, getUi().getContext()); } - - updateCallButtons(call, getUi().getContext()); } @Override @@ -129,7 +126,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto @Override public void onCanAddCallChanged(boolean canAddCall) { - if (mCall != null) { + if (getUi() != null && mCall != null) { updateCallButtons(mCall, getUi().getContext()); } } |