commit | 1ca460978ff7a3a9c1e5502b43eaa4be747b3beb | [log] [tgz] |
---|---|---|
author | Andreas Gampe <agampe@google.com> | Thu Mar 01 13:58:57 2018 -0800 |
committer | Andreas Gampe <agampe@google.com> | Mon Mar 05 15:36:14 2018 -0800 |
tree | d21bf15b6039bdcc3a66cf484fa3d6840353184b | |
parent | 67d032830ac830aea5cef70f5267ffeeba6a613c [diff] |
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,