summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-02-08 04:15:37 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-02-08 04:15:37 +0000
commit47a82ba91ff281a8afe975f03eba2acb9b1bb74c (patch)
tree96319dc32786402f99aead420e010de26c04a997
parent5fe96e196d70343e5a05515ab3fdc2df8ca56448 (diff)
parent9cba53cc254636805240f1e8a5d2fcb8fdecabb9 (diff)
downloadTelephony-oreo-mr1-cuttlefish-testing.tar.gz
Merge cherrypicks of [3581037, 3581038, 3580473, 3580624, 3580656, 3580657, 3580658, 3580382, 3580474, 3580475, 3581039, 3581040, 3580476, 3580206, 3581527, 3580955, 3580956, 3580957, 3580958, 3580959, 3580960, 3580961, 3580962, 3580963, 3580964, 3580965, 3580966, 3581567, 3581568, 3581569, 3581570, 3581571, 3580625, 3580626, 3581587, 3581513, 3581514, 3581515, 3580477, 3581588, 3580659, 3580660, 3580383, 3580384, 3580478, 3580719, 3580479, 3580480, 3581385, 3581528, 3581041, 3581042, 3581043, 3581044, 3581045, 3581046, 3581607, 3580385, 3580481, 3580482, 3580483, 3580661, 3580662, 3580663, 3580664, 3580665, 3580484, 3580485, 3581608, 3581609, 3581610, 3581611, 3581612, 3581589, 3581613, 3580486, 3581519, 3581627, 3581628, 3581529, 3581530, 3581531, 3581629, 3581630] into oc-mr1-releaseandroid-wear-8.1.0_r1android-8.1.0_r19oreo-mr1-wear-releaseoreo-mr1-releaseoreo-mr1-cuttlefish-testing
Change-Id: Iec536c2ef2fdf8df1f917edd5a40818f24bf1c06
-rw-r--r--src/com/android/services/telephony/TelephonyConnection.java16
-rw-r--r--src/com/android/services/telephony/TelephonyConnectionService.java6
2 files changed, 21 insertions, 1 deletions
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index d41a8f009..f63ac4c0e 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -501,6 +501,11 @@ abstract class TelephonyConnection extends Connection {
protected final boolean mIsOutgoing;
/**
+ * Indicates whether this call is using assisted dialing.
+ */
+ private boolean mIsUsingAssistedDialing;
+
+ /**
* Listeners to our TelephonyConnection specific callbacks
*/
private final Set<TelephonyConnectionListener> mTelephonyListeners = Collections.newSetFromMap(
@@ -802,6 +807,8 @@ abstract class TelephonyConnection extends Connection {
isExternalConnection());
newProperties = changeBitmask(newProperties, PROPERTY_HAS_CDMA_VOICE_PRIVACY,
mIsCdmaVoicePrivacyEnabled);
+ newProperties = changeBitmask(newProperties, PROPERTY_ASSISTED_DIALING_USED,
+ mIsUsingAssistedDialing);
if (getConnectionProperties() != newProperties) {
setConnectionProperties(newProperties);
@@ -1642,6 +1649,15 @@ abstract class TelephonyConnection extends Connection {
return mWasImsConnection;
}
+ boolean getIsUsingAssistedDialing() {
+ return mIsUsingAssistedDialing;
+ }
+
+ void setIsUsingAssistedDialing(Boolean isUsingAssistedDialing) {
+ mIsUsingAssistedDialing = isUsingAssistedDialing;
+ updateConnectionProperties();
+ }
+
private static Uri getAddressFromNumber(String number) {
// Address can be null for blocked calls.
if (number == null) {
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index ac3e50aec..464b836ae 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -440,7 +440,11 @@ public class TelephonyConnectionService extends ConnectionService {
isEmergencyNumber, handle, phone);
// If there was a failure, the resulting connection will not be a TelephonyConnection,
// so don't place the call!
- if(resultConnection instanceof TelephonyConnection) {
+ if (resultConnection instanceof TelephonyConnection) {
+ if (request.getExtras() != null && request.getExtras().getBoolean(
+ TelecomManager.EXTRA_USE_ASSISTED_DIALING, false)) {
+ ((TelephonyConnection) resultConnection).setIsUsingAssistedDialing(true);
+ }
placeOutgoingConnection((TelephonyConnection) resultConnection, phone, request);
}
return resultConnection;