From 536cff018ecf3a329ccf44f723bae071c840ab71 Mon Sep 17 00:00:00 2001 From: Sailesh Nepal Date: Fri, 4 Jul 2014 19:44:01 -0700 Subject: Remove references to CallService from Telephony Change-Id: I5a082e50dafea0104174cb97d3ae8af168944fc3 --- AndroidManifest.xml | 4 ++-- src/com/android/phone/CallFeaturesSetting.java | 2 +- .../android/services/telephony/ConferenceConnection.java | 13 +++++++------ .../android/services/telephony/GsmConferenceController.java | 4 +++- src/com/android/services/telephony/GsmConnection.java | 4 +--- .../services/telephony/PstnIncomingCallNotifier.java | 3 +-- src/com/android/services/telephony/SipConnection.java | 2 +- .../android/services/telephony/SipConnectionService.java | 2 +- .../services/telephony/TelephonyCallServiceProvider.java | 4 ++-- src/com/android/services/telephony/TelephonyConnection.java | 4 ++-- src/com/android/services/telephony/TelephonyGlobals.java | 2 +- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4feb64412..83f9f2046 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -555,7 +555,7 @@ android:name="com.android.services.telephony.PstnConnectionService" android:label="@string/pstn_connection_service_label"> - + - + children = getChildConnections(); - if (!children.isEmpty()) { - // Hold only needs to be called on one of the children. - children.get(0).hold(); + for (Connection connection : getChildConnections()) { + if (connection instanceof TelephonyConnection) { + ((TelephonyConnection) connection).onHold(); + // Hold only needs to be called on one of the children. + break; + } } } - } diff --git a/src/com/android/services/telephony/GsmConferenceController.java b/src/com/android/services/telephony/GsmConferenceController.java index 35b81d2d9..138aa8eb8 100644 --- a/src/com/android/services/telephony/GsmConferenceController.java +++ b/src/com/android/services/telephony/GsmConferenceController.java @@ -74,7 +74,9 @@ public class GsmConferenceController { mGsmConferenceConnection = new ConferenceConnection(); Log.d(this, "creating the conference connection: %s", mGsmConferenceConnection); } - rootConnection.conference(); + if (rootConnection instanceof GsmConnection) { + ((GsmConnection) rootConnection).performConference(); + } return mGsmConferenceConnection; } diff --git a/src/com/android/services/telephony/GsmConnection.java b/src/com/android/services/telephony/GsmConnection.java index 34ef27eb4..70190682b 100644 --- a/src/com/android/services/telephony/GsmConnection.java +++ b/src/com/android/services/telephony/GsmConnection.java @@ -43,9 +43,7 @@ public class GsmConnection extends PstnConnection { super.onStopDtmfTone(); } - /** {@inheritDoc} */ - @Override - public void onConference() { + public void performConference() { try { Log.d(this, "conference - %s", this); getPhone().conference(); diff --git a/src/com/android/services/telephony/PstnIncomingCallNotifier.java b/src/com/android/services/telephony/PstnIncomingCallNotifier.java index 9dffe505b..0d29ed929 100644 --- a/src/com/android/services/telephony/PstnIncomingCallNotifier.java +++ b/src/com/android/services/telephony/PstnIncomingCallNotifier.java @@ -24,7 +24,6 @@ import android.os.AsyncResult; import android.os.Handler; import android.os.Message; import android.os.UserHandle; -import android.telecomm.CallService; import android.telecomm.CallServiceDescriptor; import android.telecomm.TelecommConstants; @@ -156,7 +155,7 @@ final class PstnIncomingCallNotifier { Context context = mPhoneProxy.getContext(); CallServiceDescriptor.Builder builder = CallServiceDescriptor.newBuilder(context); - builder.setCallService(PstnConnectionService.class); + builder.setConnectionService(PstnConnectionService.class); builder.setNetworkType(CallServiceDescriptor.FLAG_PSTN); Intent intent = new Intent(TelecommConstants.ACTION_INCOMING_CALL); diff --git a/src/com/android/services/telephony/SipConnection.java b/src/com/android/services/telephony/SipConnection.java index 34d734a6f..133a42d05 100644 --- a/src/com/android/services/telephony/SipConnection.java +++ b/src/com/android/services/telephony/SipConnection.java @@ -55,7 +55,7 @@ public class SipConnection extends TelephonyConnection { /** {@inheritDoc} */ @Override - protected void onHold() { + public void onHold() { super.onHold(); } diff --git a/src/com/android/services/telephony/SipConnectionService.java b/src/com/android/services/telephony/SipConnectionService.java index 465dba1b1..ea364bd4f 100644 --- a/src/com/android/services/telephony/SipConnectionService.java +++ b/src/com/android/services/telephony/SipConnectionService.java @@ -39,7 +39,7 @@ import android.telecomm.Response; import java.util.HashMap; /** - * Call service that uses the SIP phone. + * Connection service that uses the SIP phone. */ public class SipConnectionService extends TelephonyConnectionService { private static HashMap sSipPhones = new HashMap(); diff --git a/src/com/android/services/telephony/TelephonyCallServiceProvider.java b/src/com/android/services/telephony/TelephonyCallServiceProvider.java index cc89c0eb7..12bb2afaf 100644 --- a/src/com/android/services/telephony/TelephonyCallServiceProvider.java +++ b/src/com/android/services/telephony/TelephonyCallServiceProvider.java @@ -31,11 +31,11 @@ public class TelephonyCallServiceProvider extends CallServiceProvider { public void lookupCallServices(CallServiceLookupResponse response) { ArrayList descriptors = new ArrayList(); descriptors.add(CallServiceDescriptor.newBuilder(this) - .setCallService(PstnConnectionService.class) + .setConnectionService(PstnConnectionService.class) .setNetworkType(CallServiceDescriptor.FLAG_PSTN) .build()); descriptors.add(CallServiceDescriptor.newBuilder(this) - .setCallService(SipConnectionService.class) + .setConnectionService(SipConnectionService.class) .setNetworkType(CallServiceDescriptor.FLAG_WIFI | CallServiceDescriptor.FLAG_MOBILE) .build()); diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java index f37934718..1cfabbb54 100644 --- a/src/com/android/services/telephony/TelephonyConnection.java +++ b/src/com/android/services/telephony/TelephonyConnection.java @@ -73,7 +73,7 @@ class TelephonyConnection extends Connection { } @Override - protected void onHold() { + public void onHold() { Log.d(this, "Attempting to put call on hold"); // TODO(santoscordon): Can dialing calls be put on hold as well since they take up the // foreground call slot? @@ -112,7 +112,7 @@ class TelephonyConnection extends Connection { Log.d(this, "Attempting to release call from hold"); if (Call.State.HOLDING == mState) { try { - // TODO: This doesn't handle multiple calls across call services yet + // TODO: This doesn't handle multiple calls across connection services yet mOriginalConnection.getCall().getPhone().switchHoldingAndActive(); } catch (CallStateException e) { Log.e(this, e, "Exception occurred while trying to release call from hold."); diff --git a/src/com/android/services/telephony/TelephonyGlobals.java b/src/com/android/services/telephony/TelephonyGlobals.java index 22346b750..59e0dd5bc 100644 --- a/src/com/android/services/telephony/TelephonyGlobals.java +++ b/src/com/android/services/telephony/TelephonyGlobals.java @@ -51,7 +51,7 @@ public class TelephonyGlobals { } /** - * Sets up incoming call notifiers for all the call services. + * Sets up incoming call notifiers for all the connection services. */ private void setupIncomingCallNotifiers() { PhoneProxy defaultPhone = (PhoneProxy) PhoneFactory.getDefaultPhone(); -- cgit v1.2.3