summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2014-11-14 00:03:35 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-14 00:03:35 +0000
commit82e55d6d731446293eb4b3ac77a20e9ccadbf67f (patch)
tree05d70582f1e3af2111c6d1b98a5d81efad8f2176 /InCallUI
parent7f8f9dd93de4ec6026755568e793a9c4e3ed6548 (diff)
parent6cce546dd301d747e2837468729c71a63823ca8b (diff)
am b2060d8c: am cbaa95b6: Add Null check for CanAddCall.
* commit 'b2060d8c6d3207acfc2b7b01ed9e665fb891e8b9': Add Null check for CanAddCall.
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java9
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());
}
}