Following up on our discussion offline to introduce response objects for isSwitchable.

Change-Id: Ic1385d9b67ed0a859128845574d48ad90d6152a2
This commit is contained in:
Ben Gilad
2014-01-15 13:58:57 -08:00
committed by Evan Charlton
parent 2e412075ba
commit f042a3f067
3 changed files with 41 additions and 6 deletions

View File

@@ -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 \

View File

@@ -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);
}

View File

@@ -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);
}