diff options
Diffstat (limited to 'java/com/android/dialer/callintent')
-rw-r--r-- | java/com/android/dialer/callintent/CallIntentBuilder.java | 12 | ||||
-rw-r--r-- | java/com/android/dialer/callintent/call_specific_app_data.proto | 5 |
2 files changed, 16 insertions, 1 deletions
diff --git a/java/com/android/dialer/callintent/CallIntentBuilder.java b/java/com/android/dialer/callintent/CallIntentBuilder.java index 36ea907ff..87de0f0ec 100644 --- a/java/com/android/dialer/callintent/CallIntentBuilder.java +++ b/java/com/android/dialer/callintent/CallIntentBuilder.java @@ -28,6 +28,7 @@ import android.telecom.TelecomManager; import android.telecom.VideoProfile; import android.text.TextUtils; import com.android.dialer.common.Assert; +import com.android.dialer.compat.telephony.TelephonyManagerCompat; import com.android.dialer.performancereport.PerformanceReport; import com.android.dialer.util.CallUtil; @@ -38,6 +39,7 @@ public class CallIntentBuilder { @Nullable private PhoneAccountHandle phoneAccountHandle; private boolean isVideoCall; private String callSubject; + private boolean allowAssistedDial; private static int lightbringerButtonAppearInExpandedCallLogItemCount = 0; private static int lightbringerButtonAppearInCollapsedCallLogItemCount = 0; @@ -100,6 +102,11 @@ public class CallIntentBuilder { return this; } + public CallIntentBuilder setAllowAssistedDial(boolean allowAssistedDial) { + this.allowAssistedDial = allowAssistedDial; + return this; + } + public CallIntentBuilder setCallSubject(String callSubject) { this.callSubject = callSubject; return this; @@ -114,6 +121,11 @@ public class CallIntentBuilder { Bundle extras = new Bundle(); extras.putLong(Constants.EXTRA_CALL_CREATED_TIME_MILLIS, SystemClock.elapsedRealtime()); CallIntentParser.putCallSpecificAppData(extras, callSpecificAppData); + + if (allowAssistedDial) { + extras.putBoolean(TelephonyManagerCompat.ALLOW_ASSISTED_DIAL, true); + } + intent.putExtra(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, extras); if (phoneAccountHandle != null) { diff --git a/java/com/android/dialer/callintent/call_specific_app_data.proto b/java/com/android/dialer/callintent/call_specific_app_data.proto index 82547fa03..065a7aba7 100644 --- a/java/com/android/dialer/callintent/call_specific_app_data.proto +++ b/java/com/android/dialer/callintent/call_specific_app_data.proto @@ -14,7 +14,7 @@ import "java/com/android/dialer/logging/ui_action.proto"; // Miscellaneous data that's included in a new outgoing call initiated by // Dialer. The system will pass this data to the InCallUi which can use it // for logging or for something else. -// Next tag: 14 +// Next tag: 15 message CallSpecificAppData { optional CallInitiationType.Type call_initiation_type = 1; @@ -41,4 +41,7 @@ message CallSpecificAppData { optional int32 lightbringer_button_appear_in_collapsed_call_log_item_count = 12; optional int32 lightbringer_button_appear_in_search_count = 13; + + // Indicates that the call is open to modification from assisted dialing. + optional bool allow_assisted_dialing = 14; } |