summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorEvan Charlton <evanc@google.com>2014-05-14 22:08:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-14 22:08:21 +0000
commit4a644e390359a1715c88f54ed0174ffb5113d617 (patch)
tree34c1623607c4c45a441653dbd73f5ea923db604d /telephony
parentfcca6cd019bb4c0aec336dd3c5905de761c0bd18 (diff)
parent0082e3302fcaef4a770b620cf03c23d618668f71 (diff)
downloadframeworks_base-4a644e390359a1715c88f54ed0174ffb5113d617.zip
frameworks_base-4a644e390359a1715c88f54ed0174ffb5113d617.tar.gz
frameworks_base-4a644e390359a1715c88f54ed0174ffb5113d617.tar.bz2
Merge "Remove obsolete ThirdPartyCall APIs"
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java45
-rw-r--r--telephony/java/android/telephony/ThirdPartyCallListener.java89
-rw-r--r--telephony/java/android/telephony/ThirdPartyCallProvider.java106
-rw-r--r--telephony/java/android/telephony/ThirdPartyCallSendDtmfCallback.java46
-rw-r--r--telephony/java/android/telephony/ThirdPartyCallService.java96
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl25
6 files changed, 0 insertions, 407 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 768e66a..7002744 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -1751,24 +1751,6 @@ public class TelephonyManager {
}
/**
- * Inform the phone about a new incoming third party call. The phone will bind to the service
- * identified by component to handle the call.
- * @param component the component that should handle the intent.
- * @param callId the unique id of the call. This id is passed to the service via {@link
- * ThirdPartyCallService#incomingCallAttach incomingCallAttach}.
- * @param callerDisplayName the name shown to the user. Normally this will be the caller's phone
- * number.
- */
- public void newIncomingThirdPartyCall(ComponentName component, String callId,
- String callerDisplayName) {
- try {
- getITelephony().newIncomingThirdPartyCall(component, callId, callerDisplayName);
- } catch (RemoteException ex) {
- } catch (NullPointerException ex) {
- }
- }
-
- /**
* Returns the MMS user agent.
*/
public String getMmsUserAgent() {
@@ -1928,33 +1910,6 @@ public class TelephonyManager {
return false;
}
- /*
- * Obtain the current state of Wi-Fi calling.
- *
- * @hide
- * @see android.telephony.TelephonyManager.WifiCallingChoices
- */
- public int getWhenToMakeWifiCalls() {
- try {
- return getITelephony().getWhenToMakeWifiCalls();
- } catch (RemoteException ex) {
- return WifiCallingChoices.NEVER_USE;
- }
- }
-
- /**
- * Set the current state of Wi-Fi calling.
- *
- * @hide
- * @see android.telephony.TelephonyManager.WifiCallingChoices
- */
- public void setWhenToMakeWifiCalls(int state) {
- try {
- getITelephony().setWhenToMakeWifiCalls(state);
- } catch (RemoteException ex) {
- }
- }
-
/**
* Get the preferred network type.
* Used for device configuration by some CDMA operators.
diff --git a/telephony/java/android/telephony/ThirdPartyCallListener.java b/telephony/java/android/telephony/ThirdPartyCallListener.java
deleted file mode 100644
index 08f8d3a..0000000
--- a/telephony/java/android/telephony/ThirdPartyCallListener.java
+++ /dev/null
@@ -1,89 +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.os.Handler;
-import android.os.Message;
-import android.os.RemoteException;
-
-import com.android.internal.telephony.IThirdPartyCallListener;
-
-/**
- * Interface provided to {@link android.telephony.ThirdPartyCallService}. The service can use this
- * to notify the listener of changes to the call state.
- */
-public class ThirdPartyCallListener {
- private final IThirdPartyCallListener mListener;
-
- // Call end reason.
- public static final int CALL_END_NORMAL = 1;
- public static final int CALL_END_INCOMING_MISSED = 2;
- public static final int CALL_END_OTHER = 3;
-
- public ThirdPartyCallListener(IThirdPartyCallListener listener) {
- mListener = listener;
- }
-
- /**
- * Called by the service when a call provider is available to perform the outgoing or incoming
- * call.
- */
- public void onCallProviderAttached(ThirdPartyCallProvider callProvider) {
- try {
- if (mListener != null) {
- mListener.onCallProviderAttached(callProvider.callback);
- }
- } catch (RemoteException e) {
- }
- }
-
- /**
- * Notifies the listener that ringing has started for this call.
- */
- public void onRingingStarted() {
- try {
- if (mListener != null) {
- mListener.onRingingStarted();
- }
- } catch (RemoteException e) {
- }
- }
-
- /**
- * Notifies the listener that the call has been successfully established.
- */
- public void onCallEstablished() {
- try {
- if (mListener != null) {
- mListener.onCallEstablished();
- }
- } catch (RemoteException e) {
- }
- }
-
- /**
- * Notifies the listener that the call has ended.
- */
- public void onCallEnded(int reason) {
- try {
- if (mListener != null) {
- mListener.onCallEnded(reason);
- }
- } catch (RemoteException e) {
- }
- }
-}
diff --git a/telephony/java/android/telephony/ThirdPartyCallProvider.java b/telephony/java/android/telephony/ThirdPartyCallProvider.java
deleted file mode 100644
index 5054380..0000000
--- a/telephony/java/android/telephony/ThirdPartyCallProvider.java
+++ /dev/null
@@ -1,106 +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.os.Handler;
-import android.os.Message;
-
-import com.android.internal.telephony.IThirdPartyCallProvider;
-import com.android.internal.telephony.IThirdPartyCallSendDtmfCallback;
-
-/**
- * Interface sent to {@link android.telephony.ThirdPartyCallListener#onCallProviderAttached
- * onCallProviderAttached}. This is used to control an outgoing or an incoming call.
- */
-public class ThirdPartyCallProvider {
- private static final int MSG_MUTE = 1;
- private static final int MSG_HANGUP = 2;
- private static final int MSG_INCOMING_CALL_ACCEPT = 3;
- private static final int MSG_SEND_DTMF = 4;
-
- /**
- * Mutes or unmutes the call.
- */
- public void mute(boolean shouldMute) {
- // default implementation empty
- }
-
- /**
- * Ends the current call. If this is an unanswered incoming call then the call is rejected.
- */
- public void hangup() {
- // default implementation empty
- }
-
- /**
- * Accepts the incoming call.
- */
- public void incomingCallAccept() {
- // default implementation empty
- }
-
- /**
- * Sends the given DTMF code. The code can be '0'-'9', 'A'-'D', '#', or '*'.
- */
- public void sendDtmf(char c, ThirdPartyCallSendDtmfCallback callback) {
- // default implementation empty
- }
-
- final IThirdPartyCallProvider callback = new IThirdPartyCallProvider.Stub() {
- @Override
- public void mute(boolean shouldMute) {
- Message.obtain(mHandler, MSG_MUTE, shouldMute ? 1 : 0, 0).sendToTarget();
- }
-
- @Override
- public void hangup() {
- Message.obtain(mHandler, MSG_HANGUP).sendToTarget();
- }
-
- @Override
- public void incomingCallAccept() {
- Message.obtain(mHandler, MSG_INCOMING_CALL_ACCEPT).sendToTarget();
- }
-
- @Override
- public void sendDtmf(char c, IThirdPartyCallSendDtmfCallback callback) {
- Message.obtain(mHandler, MSG_SEND_DTMF, (int) c, 0, callback).sendToTarget();
- }
- };
-
- private final Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- switch (msg.what) {
- case MSG_MUTE:
- mute(msg.arg1 != 0);
- break;
- case MSG_HANGUP:
- hangup();
- break;
- case MSG_INCOMING_CALL_ACCEPT:
- incomingCallAccept();
- break;
- case MSG_SEND_DTMF:
- ThirdPartyCallSendDtmfCallback callback = new ThirdPartyCallSendDtmfCallback(
- (IThirdPartyCallSendDtmfCallback) msg.obj);
- sendDtmf((char) msg.arg1, callback);
- break;
- }
- }
- };
-}
diff --git a/telephony/java/android/telephony/ThirdPartyCallSendDtmfCallback.java b/telephony/java/android/telephony/ThirdPartyCallSendDtmfCallback.java
deleted file mode 100644
index 5a67cf7..0000000
--- a/telephony/java/android/telephony/ThirdPartyCallSendDtmfCallback.java
+++ /dev/null
@@ -1,46 +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.os.RemoteException;
-
-import com.android.internal.telephony.IThirdPartyCallSendDtmfCallback;
-
-/**
- * Callback interface for when DTMF has been sent.
- */
-public class ThirdPartyCallSendDtmfCallback {
- private final IThirdPartyCallSendDtmfCallback mCallback;
-
- public ThirdPartyCallSendDtmfCallback(IThirdPartyCallSendDtmfCallback callback) {
- if (callback == null) {
- throw new IllegalArgumentException("Invalid callback");
- }
- mCallback = callback;
- }
-
- /**
- * Called by the service when a call provider is available to perform the outgoing or incoming
- * call.
- */
- public void onSendDtmfCompleted() {
- try {
- mCallback.onSendDtmfCompleted();
- } catch (RemoteException e) {
- }
- }
-}
diff --git a/telephony/java/android/telephony/ThirdPartyCallService.java b/telephony/java/android/telephony/ThirdPartyCallService.java
deleted file mode 100644
index de6c290..0000000
--- a/telephony/java/android/telephony/ThirdPartyCallService.java
+++ /dev/null
@@ -1,96 +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.os.Handler;
-import android.os.IBinder;
-import android.os.Message;
-import android.os.RemoteException;
-import android.util.Pair;
-
-import com.android.internal.telephony.IThirdPartyCallListener;
-import com.android.internal.telephony.IThirdPartyCallService;
-
-/**
- * Interface provided by a service to start outgoing calls and attach to incoming calls.
- */
-public class ThirdPartyCallService {
- private static final int MSG_OUTGOING_CALL_INITIATE = 1;
- private static final int MSG_INCOMING_CALL_ATTACH = 2;
-
- /**
- * Call to start a new outgoing call.
- */
- public void outgoingCallInitiate(ThirdPartyCallListener listener, String number) {
- // default implementation empty
- }
-
- /**
- * Call to attach to an incoming call. This is in response to a call to {@link
- * android.telephony.TelephonyManager#newIncomingThirdPartyCall newIncomingThirdPartyCall}.
- */
- public void incomingCallAttach(ThirdPartyCallListener listener, String callId) {
- // default implementation empty
- }
-
- /**
- * Returns an IBinder instance that can returned from the service's onBind function.
- */
- public IBinder getBinder() {
- return callback;
- }
-
- private final IThirdPartyCallService.Stub callback = new IThirdPartyCallService.Stub() {
- @Override
- public void outgoingCallInitiate(IThirdPartyCallListener listener, String number) {
- Rlog.w("ThirdPartyPhone", "ThirdPartyCallService.IThirdPartyCallService.out");
- Message.obtain(mHandler, MSG_OUTGOING_CALL_INITIATE,
- Pair.create(listener, number)).sendToTarget();
- }
-
- @Override
- public void incomingCallAttach(IThirdPartyCallListener listener, String callId) {
- Rlog.w("ThirdPartyPhone", "ThirdPartyCallService.IThirdPartyCallService.in");
- Message.obtain(mHandler, MSG_INCOMING_CALL_ATTACH,
- Pair.create(listener, callId)).sendToTarget();
- }
- };
-
- private final Handler mHandler = new Handler() {
- public void handleMessage(Message msg) {
- Rlog.w("ThirdPartyPhone", "ThirdPartyCallService.handleMessage: " + msg.what);
- switch (msg.what) {
- case MSG_OUTGOING_CALL_INITIATE: {
- Rlog.w("ThirdPartyPhone", "ThirdPartyCallService.handleMessage out");
- Pair<IThirdPartyCallListener, String> pair =
- (Pair<IThirdPartyCallListener, String>) msg.obj;
- ThirdPartyCallListener listener = new ThirdPartyCallListener(pair.first);
- outgoingCallInitiate(listener, pair.second);
- break;
- }
- case MSG_INCOMING_CALL_ATTACH: {
- Rlog.w("ThirdPartyPhone", "ThirdPartyCallService.handleMessage in");
- Pair<IThirdPartyCallListener, String> pair =
- (Pair<IThirdPartyCallListener, String>) msg.obj;
- ThirdPartyCallListener listener = new ThirdPartyCallListener(pair.first);
- incomingCallAttach(listener, pair.second);
- break;
- }
- }
- }
- };
-}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 8e790cb..72398ad 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -410,31 +410,6 @@ interface ITelephony {
*/
boolean nvResetConfig(int resetType);
- /**
- * Inform the phone about a new incoming third party call. The phone will bind to the service
- * identified by component to handle the call.
- * @param component the component that should handle the intent.
- * @param callId the unique id of the call.
- * @param callerDisplayName the name shown to the user. Normally this will be the caller's phone
- * number.
- */
- void newIncomingThirdPartyCall(in ComponentName component, String callId,
- String callerDisplayName);
-
- /**
- * Obtain the current state of Wi-Fi calling.
- *
- * @see android.telephony.TelephonyManager.WifiCallingChoices
- */
- int getWhenToMakeWifiCalls();
-
- /**
- * Set the current state of Wi-Fi calling.
- *
- * @see android.telephony.TelephonyManager.WifiCallingChoices
- */
- void setWhenToMakeWifiCalls(int state);
-
/*
* Get the preferred network type.
* Used for device configuration by some CDMA operators.