summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/CallButtonPresenter.java
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-10-13 17:45:27 -0700
committerNancy Chen <nancychen@google.com>2014-10-16 14:04:32 -0700
commit49243b1425c0de41ce86685208192c4f93789b05 (patch)
treeb124f44e9defebfbaaa9d422f12c3e7d1d394d58 /InCallUI/src/com/android/incallui/CallButtonPresenter.java
parenta40e32c8253f16d954d3dce3986abc62a7b45748 (diff)
Use the phone account when checking if a number is a voicemail number.
Currently when checking if a number is a voicemail number, we are checking it against the voicemail number of the default phone account, which results in a non-default voicemail number incorrectly being identified as a regular phone number. Bug: 17925501 Change-Id: Id73ff399467e2446a58c58e6211d1ec1d1f20b30
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallButtonPresenter.java')
-rw-r--r--InCallUI/src/com/android/incallui/CallButtonPresenter.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
index ca4eb8838..0d7d88fcf 100644
--- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.telecom.AudioState;
import android.telecom.InCallService.VideoCall;
import android.telecom.PhoneCapabilities;
+import android.telecom.TelecomManager;
import android.telecom.VideoProfile;
@@ -83,9 +84,10 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto
// OUTGOING. We may want to do that once we start showing "Voice mail" label on
// the dialpad too.)
if (ui != null) {
- if (oldState == InCallState.OUTGOING && mCall != null
- && PhoneNumberUtils.isVoiceMailNumber(mCall.getNumber())) {
- ui.displayDialpad(true /* show */, true /* animate */);
+ if (oldState == InCallState.OUTGOING && mCall != null) {
+ if (CallerInfoUtils.isVoiceMailNumber(ui.getContext(), mCall)) {
+ ui.displayDialpad(true /* show */, true /* animate */);
+ }
}
}
} else if (newState == InCallState.INCOMING) {