diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/incallui/AnswerPresenter.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/com/android/incallui/AnswerPresenter.java b/src/com/android/incallui/AnswerPresenter.java index 020d075d..d69d7c7d 100644 --- a/src/com/android/incallui/AnswerPresenter.java +++ b/src/com/android/incallui/AnswerPresenter.java @@ -446,6 +446,10 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> public void onDecline(Context context) { int phoneId = getActivePhoneId(); Log.d(this, "onDecline mCallId:" + mCallId + "phoneId:" + phoneId); + if (phoneId == -1) { + return; + } + if (mCall[phoneId].getSessionModificationState() == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST) { InCallPresenter.getInstance().declineUpgradeRequest(context); @@ -476,6 +480,10 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> public void onBlockDialogInitialize() { int phoneId = getActivePhoneId(); Log.d(this, "onBlock mCallId:" + mCallId + "phoneId:" + phoneId); + if (phoneId == -1) { + return; + } + Call call = mCall[phoneId]; final String number = call.getNumber(); final Context context = getUi().getContext(); @@ -517,7 +525,11 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> public void rejectCallWithMessage(String message) { int phoneId = getActivePhoneId(); - Log.i(this, "sendTextToDefaultActivity()...phoneId:" + phoneId); + Log.i(this, "rejectCallWithMessage phoneId:" + phoneId); + if (phoneId == -1) { + return; + } + TelecomAdapter.getInstance().rejectCall(mCall[phoneId].getId(), true, message); onDismissDialog(); |