diff options
author | Yorke Lee <yorkelee@google.com> | 2015-05-02 22:23:46 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-05-04 11:28:50 -0700 |
commit | 2da94192978b2992a2be996f4123edbd14fbf3ca (patch) | |
tree | 81ec90d785f271c8ab9ea0fa138cc42268e6ce64 /InCallUI/src/com | |
parent | 9d890271c083995c43e490a76555013bd6c5d15c (diff) |
Dynamically check for permission denials
Don't crash when performing certain operations that the
dialer might not have permissions to execute:
* Access voicemail provider
* Certain TelecomManager methods
Bug: 20266292
Change-Id: I6326332943567aab0c59b4b4386d7bc434a71e4a
Diffstat (limited to 'InCallUI/src/com')
-rw-r--r-- | InCallUI/src/com/android/incallui/AnswerPresenter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java index 04cc262fd..33cdba4c0 100644 --- a/InCallUI/src/com/android/incallui/AnswerPresenter.java +++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java @@ -18,6 +18,7 @@ package com.android.incallui; import android.content.Context; +import com.android.dialer.util.TelecomUtil; import com.android.incallui.InCallPresenter.InCallState; import android.telecom.TelecomManager; import android.telecom.VideoProfile; @@ -249,7 +250,7 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi> public void onText() { if (getUi() != null) { - InCallPresenter.getInstance().getTelecomManager().silenceRinger(); + TelecomUtil.silenceRinger(getUi().getContext()); getUi().showMessageDialog(); } } |