Add assisted dialing feature propogation to call log.

Adds the mapping between the connection property and the call feature.

Test: None.

Unfortunately there doesn't look like a good way to stub
connection properties.

Bug: 35963245
Merged-In: I078a4cdcdce0455dbdbf825c89008b24bbb1b22b
Change-Id: I7db23c82754862bbcb44e636cd69d7b00022c0c3
(cherry picked from commit ae4cd3df758ac157a7d59001feea5930f575fe6e)
diff --git a/src/com/android/server/telecom/CallLogManager.java b/src/com/android/server/telecom/CallLogManager.java
index ba03e5c..01b0de8 100755
--- a/src/com/android/server/telecom/CallLogManager.java
+++ b/src/com/android/server/telecom/CallLogManager.java
@@ -27,6 +27,7 @@
 import android.os.UserHandle;
 import android.os.PersistableBundle;
 import android.provider.CallLog.Calls;
+import android.telecom.Connection;
 import android.telecom.DisconnectCause;
 import android.telecom.Log;
 import android.telecom.PhoneAccount;
@@ -226,7 +227,9 @@
                 call.getCallDataUsage();
 
         int callFeatures = getCallFeatures(call.getVideoStateHistory(),
-                call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED);
+                call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED,
+                (call.getConnectionProperties() & Connection.PROPERTY_ASSISTED_DIALING_USED) ==
+                        Connection.PROPERTY_ASSISTED_DIALING_USED);
         logCall(call.getCallerInfo(), logNumber, call.getPostDialDigits(), formattedViaNumber,
                 call.getHandlePresentation(), callLogType, callFeatures, accountHandle,
                 creationTime, age, callDataUsage, call.isEmergencyCall(), call.getInitiatingUser(),
@@ -303,7 +306,8 @@
      * @param isPulledCall {@code true} if this call was pulled to another device.
      * @return The call features.
      */
-    private static int getCallFeatures(int videoState, boolean isPulledCall) {
+    private static int getCallFeatures(int videoState, boolean isPulledCall,
+                                       boolean isUsingAssistedDialing) {
         int features = 0;
         if (VideoProfile.isVideo(videoState)) {
             features |= Calls.FEATURES_VIDEO;
@@ -311,6 +315,9 @@
         if (isPulledCall) {
             features |= Calls.FEATURES_PULLED_EXTERNALLY;
         }
+        if (isUsingAssistedDialing) {
+            features |= Calls.FEATURES_ASSISTED_DIALING_USED;
+        }
         return features;
     }
 
diff --git a/src/com/android/server/telecom/ParcelableCallUtils.java b/src/com/android/server/telecom/ParcelableCallUtils.java
index 07be216..527e8e6 100644
--- a/src/com/android/server/telecom/ParcelableCallUtils.java
+++ b/src/com/android/server/telecom/ParcelableCallUtils.java
@@ -336,7 +336,10 @@
         android.telecom.Call.Details.PROPERTY_HAS_CDMA_VOICE_PRIVACY,
 
         Connection.PROPERTY_SELF_MANAGED,
-        android.telecom.Call.Details.PROPERTY_SELF_MANAGED
+        android.telecom.Call.Details.PROPERTY_SELF_MANAGED,
+
+        Connection.PROPERTY_ASSISTED_DIALING_USED,
+        android.telecom.Call.Details.PROPERTY_ASSISTED_DIALING_USED
     };
 
     private static int convertConnectionToCallProperties(int connectionProperties) {