summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/callintent
diff options
context:
space:
mode:
authortwyen <twyen@google.com>2017-11-06 16:56:11 -0800
committerZachary Heidepriem <zachh@google.com>2017-11-11 12:17:36 -0800
commitc2ea695927a5866cea732ea784a8ee4473b8ba19 (patch)
tree01cbae62f8260a83cf1ff1643c00cd82af084de9 /java/com/android/dialer/callintent
parentfda5efd65523322261a8e51c4cd8f58a9b6fede5 (diff)
Unify voicemail call placing
All voicemails are called by using CallIntentBuilder.forVoicemail() so the PhoneAccountHandle can be designated. A future CL will use dialogs to customize the call (multi SIM selection, RTT, etc.) As a result voicemail error messages and legacy voicemail notifications will call the account it is received from directly. Bug: 64216442 Test: Unit tests PiperOrigin-RevId: 174784322 Change-Id: Ibe1c57bc7852e3d55a39a0cc2da19b6a79954c0f
Diffstat (limited to 'java/com/android/dialer/callintent')
-rw-r--r--java/com/android/dialer/callintent/CallIntentBuilder.java7
-rw-r--r--java/com/android/dialer/callintent/call_initiation_type.proto4
2 files changed, 11 insertions, 0 deletions
diff --git a/java/com/android/dialer/callintent/CallIntentBuilder.java b/java/com/android/dialer/callintent/CallIntentBuilder.java
index 2bbd124fb..25a5803dc 100644
--- a/java/com/android/dialer/callintent/CallIntentBuilder.java
+++ b/java/com/android/dialer/callintent/CallIntentBuilder.java
@@ -96,6 +96,13 @@ public class CallIntentBuilder {
this(CallUtil.getCallUri(Assert.isNotNull(number)), callInitiationType);
}
+ public static CallIntentBuilder forVoicemail(
+ @Nullable PhoneAccountHandle phoneAccountHandle, CallInitiationType.Type callInitiationType) {
+ return new CallIntentBuilder(
+ Uri.fromParts(PhoneAccount.SCHEME_VOICEMAIL, "", null), callInitiationType)
+ .setPhoneAccountHandle(phoneAccountHandle);
+ }
+
public CallSpecificAppData getCallSpecificAppData() {
return callSpecificAppData;
}
diff --git a/java/com/android/dialer/callintent/call_initiation_type.proto b/java/com/android/dialer/callintent/call_initiation_type.proto
index 32e4e49fc..27d446119 100644
--- a/java/com/android/dialer/callintent/call_initiation_type.proto
+++ b/java/com/android/dialer/callintent/call_initiation_type.proto
@@ -60,5 +60,9 @@ message CallInitiationType {
CALL_SUBJECT_DIALOG = 16;
IMS_VIDEO_BLOCKED_FALLBACK_TO_VOICE = 17;
+
+ LEGACY_VOICEMAIL_NOTIFICATION = 18;
+
+ VOICEMAIL_ERROR_MESSAGE = 19;
}
}