Merge "Dont clear serviceConnections on subsequent bind() calls." into lmp-dev
diff --git a/src/com/android/server/telecom/InCallController.java b/src/com/android/server/telecom/InCallController.java
index 2dc30da..6621c7c 100644
--- a/src/com/android/server/telecom/InCallController.java
+++ b/src/com/android/server/telecom/InCallController.java
@@ -261,8 +261,6 @@
private void bind() {
ThreadUtil.checkOnMainThread();
if (mInCallServices.isEmpty()) {
- mServiceConnections.clear();
-
PackageManager packageManager = mContext.getPackageManager();
Intent serviceIntent = new Intent(InCallService.SERVICE_INTERFACE);
@@ -289,11 +287,14 @@
continue;
}
- Log.i(this, "Attempting to bind to InCall " + serviceInfo.packageName);
InCallServiceConnection inCallServiceConnection = new InCallServiceConnection();
ComponentName componentName = new ComponentName(serviceInfo.packageName,
serviceInfo.name);
+ Log.i(this, "Attempting to bind to InCall %s, is dupe? %b ",
+ serviceInfo.packageName,
+ mServiceConnections.containsKey(componentName));
+
if (!mServiceConnections.containsKey(componentName)) {
Intent intent = new Intent(InCallService.SERVICE_INTERFACE);
intent.setComponent(componentName);