From 8ef92bd311e6faf602c9705db663abd451590fff Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 17 Mar 2015 21:22:49 -0700 Subject: Frameworks/base: Fix request removal in VoiceInteractionSession Fix and simplify removeRequest. Bug: 19797138 Change-Id: I0eca877e3109c9f39cebd4c888f166ce334fcc0e --- core/java/android/service/voice/VoiceInteractionSession.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/java/android/service/voice/VoiceInteractionSession.java b/core/java/android/service/voice/VoiceInteractionSession.java index 749f8138e9ad..d7512664da45 100644 --- a/core/java/android/service/voice/VoiceInteractionSession.java +++ b/core/java/android/service/voice/VoiceInteractionSession.java @@ -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); } } -- cgit v1.2.3-59-g8ed1b