From 62706c510cb4e2d811695a90b9a3b3cbf43a776e Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Wed, 6 Dec 2017 16:27:53 -0800 Subject: Add assisted dialing properties to the framework. This is a manual merge of the oc-mr1-dev change I086e761ada9a57dca61c3a412561ee54255d6260 These properties allow the feature to be propogated from the outgoing call broadcast, to the connection, to the call, and finally to the call log as a feature. Test: no existing unit tests found. could use some pointers Bug: 35963245 Change-Id: I84343fb0cda16514c01997fd71d1e819b5b7eebb --- core/java/android/provider/CallLog.java | 6 ++++++ telecomm/java/android/telecom/Call.java | 12 +++++++++++- telecomm/java/android/telecom/Connection.java | 8 +++++++- telecomm/java/android/telecom/TelecomManager.java | 8 ++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java index a8acb976a637..766ad8454e6f 100644 --- a/core/java/android/provider/CallLog.java +++ b/core/java/android/provider/CallLog.java @@ -223,6 +223,12 @@ public class CallLog { /** Call was WIFI call. */ public static final int FEATURES_WIFI = 0x8; + /** + * Indicates the call underwent Assisted Dialing. + * @hide + */ + public static final Integer FEATURES_ASSISTED_DIALING_USED = 0x10; + /** * The phone number as the user entered it. *

Type: TEXT

diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 16150ba5251f..20911012e6ba 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -416,8 +416,15 @@ public final class Call { */ public static final int PROPERTY_SELF_MANAGED = 0x00000100; + /** + * Indicates the call used Assisted Dialing. + * See also {@link Connection#PROPERTY_ASSISTED_DIALING_USED} + * @hide + */ + public static final int PROPERTY_ASSISTED_DIALING_USED = 0x00000200; + //****************************************************************************************** - // Next PROPERTY value: 0x00000200 + // Next PROPERTY value: 0x00000400 //****************************************************************************************** private final String mTelecomCallId; @@ -577,6 +584,9 @@ public final class Call { if(hasProperty(properties, PROPERTY_HAS_CDMA_VOICE_PRIVACY)) { builder.append(" PROPERTY_HAS_CDMA_VOICE_PRIVACY"); } + if(hasProperty(properties, PROPERTY_ASSISTED_DIALING_USED)) { + builder.append(" PROPERTY_ASSISTED_DIALING_USED"); + } builder.append("]"); return builder.toString(); } diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 3c32614815cb..aaef8d3d3856 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -399,8 +399,14 @@ public abstract class Connection extends Conferenceable { */ public static final int PROPERTY_IS_RTT = 1 << 8; + /** + * Set by the framework to indicate that a connection is using assisted dialing. + * @hide + */ + public static final int PROPERTY_ASSISTED_DIALING_USED = 1 << 9; + //********************************************************************************************** - // Next PROPERTY value: 1<<9 + // Next PROPERTY value: 1<<10 //********************************************************************************************** /** diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index 6dcc3da15882..15355ac745a4 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -589,6 +589,14 @@ public class TelecomManager { public static final ComponentName EMERGENCY_DIALER_COMPONENT = ComponentName.createRelative("com.android.phone", ".EmergencyDialer"); + /** + * The boolean indicated by this extra controls whether or not a call is eligible to undergo + * assisted dialing. This extra is stored under {@link #EXTRA_OUTGOING_CALL_EXTRAS}. + * @hide + */ + public static final String EXTRA_USE_ASSISTED_DIALING = + "android.telecom.extra.USE_ASSISTED_DIALING"; + /** * The following 4 constants define how properties such as phone numbers and names are * displayed to the user. -- cgit v1.2.3-59-g8ed1b