diff options
author | Ben Gilad <gilad@google.com> | 2013-12-12 18:40:03 -0800 |
---|---|---|
committer | Evan Charlton <evanc@google.com> | 2014-02-20 15:12:43 -0800 |
commit | d13e1d2babf9e3d14d3fe661c7c701b3b18b3eca (patch) | |
tree | 4b6a7e2940f05060998b76a2bdc97783c9497cdb /telephony | |
parent | 09538ebd04b83abad2fac8ccc9845aa0c2a4f62c (diff) | |
download | frameworks_base-d13e1d2babf9e3d14d3fe661c7c701b3b18b3eca.zip frameworks_base-d13e1d2babf9e3d14d3fe661c7c701b3b18b3eca.tar.gz frameworks_base-d13e1d2babf9e3d14d3fe661c7c701b3b18b3eca.tar.bz2 |
Remove the telecomm entries now that we have https://googleplex-android-review.git.corp.google.com/#/c/398927
DO NOT SUBMIT until the above CL is uploaded.
Change-Id: I4e4f19175b502ba81c882d1379d1d225b0e6ba67
Diffstat (limited to 'telephony')
5 files changed, 0 insertions, 383 deletions
diff --git a/telephony/java/android/telephony/CallService.java b/telephony/java/android/telephony/CallService.java deleted file mode 100644 index 0ea55b2..0000000 --- a/telephony/java/android/telephony/CallService.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2013 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.telephony; - -import android.app.Service; -import android.content.Intent; -import android.os.Handler; -import android.os.IBinder; -import android.os.Message; - -import com.android.internal.telephony.ICallService; -import com.android.internal.telephony.ICallServiceAdapter; - -/** - * Base implementation of CallService which can be used to provide calls for the system - * in-call UI. CallService is a one-way service from the framework's CallsManager to any app - * that would like to provide calls managed by the default system in-call user interface. - * When the service is bound by the framework, CallsManager will call setCallServiceAdapter - * which will provide CallService with an instance of {@link CallServiceAdapter} to be used - * for communicating back to CallsManager. Subsequently, more specific methods of the service - * will be called to perform various call actions including making an outgoing call and - * disconnected existing calls. - * TODO(santoscordon): Needs more about AndroidManifest.xml service registrations before - * we can unhide this API. - * - * Most public methods of this function are backed by a one-way AIDL interface which precludes - * syncronous responses. As a result, most responses are handled by (or have TODOs to handle) - * response objects instead of return values. - * TODO(santoscordon): Improve paragraph above once the final design is in place. - * @hide - */ -public abstract class CallService extends Service { - - /** - * Default Handler used to consolidate binder method calls onto a single thread. - */ - private final class CallServiceMessageHandler extends Handler { - @Override - public void handleMessage(Message msg) { - switch (msg.what) { - case MSG_SET_CALL_SERVICE_ADAPTER: - setCallServiceAdapter((ICallServiceAdapter) msg.obj); - break; - case MSG_IS_COMPATIBLE_WITH: - isCompatibleWith((String) msg.obj); - break; - case MSG_CALL: - call((String) msg.obj); - break; - case MSG_DISCONNECT: - disconnect((String) msg.obj); - break; - default: - break; - } - } - } - - /** - * Default ICallService implementation provided to CallsManager via {@link #onBind}. - */ - private final class CallServiceWrapper extends ICallService.Stub { - @Override - public void setCallServiceAdapter(ICallServiceAdapter callServiceAdapter) { - mMessageHandler.obtainMessage(MSG_SET_CALL_SERVICE_ADAPTER, callServiceAdapter) - .sendToTarget(); - } - - @Override - public void isCompatibleWith(String handle) { - mMessageHandler.obtainMessage(MSG_IS_COMPATIBLE_WITH, handle).sendToTarget(); - } - - @Override - public void call(String handle) { - mMessageHandler.obtainMessage(MSG_CALL, handle).sendToTarget(); - } - - @Override - public void disconnect(String callId) { - mMessageHandler.obtainMessage(MSG_DISCONNECT, callId).sendToTarget(); - } - } - - // Only used internally by this class. - // Binder method calls on this service can occur on multiple threads. These messages are used - // in conjunction with {@link #mMessageHandler} to ensure that all callbacks are handled on a - // single thread. Keeping it on a single thread allows CallService implementations to avoid - // needing multi-threaded code in their own callback routines. - private static final int - MSG_SET_CALL_SERVICE_ADAPTER = 1, - MSG_IS_COMPATIBLE_WITH = 2, - MSG_CALL = 3, - MSG_DISCONNECT = 4; - - /** - * Message handler for consolidating binder callbacks onto a single thread. - * See {@link #CallServiceMessageHandler}. - */ - private final CallServiceMessageHandler mMessageHandler; - - /** - * Default binder implementation of {@link ICallService} interface. - */ - private final CallServiceWrapper mBinder; - - /** - * Protected constructor called only by subclasses creates the binder interface and - * single-threaded message handler. - */ - protected CallService() { - mMessageHandler = new CallServiceMessageHandler(); - mBinder = new CallServiceWrapper(); - } - - /** {@inheritDoc} */ - public IBinder onBind(Intent intent) { - return mBinder; - } - - /** - * Sets an implementation of ICallServiceAdapter for adding new calls and communicating state - * changes of existing calls. - * @param callServiceAdapter Adapter object for communicating call to CallsManager - * TODO(santoscordon): Should we not reference ICallServiceAdapter directly from here? Should we - * wrap that in a wrapper like we do for CallService/ICallService? - * TODO(santoscordon): Consider rename of CallServiceAdapter to CallsManager. - */ - public abstract void setCallServiceAdapter(ICallServiceAdapter callServiceAdapter); - - /** - * Determines if the CallService can make calls to the handle. - * @param handle The handle to test for compatibility. - * TODO(santoscordon): Need response parameter. - */ - public abstract void isCompatibleWith(String handle); - - /** - * Calls the specified handle. Handle type is dynamically extensible and can be a phone number, - * a SIP address, or other types. Only called if {@link #isCompatibleWith} returns true for the - * same handle and this service is selected by the switchboard to handle the call. - * @param handle The handle to call. - */ - public abstract void call(String handle); - - /** - * Disconnects the specified call. - * @param callId The ID of the call to disconnect. - */ - public abstract void disconnect(String callId); -} diff --git a/telephony/java/com/android/internal/telephony/CallInfo.aidl b/telephony/java/com/android/internal/telephony/CallInfo.aidl deleted file mode 100644 index 9140388..0000000 --- a/telephony/java/com/android/internal/telephony/CallInfo.aidl +++ /dev/null @@ -1,19 +0,0 @@ -/* -** Copyright 2013, 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 com.android.internal.telephony; - -parcelable CallInfo; diff --git a/telephony/java/com/android/internal/telephony/CallInfo.java b/telephony/java/com/android/internal/telephony/CallInfo.java deleted file mode 100644 index 6bfc9d7..0000000 --- a/telephony/java/com/android/internal/telephony/CallInfo.java +++ /dev/null @@ -1,77 +0,0 @@ -/* -** Copyright 2013, 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 com.android.internal.telephony; - -import android.os.Parcel; -import android.os.Parcelable; - -/** - * A parcelable holder class of Call information data. - */ -public class CallInfo implements Parcelable { - - /** - * Endpoint to which the call is connected. - * This could be the dialed value for outgoing calls or the caller id of incoming calls. - */ - private String handle; - - public CallInfo(String handle) { - this.handle = handle; - } - - public String getHandle() { - return handle; - } - - // - // Parcelling related code below here. - // - - /** - * Responsible for creating CallInfo objects for deserialized Parcels. - */ - public static final Parcelable.Creator<CallInfo> CREATOR - = new Parcelable.Creator<CallInfo> () { - - @Override - public CallInfo createFromParcel(Parcel source) { - return new CallInfo(source.readString()); - } - - @Override - public CallInfo[] newArray(int size) { - return new CallInfo[size]; - } - }; - - /** - * {@inheritDoc} - */ - @Override - public int describeContents() { - return 0; - } - - /** - * Writes CallInfo object into a serializeable Parcel. - */ - @Override - public void writeToParcel(Parcel destination, int flags) { - destination.writeString(handle); - } -} diff --git a/telephony/java/com/android/internal/telephony/ICallService.aidl b/telephony/java/com/android/internal/telephony/ICallService.aidl deleted file mode 100644 index cb9b2e8..0000000 --- a/telephony/java/com/android/internal/telephony/ICallService.aidl +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2013 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 com.android.internal.telephony; - -import com.android.internal.telephony.ICallServiceAdapter; - -/** - * Service interface for services which would like to provide calls to be - * managed by the system in-call UI. - * - * This interface provides methods that the android framework can use to deliver commands - * for calls provided by this call service including making new calls and disconnecting - * existing ones. A binding to ICallService implementations exists for two conditions: - * 1) There exists one or more live calls for that call service, - * 2) Prior to an outbound call to test if this call service is compatible with the outgoing call. - */ -oneway interface ICallService { - - /** - * Determines if the CallService can make calls to the handle. - * TODO(santoscordon): Move this method into its own service interface long term. - * TODO(santoscordon): Add response callback parameter. - */ - void isCompatibleWith(String handle); - - /** - * Attempts to call the relevant party using the specified handle, be it a phone number, - * SIP address, or some other kind of user ID. Note that the set of handle types is - * dynamically extensible since call providers should be able to implement arbitrary - * handle-calling systems. See {@link #isCompatibleWith}. - * TODO(santoscordon): Should this have a response attached to it to ensure that the call - * service actually plans to make the call? - */ - void call(String handle); - - /** - * Disconnects the call identified by callId. - */ - void disconnect(String callId); - - /** - * Sets an implementation of ICallServiceAdapter which the call service can use to add new calls - * and communicate state changes of existing calls. This is the first method that is called - * after a the framework binds to the call service. - */ - void setCallServiceAdapter(ICallServiceAdapter callServiceAdapter); -} diff --git a/telephony/java/com/android/internal/telephony/ICallServiceAdapter.aidl b/telephony/java/com/android/internal/telephony/ICallServiceAdapter.aidl deleted file mode 100644 index bc900f0..0000000 --- a/telephony/java/com/android/internal/telephony/ICallServiceAdapter.aidl +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2013 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 com.android.internal.telephony; - -import com.android.internal.telephony.CallInfo; - -/** - * Provides methods for ICallService implementations to interact with the system phone app. - */ -oneway interface ICallServiceAdapter { - - /** - * Retrieves a new unique call id for use with newOutgoingCall and newIncomingCall. - */ - void getNextCallId(/* TODO(santoscordon): Needs response object */); - - /** - * Tells CallsManager of a new incoming call. - */ - void newIncomingCall(String callId, in CallInfo info); - - /** - * Tells CallsManager of a new outgoing call. - */ - void newOutgoingCall(String callId, in CallInfo info); - - /** - * Sets a call's state to active (e.g., an ongoing call where two parties can actively - * communicate). - */ - void setActive(String callId); - - /** - * Sets a call's state to ringing (e.g., an inbound ringing call). - */ - void setRinging(String callId); - - /** - * Sets a call's state to dialing (e.g., dialing an outbound call). - */ - void setDialing(String callId); - - /** - * Sets a call's state to disconnected. - */ - void setDisconnected(String callId); -} |