summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2014-05-16 17:52:23 -0700
committerSantos Cordon <santoscordon@google.com>2014-05-16 17:58:09 -0700
commit14816d669b29607808e6d0ee72c602d340692d0e (patch)
tree75658421a2f53250b5dd0037da56c152048a9726 /telephony
parent4455f54b5ba98da345c64de1614b0704022d272b (diff)
downloadframeworks_base-14816d669b29607808e6d0ee72c602d340692d0e.zip
frameworks_base-14816d669b29607808e6d0ee72c602d340692d0e.tar.gz
frameworks_base-14816d669b29607808e6d0ee72c602d340692d0e.tar.bz2
Remove methods added in TelephonyManager.
Change-Id: I771502ab76dfc24eb19b9ff58b029bea45d6832c
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/CallStateListener.java36
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java124
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl45
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephonyListener.aidl27
4 files changed, 0 insertions, 232 deletions
diff --git a/telephony/java/android/telephony/CallStateListener.java b/telephony/java/android/telephony/CallStateListener.java
deleted file mode 100644
index e2ffbfa..0000000
--- a/telephony/java/android/telephony/CallStateListener.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.telephony;
-
-import android.annotation.PrivateApi;
-
-/** @hide */
-@PrivateApi
-public interface CallStateListener {
- /**
- * Notify of a new or updated call.
- * Any time the state of a call is updated, it will alert any listeners. This includes changes
- * of state such as when a call is put on hold or conferenced.
- *
- * @param callId a unique ideCntifier for a given call that can be used to track state changes
- * @param state the new state of the call.
- * {@see com.android.services.telephony.common.Call$State}
- * @param number the phone number of the call. For some states, this may be blank. However, it
- * will be populated for any initial state.
- */
- public void onCallStateChanged(int callId, int state, String number);
-}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 7002744..a57c363 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -82,40 +82,8 @@ public class TelephonyManager {
static final int NEVER_USE = 2;
}
- private final HashMap<CallStateListener,Listener> mListeners
- = new HashMap<CallStateListener,Listener>();
private final Context mContext;
- private static class Listener extends ITelephonyListener.Stub {
- final CallStateListener mListener;
- private static final int WHAT = 1;
-
- private Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- mListener.onCallStateChanged(msg.arg1, msg.arg2, (String)msg.obj);
- }
- };
-
- Listener(CallStateListener listener) {
- mListener = listener;
- }
-
- @Override
- public void onUpdate(final int callId, final int state, final String number) {
- if (mHandler != null) {
- mHandler.sendMessage(mHandler.obtainMessage(WHAT, callId, state, number));
- }
- }
-
- void clearQueue() {
- mHandler.removeMessages(WHAT);
-
- // Don't accept more incoming binder calls either.
- mHandler = null;
- }
- }
-
/** @hide */
public TelephonyManager(Context context) {
Context appContext = context.getApplicationContext();
@@ -2016,46 +1984,6 @@ public class TelephonyManager {
/** @hide */
@PrivateApi
- public void toggleHold() {
- try {
- getITelephony().toggleHold();
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#toggleHold", e);
- }
- }
-
- /** @hide */
- @PrivateApi
- public void merge() {
- try {
- getITelephony().merge();
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#merge", e);
- }
- }
-
- /** @hide */
- @PrivateApi
- public void swap() {
- try {
- getITelephony().swap();
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#swap", e);
- }
- }
-
- /** @hide */
- @PrivateApi
- public void mute(boolean mute) {
- try {
- getITelephony().mute(mute);
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#mute", e);
- }
- }
-
- /** @hide */
- @PrivateApi
public void silenceRinger() {
try {
getITelephony().silenceRinger();
@@ -2291,56 +2219,4 @@ public class TelephonyManager {
}
return false;
}
-
- /** @hide */
- @PrivateApi
- public void playDtmfTone(char digit, boolean timedShortCode) {
- try {
- getITelephony().playDtmfTone(digit, timedShortCode);
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#playDtmfTone", e);
- }
- }
-
- /** @hide */
- @PrivateApi
- public void stopDtmfTone() {
- try {
- getITelephony().stopDtmfTone();
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#stopDtmfTone", e);
- }
- }
-
- /** @hide */
- @PrivateApi
- public void addCallStateListener(CallStateListener listener) {
- try {
- if (listener == null) {
- throw new RuntimeException("Listener can't be null");
- }
- if (!mListeners.containsKey(listener)) {
- final Listener l = new Listener(listener);
- mListeners.put(listener, l);
- getITelephony().addListener(l);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#addListener", e);
- }
- }
-
- /** @hide */
- @PrivateApi
- public void removeCallStateListener(CallStateListener listener) {
- try {
- final Listener l = mListeners.remove(listener);
- if (l != null) {
- // Make sure that no callbacks that are already in flight come.
- l.clearQueue();
- getITelephony().removeListener(l);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "Error calling ITelephony#removeListener", e);
- }
- }
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 72398ad..ee260d6 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -21,8 +21,6 @@ import android.os.Bundle;
import android.telephony.CellInfo;
import android.telephony.NeighboringCellInfo;
-import com.android.internal.telephony.ITelephonyListener;
-
import java.util.List;
import java.util.List;
@@ -426,47 +424,4 @@ interface ITelephony {
* @return true on success; false on any failure.
*/
boolean setPreferredNetworkType(int networkType);
-
- /**
- * Put a call on hold.
- */
- void toggleHold();
-
- /**
- * Merge foreground and background calls.
- */
- void merge();
-
- /**
- * Swap foreground and background calls.
- */
- void swap();
-
- /**
- * Mute the phone.
- */
- void mute(boolean mute);
-
- /**
- * Start playing DTMF tone for the specified digit.
- *
- * @param digit the digit that corresponds with the desired tone.
- * @param timedShortcode whether the specified digit should be played as a timed short code.
- */
- void playDtmfTone(char digit, boolean timedShortCode);
-
- /**
- * Stop playing DTMF tones.
- */
- void stopDtmfTone();
-
- /**
- * Register a callback.
- */
- void addListener(ITelephonyListener listener);
-
- /**
- * Unregister a callback.
- */
- void removeListener(ITelephonyListener listener);
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephonyListener.aidl b/telephony/java/com/android/internal/telephony/ITelephonyListener.aidl
deleted file mode 100644
index c226217..0000000
--- a/telephony/java/com/android/internal/telephony/ITelephonyListener.aidl
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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 com.android.internal.telephony;
-
-/**
- * Interface used to register a listener that gets more detailed call state information than
- * {@link android.telephony.PhoneStateListener}
- *
- * {@hide}
- */
-oneway interface ITelephonyListener {
- void onUpdate(int callId, int state, String number);
-}