summaryrefslogtreecommitdiffstats
path: root/src/com/android/server/telecom/ConnectionServiceWrapper.java
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-10-30 11:05:22 -0700
committerTyler Gunn <tgunn@google.com>2014-10-30 11:05:22 -0700
commit6e2b94eae72c72b11358fdb99f87471b5ab11e4f (patch)
treecc11d56a991ae2c52f9031c4b421b1b6f3fa8050 /src/com/android/server/telecom/ConnectionServiceWrapper.java
parent9b8badbc2cdff6ed2ff6676f4e47c3c46d0eb7e4 (diff)
downloadandroid_packages_services_Telecomm-6e2b94eae72c72b11358fdb99f87471b5ab11e4f.tar.gz
android_packages_services_Telecomm-6e2b94eae72c72b11358fdb99f87471b5ab11e4f.tar.bz2
android_packages_services_Telecomm-6e2b94eae72c72b11358fdb99f87471b5ab11e4f.zip
Creating connections for conference event package participants.
- Add "addExistingCall" method to Connection service wrapper to handle the creation of new calls for connections which already exist in telephony. - Fixed but in setIsConference message where an isValidCallId check made outside of the handler would result in a newly added call NOT being marked as conferenced due to a race condition. The MSG_SET_IS_CONFERENCED handler already checks if the call exists before performing its operation. Bug: 18057361 Change-Id: I2348c8e6985cd831f2cae56b37dfcb33bae014a8
Diffstat (limited to 'src/com/android/server/telecom/ConnectionServiceWrapper.java')
-rw-r--r--src/com/android/server/telecom/ConnectionServiceWrapper.java33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/com/android/server/telecom/ConnectionServiceWrapper.java b/src/com/android/server/telecom/ConnectionServiceWrapper.java
index 32c6107e..cb7a1feb 100644
--- a/src/com/android/server/telecom/ConnectionServiceWrapper.java
+++ b/src/com/android/server/telecom/ConnectionServiceWrapper.java
@@ -80,6 +80,7 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> {
private static final int MSG_SET_CALLER_DISPLAY_NAME = 18;
private static final int MSG_SET_VIDEO_STATE = 19;
private static final int MSG_SET_CONFERENCEABLE_CONNECTIONS = 20;
+ private static final int MSG_ADD_EXISTING_CONNECTION = 21;
private final Handler mHandler = new Handler() {
@Override
@@ -350,6 +351,19 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> {
}
break;
}
+ case MSG_ADD_EXISTING_CONNECTION: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ String callId = (String)args.arg1;
+ ParcelableConnection connection = (ParcelableConnection)args.arg2;
+ Call existingCall = mCallsManager.createCallForExistingConnection(callId,
+ connection);
+ mCallIdMapper.addCall(existingCall, callId);
+ existingCall.setConnectionService(ConnectionServiceWrapper.this);
+ } finally {
+ args.recycle();
+ }
+ }
}
}
};
@@ -458,12 +472,10 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> {
@Override
public void setIsConferenced(String callId, String conferenceCallId) {
logIncoming("setIsConferenced %s %s", callId, conferenceCallId);
- if (mCallIdMapper.isValidCallId(callId)) {
- SomeArgs args = SomeArgs.obtain();
- args.arg1 = callId;
- args.arg2 = conferenceCallId;
- mHandler.obtainMessage(MSG_SET_IS_CONFERENCED, args).sendToTarget();
- }
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = conferenceCallId;
+ mHandler.obtainMessage(MSG_SET_IS_CONFERENCED, args).sendToTarget();
}
@Override
@@ -558,6 +570,15 @@ final class ConnectionServiceWrapper extends ServiceBinder<IConnectionService> {
mHandler.obtainMessage(MSG_SET_CONFERENCEABLE_CONNECTIONS, args).sendToTarget();
}
}
+
+ @Override
+ public void addExistingConnection(String callId, ParcelableConnection connection) {
+ logIncoming("addExistingConnection %s %s", callId, connection);
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = connection;
+ mHandler.obtainMessage(MSG_ADD_EXISTING_CONNECTION, args).sendToTarget();
+ }
}
private final Adapter mAdapter = new Adapter();