diff options
author | Jay Shrauner <shrauner@google.com> | 2015-03-23 16:21:11 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-03-25 12:35:47 -0700 |
commit | d274e92414988c72708af270e3799b83b4e3b40c (patch) | |
tree | 22e13cde109c336a63de34db640a44ad64ebb74e /InCallUI/src | |
parent | fd0b577edffa5413adfda1503038a3bff3247106 (diff) |
Fix NPE in endCallClicked
Save the call id before setting disconnect state in case a state change
callback causes the primary call object to be cleared.
Bug:19893538
Change-Id: Ib6583bfb25023bf514ee073e4970b18844d8561b
Diffstat (limited to 'InCallUI/src')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCardPresenter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java index 647cdfdff..690e2470d 100644 --- a/InCallUI/src/com/android/incallui/CallCardPresenter.java +++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java @@ -695,9 +695,10 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi> } Log.i(this, "Disconnecting call: " + mPrimary); + final String callId = mPrimary.getId(); mPrimary.setState(Call.State.DISCONNECTING); CallList.getInstance().onUpdate(mPrimary); - TelecomAdapter.getInstance().disconnectCall(mPrimary.getId()); + TelecomAdapter.getInstance().disconnectCall(callId); } private String getNumberFromHandle(Uri handle) { |