diff --git a/Android.mk b/Android.mk index f6ed4dadbebbe..091061e28328c 100644 --- a/Android.mk +++ b/Android.mk @@ -283,6 +283,7 @@ LOCAL_SRC_FILES += \ telecomm/java/android/telecomm/ICallServiceProvider.aidl \ telecomm/java/android/telecomm/ICallServiceSelectionResponse.aidl \ telecomm/java/android/telecomm/ICallServiceSelector.aidl \ + telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl \ telephony/java/com/android/internal/telephony/IPhoneStateListener.aidl \ telephony/java/com/android/internal/telephony/IPhoneSubInfo.aidl \ telephony/java/com/android/internal/telephony/ITelephony.aidl \ diff --git a/telecomm/java/android/telecomm/ICallServiceSelector.aidl b/telecomm/java/android/telecomm/ICallServiceSelector.aidl index db742ac8af48b..13a3f4cf60159 100644 --- a/telecomm/java/android/telecomm/ICallServiceSelector.aidl +++ b/telecomm/java/android/telecomm/ICallServiceSelector.aidl @@ -18,6 +18,7 @@ package android.telecomm; import android.telecomm.ICallService; import android.telecomm.ICallServiceSelectionResponse; +import android.telecomm.ICallSwitchabilityResponse; import java.util.List; @@ -83,13 +84,10 @@ oneway interface ICallServiceSelector { /** * Determines if the specified ongoing call can/should be switched from the currently-used * call service to another. - * TODO(gilad): Do we want to add a dedicated response type, introduce a generic one (and use - * it across the board), or eliminate this altogether (i.e. relying on "select" to return the - * empty set in the cases this would have returned false)? + * TODO(gilad): Pass a CallInfo instead that contains (among other fields) the callId. * * @param callId The identifier of the call to disconnect. - * TODO(gilad): Consider passing a reduced-visibility call object, e.g. using Call externally - * and PackagePrivateCall within Telecomm (where the latter can be wrapped by the former). + * @param response The response object to be populated and returned to switchboard. */ - void isSwitchable(String callId); + void isSwitchable(String callId, in ICallSwitchabilityResponse response); } diff --git a/telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl b/telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl new file mode 100644 index 0000000000000..628ad6b499a75 --- /dev/null +++ b/telecomm/java/android/telecomm/ICallSwitchabilityResponse.aidl @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.telecomm; + +/** + * Used by {@link ICallServiceSelector}s to return whether or not the relevant + * call is switchable. + * @hide + */ +oneway interface ICallSwitchabilityResponse { + /** + * Records whether or not the corresponding call can potentially be switched to another + * call service. + * + * @param isSwitchable True if the associated call-service selector may be interested + * in switching call services. Setting isSwitchable to true should generally + * guarantee the "select" API of the associated selector to be invoked, hence + * allowing the selector to return either the empty list (meaning pass, don't + * switch) or the prioritized list of call-services to attempt switching to. + */ + void setIsSwitchable(boolean isSwitchable); +}