Loading telecomm/java/android/telecom/Connection.java +14 −0 Original line number Diff line number Diff line Loading @@ -806,6 +806,8 @@ public abstract class Connection extends Conferenceable { public void onRttInitiationFailure(Connection c, int reason) {} public void onRttSessionRemotelyTerminated(Connection c) {} public void onRemoteRttRequest(Connection c) {} /** @hide */ public void onPhoneAccountChanged(Connection c, PhoneAccountHandle pHandle) {} } /** Loading Loading @@ -3043,6 +3045,18 @@ public abstract class Connection extends Conferenceable { } } /** * Notifies listeners when phone account is changed. For example, when the PhoneAccount is * changed due to an emergency call being redialed. * @param pHandle The new PhoneAccountHandle for this connection. * @hide */ public void notifyPhoneAccountChanged(PhoneAccountHandle pHandle) { for (Listener l : mListeners) { l.onPhoneAccountChanged(this, pHandle); } } /** * Sends an event associated with this {@code Connection} with associated event extras to the * {@link InCallService}. Loading telecomm/java/android/telecom/ConnectionService.java +8 −0 Original line number Diff line number Diff line Loading @@ -1314,6 +1314,14 @@ public abstract class ConnectionService extends Service { mAdapter.onRemoteRttRequest(id); } } @Override public void onPhoneAccountChanged(Connection c, PhoneAccountHandle pHandle) { String id = mIdByConnection.get(c); if (id != null) { mAdapter.onPhoneAccountChanged(id, pHandle); } } }; /** {@inheritDoc} */ Loading telecomm/java/android/telecom/ConnectionServiceAdapter.java +16 −0 Original line number Diff line number Diff line Loading @@ -609,4 +609,20 @@ final class ConnectionServiceAdapter implements DeathRecipient { } } } /** * Notifies Telecom that a call's PhoneAccountHandle has changed. * * @param callId The unique ID of the call. * @param pHandle The new PhoneAccountHandle associated with the call. */ void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle) { for (IConnectionServiceAdapter adapter : mAdapters) { try { Log.d(this, "onPhoneAccountChanged %s", callId); adapter.onPhoneAccountChanged(callId, pHandle, Log.getExternalSession()); } catch (RemoteException ignored) { } } } } telecomm/java/android/telecom/ConnectionServiceAdapterServant.java +20 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ final class ConnectionServiceAdapterServant { private static final int MSG_ON_RTT_INITIATION_FAILURE = 31; private static final int MSG_ON_RTT_REMOTELY_TERMINATED = 32; private static final int MSG_ON_RTT_UPGRADE_REQUEST = 33; private static final int MSG_SET_PHONE_ACCOUNT_CHANGED = 34; private final IConnectionServiceAdapter mDelegate; Loading Loading @@ -318,6 +319,16 @@ final class ConnectionServiceAdapterServant { case MSG_ON_RTT_UPGRADE_REQUEST: mDelegate.onRemoteRttRequest((String) msg.obj, null /*Session.Info*/); break; case MSG_SET_PHONE_ACCOUNT_CHANGED: { SomeArgs args = (SomeArgs) msg.obj; try { mDelegate.onPhoneAccountChanged((String) args.arg1, (PhoneAccountHandle) args.arg2, null /*Session.Info*/); } finally { args.recycle(); } break; } } } }; Loading Loading @@ -581,6 +592,15 @@ final class ConnectionServiceAdapterServant { throws RemoteException { mHandler.obtainMessage(MSG_ON_RTT_UPGRADE_REQUEST, connectionId).sendToTarget(); } @Override public void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle, Session.Info sessionInfo) { SomeArgs args = SomeArgs.obtain(); args.arg1 = callId; args.arg2 = pHandle; mHandler.obtainMessage(MSG_SET_PHONE_ACCOUNT_CHANGED, args).sendToTarget(); } }; public ConnectionServiceAdapterServant(IConnectionServiceAdapter delegate) { Loading telecomm/java/android/telecom/RemoteConnectionService.java +5 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,11 @@ final class RemoteConnectionService { // in the underlying connection or conference objects } @Override public void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle, Session.Info sessionInfo) { } @Override public void addConferenceCall( final String callId, ParcelableConference parcel, Session.Info sessionInfo) { Loading Loading
telecomm/java/android/telecom/Connection.java +14 −0 Original line number Diff line number Diff line Loading @@ -806,6 +806,8 @@ public abstract class Connection extends Conferenceable { public void onRttInitiationFailure(Connection c, int reason) {} public void onRttSessionRemotelyTerminated(Connection c) {} public void onRemoteRttRequest(Connection c) {} /** @hide */ public void onPhoneAccountChanged(Connection c, PhoneAccountHandle pHandle) {} } /** Loading Loading @@ -3043,6 +3045,18 @@ public abstract class Connection extends Conferenceable { } } /** * Notifies listeners when phone account is changed. For example, when the PhoneAccount is * changed due to an emergency call being redialed. * @param pHandle The new PhoneAccountHandle for this connection. * @hide */ public void notifyPhoneAccountChanged(PhoneAccountHandle pHandle) { for (Listener l : mListeners) { l.onPhoneAccountChanged(this, pHandle); } } /** * Sends an event associated with this {@code Connection} with associated event extras to the * {@link InCallService}. Loading
telecomm/java/android/telecom/ConnectionService.java +8 −0 Original line number Diff line number Diff line Loading @@ -1314,6 +1314,14 @@ public abstract class ConnectionService extends Service { mAdapter.onRemoteRttRequest(id); } } @Override public void onPhoneAccountChanged(Connection c, PhoneAccountHandle pHandle) { String id = mIdByConnection.get(c); if (id != null) { mAdapter.onPhoneAccountChanged(id, pHandle); } } }; /** {@inheritDoc} */ Loading
telecomm/java/android/telecom/ConnectionServiceAdapter.java +16 −0 Original line number Diff line number Diff line Loading @@ -609,4 +609,20 @@ final class ConnectionServiceAdapter implements DeathRecipient { } } } /** * Notifies Telecom that a call's PhoneAccountHandle has changed. * * @param callId The unique ID of the call. * @param pHandle The new PhoneAccountHandle associated with the call. */ void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle) { for (IConnectionServiceAdapter adapter : mAdapters) { try { Log.d(this, "onPhoneAccountChanged %s", callId); adapter.onPhoneAccountChanged(callId, pHandle, Log.getExternalSession()); } catch (RemoteException ignored) { } } } }
telecomm/java/android/telecom/ConnectionServiceAdapterServant.java +20 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,7 @@ final class ConnectionServiceAdapterServant { private static final int MSG_ON_RTT_INITIATION_FAILURE = 31; private static final int MSG_ON_RTT_REMOTELY_TERMINATED = 32; private static final int MSG_ON_RTT_UPGRADE_REQUEST = 33; private static final int MSG_SET_PHONE_ACCOUNT_CHANGED = 34; private final IConnectionServiceAdapter mDelegate; Loading Loading @@ -318,6 +319,16 @@ final class ConnectionServiceAdapterServant { case MSG_ON_RTT_UPGRADE_REQUEST: mDelegate.onRemoteRttRequest((String) msg.obj, null /*Session.Info*/); break; case MSG_SET_PHONE_ACCOUNT_CHANGED: { SomeArgs args = (SomeArgs) msg.obj; try { mDelegate.onPhoneAccountChanged((String) args.arg1, (PhoneAccountHandle) args.arg2, null /*Session.Info*/); } finally { args.recycle(); } break; } } } }; Loading Loading @@ -581,6 +592,15 @@ final class ConnectionServiceAdapterServant { throws RemoteException { mHandler.obtainMessage(MSG_ON_RTT_UPGRADE_REQUEST, connectionId).sendToTarget(); } @Override public void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle, Session.Info sessionInfo) { SomeArgs args = SomeArgs.obtain(); args.arg1 = callId; args.arg2 = pHandle; mHandler.obtainMessage(MSG_SET_PHONE_ACCOUNT_CHANGED, args).sendToTarget(); } }; public ConnectionServiceAdapterServant(IConnectionServiceAdapter delegate) { Loading
telecomm/java/android/telecom/RemoteConnectionService.java +5 −0 Original line number Diff line number Diff line Loading @@ -207,6 +207,11 @@ final class RemoteConnectionService { // in the underlying connection or conference objects } @Override public void onPhoneAccountChanged(String callId, PhoneAccountHandle pHandle, Session.Info sessionInfo) { } @Override public void addConferenceCall( final String callId, ParcelableConference parcel, Session.Info sessionInfo) { Loading