Telecomm: Fix ConnectionServiceRepository

Fix the cache removal.

Found by Errorprone.

(cherry picked from commit 1839ce18104e214c2d0806c39baaf6e046bdc3e9)

Bug: 73288226
Test: m javac-check RUN_ERROR_PRONE=true
Test: atest TelecomUnitTests
Merged-In: I835f3ef9f85cde84bb9ec6882540fc9b71c5b85e
Change-Id: I835f3ef9f85cde84bb9ec6882540fc9b71c5b85e
diff --git a/src/com/android/server/telecom/ConnectionServiceRepository.java b/src/com/android/server/telecom/ConnectionServiceRepository.java
index 4685704..d34ea3c 100644
--- a/src/com/android/server/telecom/ConnectionServiceRepository.java
+++ b/src/com/android/server/telecom/ConnectionServiceRepository.java
@@ -43,7 +43,8 @@
                 @Override
                 public void onUnbind(ConnectionServiceWrapper service) {
                     synchronized (mLock) {
-                        mServiceCache.remove(service.getComponentName());
+                        mServiceCache.remove(Pair.create(service.getComponentName(),
+                                service.getUserHandle()));
                     }
                 }
             };
diff --git a/src/com/android/server/telecom/ServiceBinder.java b/src/com/android/server/telecom/ServiceBinder.java
index 47ba295..44ddc24 100644
--- a/src/com/android/server/telecom/ServiceBinder.java
+++ b/src/com/android/server/telecom/ServiceBinder.java
@@ -261,6 +261,10 @@
         mUserHandle = userHandle;
     }
 
+    final UserHandle getUserHandle() {
+        return mUserHandle;
+    }
+
     final void incrementAssociatedCallCount() {
         mAssociatedCallCount++;
         Log.v(this, "Call count increment %d, %s", mAssociatedCallCount,