Fix making outgoing calls
This CL fixes the following issues with outgoing calls:
- Switchboard.placeOutgoingCall doesn't keep track of calls
- ServiceBinder.bind calls setServiceInterface() multiple times if service is already bound
- OutgoingCallProcessor.mCallServicesByInfo uses a custom object as a key which makes it impossible to look up call services
- OutgoingCallProcessor.attemptNextCallService invokes CallServiceWrapper.call without binding first
Change-Id: Ia7983f52c8c03ed9aa44e2c52c20ce9c1c9c75de
diff --git a/src/com/android/telecomm/Switchboard.java b/src/com/android/telecomm/Switchboard.java
index 32ef914..017a8d5 100644
--- a/src/com/android/telecomm/Switchboard.java
+++ b/src/com/android/telecomm/Switchboard.java
@@ -114,10 +114,11 @@
void placeOutgoingCall(Call call) {
ThreadUtil.checkOnMainThread();
- mLookupId++;
+ mNewOutgoingCalls.add(call);
// We initialize a lookup every time because between calls the set of available call
// services can change between calls.
+ mLookupId++;
mCallServiceRepository.initiateLookup(mLookupId);
mSelectorRepository.initiateLookup(mLookupId);
}