Loading telephony/java/android/telephony/TelephonyManager.java +0 −16 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package android.telephony; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.content.ComponentName; import android.content.Context; import android.os.Bundle; import android.os.RemoteException; Loading Loading @@ -1422,21 +1421,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}. */ public void newIncomingThirdPartyCall(ComponentName component, String callId) { try { getITelephony().newIncomingThirdPartyCall(component, callId); } catch (RemoteException ex) { } catch (NullPointerException ex) { } } /** * Returns the MMS user agent. */ Loading telephony/java/android/telephony/ThirdPartyCallListener.java +8 −15 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.telephony; import android.os.Handler; import android.os.Message; import android.os.RemoteException; import com.android.internal.telephony.IThirdPartyCallListener; Loading @@ -29,12 +27,15 @@ import com.android.internal.telephony.IThirdPartyCallListener; public class ThirdPartyCallListener { private final IThirdPartyCallListener mListener; // Call end reason. // Call end reason. TODO: rename this to DisconnectCause once they are public. 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) { if (listener == null) { throw new IllegalArgumentException("Invalid listener"); } mListener = listener; } Loading @@ -44,9 +45,7 @@ public class ThirdPartyCallListener { */ public void onCallProviderAttached(ThirdPartyCallProvider callProvider) { try { if (mListener != null) { mListener.onCallProviderAttached(callProvider.callback); } mListener.onCallProviderAttached(callProvider.getCallback()); } catch (RemoteException e) { } } Loading @@ -56,9 +55,7 @@ public class ThirdPartyCallListener { */ public void onRingingStarted() { try { if (mListener != null) { mListener.onRingingStarted(); } } catch (RemoteException e) { } } Loading @@ -68,9 +65,7 @@ public class ThirdPartyCallListener { */ public void onCallEstablished() { try { if (mListener != null) { mListener.onCallEstablished(); } } catch (RemoteException e) { } } Loading @@ -80,9 +75,7 @@ public class ThirdPartyCallListener { */ public void onCallEnded(int reason) { try { if (mListener != null) { mListener.onCallEnded(reason); } } catch (RemoteException e) { } } Loading telephony/java/android/telephony/ThirdPartyCallProvider.java +21 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ 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. Loading @@ -51,7 +52,18 @@ public class ThirdPartyCallProvider { // default implementation empty } final IThirdPartyCallProvider callback = new IThirdPartyCallProvider.Stub() { /** * Sends the given DTMF code. The code can be '0'-'9', 'A'-'D', '#', or '*'. */ public void sendDtmf(char c) { // default implementation empty } IThirdPartyCallProvider getCallback() { return mCallback; } private final IThirdPartyCallProvider mCallback = new IThirdPartyCallProvider.Stub() { @Override public void mute(boolean shouldMute) { Message.obtain(mHandler, MSG_MUTE, shouldMute ? 1 : 0, 0).sendToTarget(); Loading @@ -66,6 +78,11 @@ public class ThirdPartyCallProvider { public void incomingCallAccept() { Message.obtain(mHandler, MSG_INCOMING_CALL_ACCEPT).sendToTarget(); } @Override public void sendDtmf(char c) { Message.obtain(mHandler, MSG_SEND_DTMF, (int) c, 0).sendToTarget(); } }; private final Handler mHandler = new Handler() { Loading @@ -81,6 +98,9 @@ public class ThirdPartyCallProvider { case MSG_INCOMING_CALL_ACCEPT: incomingCallAccept(); break; case MSG_SEND_DTMF: sendDtmf((char) msg.arg1); break; } } }; Loading telephony/java/android/telephony/ThirdPartyCallService.java +3 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ 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; Loading @@ -40,8 +39,7 @@ public class ThirdPartyCallService { } /** * Call to attach to an incoming call. This is in response to a call to {@link * android.telephony.TelephonyManager#newIncomingThirdPartyCall newIncomingThirdPartyCall}. * Call to attach to an incoming call. */ public void incomingCallAttach(ThirdPartyCallListener listener, String callId) { // default implementation empty Loading @@ -51,10 +49,10 @@ public class ThirdPartyCallService { * Returns an IBinder instance that can returned from the service's onBind function. */ public IBinder getBinder() { return callback; return mCallback; } private final IThirdPartyCallService.Stub callback = new IThirdPartyCallService.Stub() { private final IThirdPartyCallService.Stub mCallback = new IThirdPartyCallService.Stub() { @Override public void outgoingCallInitiate(IThirdPartyCallListener listener, String number) { Rlog.w("ThirdPartyPhone", "ThirdPartyCallService.IThirdPartyCallService.out"); Loading Loading
telephony/java/android/telephony/TelephonyManager.java +0 −16 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package android.telephony; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; import android.content.ComponentName; import android.content.Context; import android.os.Bundle; import android.os.RemoteException; Loading Loading @@ -1422,21 +1421,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}. */ public void newIncomingThirdPartyCall(ComponentName component, String callId) { try { getITelephony().newIncomingThirdPartyCall(component, callId); } catch (RemoteException ex) { } catch (NullPointerException ex) { } } /** * Returns the MMS user agent. */ Loading
telephony/java/android/telephony/ThirdPartyCallListener.java +8 −15 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.telephony; import android.os.Handler; import android.os.Message; import android.os.RemoteException; import com.android.internal.telephony.IThirdPartyCallListener; Loading @@ -29,12 +27,15 @@ import com.android.internal.telephony.IThirdPartyCallListener; public class ThirdPartyCallListener { private final IThirdPartyCallListener mListener; // Call end reason. // Call end reason. TODO: rename this to DisconnectCause once they are public. 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) { if (listener == null) { throw new IllegalArgumentException("Invalid listener"); } mListener = listener; } Loading @@ -44,9 +45,7 @@ public class ThirdPartyCallListener { */ public void onCallProviderAttached(ThirdPartyCallProvider callProvider) { try { if (mListener != null) { mListener.onCallProviderAttached(callProvider.callback); } mListener.onCallProviderAttached(callProvider.getCallback()); } catch (RemoteException e) { } } Loading @@ -56,9 +55,7 @@ public class ThirdPartyCallListener { */ public void onRingingStarted() { try { if (mListener != null) { mListener.onRingingStarted(); } } catch (RemoteException e) { } } Loading @@ -68,9 +65,7 @@ public class ThirdPartyCallListener { */ public void onCallEstablished() { try { if (mListener != null) { mListener.onCallEstablished(); } } catch (RemoteException e) { } } Loading @@ -80,9 +75,7 @@ public class ThirdPartyCallListener { */ public void onCallEnded(int reason) { try { if (mListener != null) { mListener.onCallEnded(reason); } } catch (RemoteException e) { } } Loading
telephony/java/android/telephony/ThirdPartyCallProvider.java +21 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ 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. Loading @@ -51,7 +52,18 @@ public class ThirdPartyCallProvider { // default implementation empty } final IThirdPartyCallProvider callback = new IThirdPartyCallProvider.Stub() { /** * Sends the given DTMF code. The code can be '0'-'9', 'A'-'D', '#', or '*'. */ public void sendDtmf(char c) { // default implementation empty } IThirdPartyCallProvider getCallback() { return mCallback; } private final IThirdPartyCallProvider mCallback = new IThirdPartyCallProvider.Stub() { @Override public void mute(boolean shouldMute) { Message.obtain(mHandler, MSG_MUTE, shouldMute ? 1 : 0, 0).sendToTarget(); Loading @@ -66,6 +78,11 @@ public class ThirdPartyCallProvider { public void incomingCallAccept() { Message.obtain(mHandler, MSG_INCOMING_CALL_ACCEPT).sendToTarget(); } @Override public void sendDtmf(char c) { Message.obtain(mHandler, MSG_SEND_DTMF, (int) c, 0).sendToTarget(); } }; private final Handler mHandler = new Handler() { Loading @@ -81,6 +98,9 @@ public class ThirdPartyCallProvider { case MSG_INCOMING_CALL_ACCEPT: incomingCallAccept(); break; case MSG_SEND_DTMF: sendDtmf((char) msg.arg1); break; } } }; Loading
telephony/java/android/telephony/ThirdPartyCallService.java +3 −5 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ 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; Loading @@ -40,8 +39,7 @@ public class ThirdPartyCallService { } /** * Call to attach to an incoming call. This is in response to a call to {@link * android.telephony.TelephonyManager#newIncomingThirdPartyCall newIncomingThirdPartyCall}. * Call to attach to an incoming call. */ public void incomingCallAttach(ThirdPartyCallListener listener, String callId) { // default implementation empty Loading @@ -51,10 +49,10 @@ public class ThirdPartyCallService { * Returns an IBinder instance that can returned from the service's onBind function. */ public IBinder getBinder() { return callback; return mCallback; } private final IThirdPartyCallService.Stub callback = new IThirdPartyCallService.Stub() { private final IThirdPartyCallService.Stub mCallback = new IThirdPartyCallService.Stub() { @Override public void outgoingCallInitiate(IThirdPartyCallListener listener, String number) { Rlog.w("ThirdPartyPhone", "ThirdPartyCallService.IThirdPartyCallService.out"); Loading