Loading api/current.txt +3 −1 Original line number Diff line number Diff line Loading @@ -24518,7 +24518,7 @@ package android.telephony { method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String); method public boolean isNetworkRoaming(); method public void listen(android.telephony.PhoneStateListener, int); method public void newIncomingThirdPartyCall(android.content.ComponentName, java.lang.String); method public void newIncomingThirdPartyCall(android.content.ComponentName, java.lang.String, java.lang.String); field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE"; field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE"; field public static final int CALL_STATE_IDLE = 0; // 0x0 Loading Loading @@ -24582,6 +24582,7 @@ package android.telephony { method public void hangup(); method public void incomingCallAccept(); method public void mute(boolean); method public void sendDtmf(char); } public class ThirdPartyCallService { Loading Loading @@ -34080,6 +34081,7 @@ package com.android.internal.telephony { method public abstract void hangup() throws android.os.RemoteException; method public abstract void incomingCallAccept() throws android.os.RemoteException; method public abstract void mute(boolean) throws android.os.RemoteException; method public abstract void sendDtmf(char) throws android.os.RemoteException; } } telephony/java/android/telephony/TelephonyManager.java +5 −2 Original line number Diff line number Diff line Loading @@ -1428,10 +1428,13 @@ public class TelephonyManager { * @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) { public void newIncomingThirdPartyCall(ComponentName component, String callId, String callerDisplayName) { try { getITelephony().newIncomingThirdPartyCall(component, callId); getITelephony().newIncomingThirdPartyCall(component, callId, callerDisplayName); } catch (RemoteException ex) { } catch (NullPointerException ex) { } Loading telephony/java/android/telephony/ThirdPartyCallProvider.java +16 −0 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,6 +52,13 @@ public class ThirdPartyCallProvider { // default implementation empty } /** * Sends the given DTMF code. The code can be '0'-'9', 'A'-'D', '#', or '*'. */ public void sendDtmf(char c) { // default implementation empty } final IThirdPartyCallProvider callback = new IThirdPartyCallProvider.Stub() { @Override public void mute(boolean shouldMute) { Loading @@ -66,6 +74,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 +94,9 @@ public class ThirdPartyCallProvider { case MSG_INCOMING_CALL_ACCEPT: incomingCallAccept(); break; case MSG_SEND_DTMF: sendDtmf((char) msg.arg1); break; } } }; Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -420,6 +420,9 @@ interface ITelephony { * 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); void newIncomingThirdPartyCall(in ComponentName component, String callId, String callerDisplayName); } telephony/java/com/android/internal/telephony/IThirdPartyCallProvider.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,9 @@ oneway interface IThirdPartyCallProvider { * Accepts the incoming call. */ void incomingCallAccept(); /** * Sends the given DTMF code. The code can be '0'-'9', 'A'-'D', '#', or '*'. */ void sendDtmf(char c); } Loading
api/current.txt +3 −1 Original line number Diff line number Diff line Loading @@ -24518,7 +24518,7 @@ package android.telephony { method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String); method public boolean isNetworkRoaming(); method public void listen(android.telephony.PhoneStateListener, int); method public void newIncomingThirdPartyCall(android.content.ComponentName, java.lang.String); method public void newIncomingThirdPartyCall(android.content.ComponentName, java.lang.String, java.lang.String); field public static final java.lang.String ACTION_PHONE_STATE_CHANGED = "android.intent.action.PHONE_STATE"; field public static final java.lang.String ACTION_RESPOND_VIA_MESSAGE = "android.intent.action.RESPOND_VIA_MESSAGE"; field public static final int CALL_STATE_IDLE = 0; // 0x0 Loading Loading @@ -24582,6 +24582,7 @@ package android.telephony { method public void hangup(); method public void incomingCallAccept(); method public void mute(boolean); method public void sendDtmf(char); } public class ThirdPartyCallService { Loading Loading @@ -34080,6 +34081,7 @@ package com.android.internal.telephony { method public abstract void hangup() throws android.os.RemoteException; method public abstract void incomingCallAccept() throws android.os.RemoteException; method public abstract void mute(boolean) throws android.os.RemoteException; method public abstract void sendDtmf(char) throws android.os.RemoteException; } }
telephony/java/android/telephony/TelephonyManager.java +5 −2 Original line number Diff line number Diff line Loading @@ -1428,10 +1428,13 @@ public class TelephonyManager { * @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) { public void newIncomingThirdPartyCall(ComponentName component, String callId, String callerDisplayName) { try { getITelephony().newIncomingThirdPartyCall(component, callId); getITelephony().newIncomingThirdPartyCall(component, callId, callerDisplayName); } catch (RemoteException ex) { } catch (NullPointerException ex) { } Loading
telephony/java/android/telephony/ThirdPartyCallProvider.java +16 −0 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,6 +52,13 @@ public class ThirdPartyCallProvider { // default implementation empty } /** * Sends the given DTMF code. The code can be '0'-'9', 'A'-'D', '#', or '*'. */ public void sendDtmf(char c) { // default implementation empty } final IThirdPartyCallProvider callback = new IThirdPartyCallProvider.Stub() { @Override public void mute(boolean shouldMute) { Loading @@ -66,6 +74,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 +94,9 @@ public class ThirdPartyCallProvider { case MSG_INCOMING_CALL_ACCEPT: incomingCallAccept(); break; case MSG_SEND_DTMF: sendDtmf((char) msg.arg1); break; } } }; Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -420,6 +420,9 @@ interface ITelephony { * 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); void newIncomingThirdPartyCall(in ComponentName component, String callId, String callerDisplayName); }
telephony/java/com/android/internal/telephony/IThirdPartyCallProvider.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -38,4 +38,9 @@ oneway interface IThirdPartyCallProvider { * Accepts the incoming call. */ void incomingCallAccept(); /** * Sends the given DTMF code. The code can be '0'-'9', 'A'-'D', '#', or '*'. */ void sendDtmf(char c); }