diff options
author | Sailesh Nepal <sail@google.com> | 2014-07-08 04:17:05 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-07-06 02:28:07 +0000 |
commit | a77a09137fc782585133605de773d3d19aeae516 (patch) | |
tree | 3076f62b003f1dcb9ee177ff23747940c6230769 | |
parent | f1df9014c3b8f4eb5b67381a24b50a7ec5682ffb (diff) | |
parent | 536cff018ecf3a329ccf44f723bae071c840ab71 (diff) | |
download | android_packages_services_Telephony-a77a09137fc782585133605de773d3d19aeae516.tar.gz android_packages_services_Telephony-a77a09137fc782585133605de773d3d19aeae516.tar.bz2 android_packages_services_Telephony-a77a09137fc782585133605de773d3d19aeae516.zip |
Merge "Remove references to CallService from Telephony"
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"> <intent-filter> - <action android:name="android.telecomm.CallService" /> + <action android:name="android.telecomm.ConnectionService" /> </intent-filter> </service> <service @@ -563,7 +563,7 @@ android:name="com.android.services.telephony.SipConnectionService" android:label="@string/sip_connection_service_label"> <intent-filter> - <action android:name="android.telecomm.CallService" /> + <action android:name="android.telecomm.ConnectionService" /> </intent-filter> </service> <provider diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java index a961968a5..cec266d1d 100644 --- a/src/com/android/phone/CallFeaturesSetting.java +++ b/src/com/android/phone/CallFeaturesSetting.java @@ -2250,7 +2250,7 @@ public class CallFeaturesSetting extends PreferenceActivity } private void loadConnectionServiceEntries() { - Intent intent = new Intent(TelecommConstants.ACTION_CALL_SERVICE); + Intent intent = new Intent(TelecommConstants.ACTION_CONNECTION_SERVICE); for (ResolveInfo entry : getPackageManager().queryIntentServices(intent, 0)) { ServiceInfo serviceInfo = entry.serviceInfo; if (serviceInfo != null) { diff --git a/src/com/android/services/telephony/ConferenceConnection.java b/src/com/android/services/telephony/ConferenceConnection.java index 43095b16d..3d62f6afd 100644 --- a/src/com/android/services/telephony/ConferenceConnection.java +++ b/src/com/android/services/telephony/ConferenceConnection.java @@ -48,7 +48,7 @@ class ConferenceConnection extends Connection { if (origConnection != null && origConnection.getCall() != null) { try { // getCall() returns what is the parent call of all conferenced conections - // so we only need ot call hangup on the main call object. Break once we've + // so we only need to call hangup on the main call object. Break once we've // done that. origConnection.getCall().hangup(); break; @@ -63,11 +63,12 @@ class ConferenceConnection extends Connection { /** ${inheritDoc} */ @Override protected void onHold() { - List<Connection> 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<String, SipPhone> sSipPhones = new HashMap<String, SipPhone>(); 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<CallServiceDescriptor> descriptors = new ArrayList<CallServiceDescriptor>(); 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(); |