summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Shrauner <shrauner@google.com>2015-08-03 16:57:32 -0700
committerJay Shrauner <shrauner@google.com>2015-08-03 17:03:22 -0700
commit07364d6aade5e05a403d16a3b366085bdb2710a0 (patch)
treec492a8989976778ad80738a0f94a68ad99acc212
parent7632fdfb271be341f9300888721cf410e5409161 (diff)
Fix NPE in onDetailsChanged
Bug:22925987 Change-Id: I20ad0ea5e40342805a2004654e6b78f420c33873
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index 4fc60cac8..29cdd4ddc 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -124,7 +124,8 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
*/
@Override
public void onDetailsChanged(Call call, android.telecom.Call.Details details) {
- if (getUi() != null && Objects.equals(call, mCall)) {
+ // Only update if the changes are for the currently active call
+ if (getUi() != null && call != null && call.equals(mCall)) {
updateButtonsState(call);
}
}