Loading src/com/android/server/telecom/Call.java +13 −0 Original line number Diff line number Diff line Loading @@ -993,6 +993,19 @@ public class Call implements CreateConnectionResponse { } } /** * Silences the ringer. */ void silence() { if (mConnectionService == null) { Log.w(this, "silence() request on a call without a connection service."); } else { Log.i(this, "Send silence to connection service for call %s", this); Log.event(this, Log.Events.STOP_DTMF); mConnectionService.silence(this); } } void disconnect() { disconnect(false); } Loading src/com/android/server/telecom/ConnectionServiceWrapper.java +12 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,18 @@ final class ConnectionServiceWrapper extends ServiceBinder { removeCall(call, new DisconnectCause(DisconnectCause.LOCAL)); } /** @see IConnectionService#silence(String) */ void silence(Call call) { final String callId = mCallIdMapper.getCallId(call); if (callId != null && isServiceValid("silence")) { try { logOutgoing("silence %s", callId); mServiceInterface.silence(callId); } catch (RemoteException e) { } } } /** @see IConnectionService#hold(String) */ void hold(Call call) { final String callId = mCallIdMapper.getCallId(call); Loading src/com/android/server/telecom/Ringer.java +4 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ final class Ringer extends CallsManagerListenerBase { * Silences the ringer for any actively ringing calls. */ void silence() { for (Call call : mRingingCalls) { call.silence(); } // Remove all calls from the "ringing" set and then update the ringer. mRingingCalls.clear(); updateRinging(null); Loading tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java +4 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.telecom.ParcelableConnection; import android.telecom.PhoneAccountHandle; import android.telecom.StatusHints; import java.lang.Override; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; Loading Loading @@ -112,6 +113,9 @@ public class ConnectionServiceFixture implements TestFixture<IConnectionService> @Override public void disconnect(String callId) throws RemoteException { } @Override public void silence(String callId) throws RemoteException { } @Override public void hold(String callId) throws RemoteException { } Loading Loading
src/com/android/server/telecom/Call.java +13 −0 Original line number Diff line number Diff line Loading @@ -993,6 +993,19 @@ public class Call implements CreateConnectionResponse { } } /** * Silences the ringer. */ void silence() { if (mConnectionService == null) { Log.w(this, "silence() request on a call without a connection service."); } else { Log.i(this, "Send silence to connection service for call %s", this); Log.event(this, Log.Events.STOP_DTMF); mConnectionService.silence(this); } } void disconnect() { disconnect(false); } Loading
src/com/android/server/telecom/ConnectionServiceWrapper.java +12 −0 Original line number Diff line number Diff line Loading @@ -709,6 +709,18 @@ final class ConnectionServiceWrapper extends ServiceBinder { removeCall(call, new DisconnectCause(DisconnectCause.LOCAL)); } /** @see IConnectionService#silence(String) */ void silence(Call call) { final String callId = mCallIdMapper.getCallId(call); if (callId != null && isServiceValid("silence")) { try { logOutgoing("silence %s", callId); mServiceInterface.silence(callId); } catch (RemoteException e) { } } } /** @see IConnectionService#hold(String) */ void hold(Call call) { final String callId = mCallIdMapper.getCallId(call); Loading
src/com/android/server/telecom/Ringer.java +4 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ final class Ringer extends CallsManagerListenerBase { * Silences the ringer for any actively ringing calls. */ void silence() { for (Call call : mRingingCalls) { call.silence(); } // Remove all calls from the "ringing" set and then update the ringer. mRingingCalls.clear(); updateRinging(null); Loading
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java +4 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import android.telecom.ParcelableConnection; import android.telecom.PhoneAccountHandle; import android.telecom.StatusHints; import java.lang.Override; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; Loading Loading @@ -112,6 +113,9 @@ public class ConnectionServiceFixture implements TestFixture<IConnectionService> @Override public void disconnect(String callId) throws RemoteException { } @Override public void silence(String callId) throws RemoteException { } @Override public void hold(String callId) throws RemoteException { } Loading