diff options
author | yueg <yueg@google.com> | 2017-10-16 14:23:26 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-10-17 08:07:25 -0700 |
commit | 2f8d48f5e981ab9945c907cd9ab0f6bd6a82db22 (patch) | |
tree | ad5e5bed1fe75941840374419f0bc06dc88641c3 /java/com/android/dialer/simulator/impl/SimulatorConnectionService.java | |
parent | 5a6cb962ae30ad9e308b5bcc00920daf84618808 (diff) |
Add GSM conference calling to simulator.
This CL adds a new item to the simulator menu:
- Add GSM conference
The GSM conference action creates a conference with 5 phone calls.
Users can individually separate or kick calls out of the conference. Hanging up the second last call finishes the conference.
Bug: 67785540
Test: SimulatorConferenceTest
PiperOrigin-RevId: 172377631
Change-Id: Ic30fa6c65cf782247f75bcdd1ecbd86b1c16f143
Diffstat (limited to 'java/com/android/dialer/simulator/impl/SimulatorConnectionService.java')
-rw-r--r-- | java/com/android/dialer/simulator/impl/SimulatorConnectionService.java | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/java/com/android/dialer/simulator/impl/SimulatorConnectionService.java b/java/com/android/dialer/simulator/impl/SimulatorConnectionService.java index 25d4a7240..465890cf0 100644 --- a/java/com/android/dialer/simulator/impl/SimulatorConnectionService.java +++ b/java/com/android/dialer/simulator/impl/SimulatorConnectionService.java @@ -109,6 +109,19 @@ public class SimulatorConnectionService extends ConnectionService { return connection; } + @Override + public void onConference(Connection connection1, Connection connection2) { + LogUtil.i( + "SimulatorConnectionService.onConference", + "connection1: " + + SimulatorSimCallManager.getConnectionTag(connection1) + + ", connection2: " + + SimulatorSimCallManager.getConnectionTag(connection2)); + for (Listener listener : listeners) { + listener.onConference((SimulatorConnection) connection1, (SimulatorConnection) connection2); + } + } + private static Uri getPhoneNumber(ConnectionRequest request) { String phoneNumber = request.getExtras().getString(TelephonyManager.EXTRA_INCOMING_NUMBER); return Uri.fromParts(PhoneAccount.SCHEME_TEL, phoneNumber, null); @@ -116,8 +129,11 @@ public class SimulatorConnectionService extends ConnectionService { /** Callback used to notify listeners when a new connection has been added. */ public interface Listener { - void onNewOutgoingConnection(SimulatorConnection connection); + void onNewOutgoingConnection(@NonNull SimulatorConnection connection); + + void onNewIncomingConnection(@NonNull SimulatorConnection connection); - void onNewIncomingConnection(SimulatorConnection connection); + void onConference( + @NonNull SimulatorConnection connection1, @NonNull SimulatorConnection connection2); } } |