diff options
author | Jay Shrauner <shrauner@google.com> | 2015-04-03 11:08:54 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-04-03 11:08:54 -0700 |
commit | 009e4a14cd18247c6bbe2aac2d808acf250d549f (patch) | |
tree | c6bc221b4263e273faa22fe46e38647b86665db1 | |
parent | 568f5d0395721643cda6c68cb30a05d9002faf23 (diff) |
Fix NPE in handleAccountSelection
Null check mCallList
Bug:20064415
Change-Id: I4129eb4fcc8fe8b3eb2c719c544dec20ce51c56c
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallPresenter.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java index b98eadaa1..05a05a603 100644 --- a/InCallUI/src/com/android/incallui/InCallPresenter.java +++ b/InCallUI/src/com/android/incallui/InCallPresenter.java @@ -601,19 +601,23 @@ public class InCallPresenter implements CallList.Listener, InCallPhoneListener, } public void handleAccountSelection(PhoneAccountHandle accountHandle, boolean setDefault) { - Call call = mCallList.getWaitingForAccountCall(); - if (call != null) { - String callId = call.getId(); - TelecomAdapter.getInstance().phoneAccountSelected(callId, accountHandle, setDefault); + if (mCallList != null) { + Call call = mCallList.getWaitingForAccountCall(); + if (call != null) { + String callId = call.getId(); + TelecomAdapter.getInstance().phoneAccountSelected(callId, accountHandle, setDefault); + } } } public void cancelAccountSelection() { mAccountSelectionCancelled = true; - Call call = mCallList.getWaitingForAccountCall(); - if (call != null) { - String callId = call.getId(); - TelecomAdapter.getInstance().disconnectCall(callId); + if (mCallList != null) { + Call call = mCallList.getWaitingForAccountCall(); + if (call != null) { + String callId = call.getId(); + TelecomAdapter.getInstance().disconnectCall(callId); + } } } |