Frameworks/base: Fix request removal in VoiceInteractionSession

Fix and simplify removeRequest.

Bug: 19797138
Change-Id: I0eca877e3109c9f39cebd4c888f166ce334fcc0e
This commit is contained in:
Andreas Gampe
2015-03-17 21:22:49 -07:00
parent 28e6aeca3a
commit 8ef92bd311

View File

@@ -436,11 +436,7 @@ public abstract class VoiceInteractionSession implements KeyEvent.Callback {
Request removeRequest(IBinder reqInterface) {
synchronized (this) {
Request req = mActiveRequests.get(reqInterface);
if (req != null) {
mActiveRequests.remove(req);
}
return req;
return mActiveRequests.remove(reqInterface);
}
}