From c44ae5888ca7bc921f12bf300fa53eda31267042 Mon Sep 17 00:00:00 2001 From: tonymanou Date: Sun, 29 Jan 2017 20:27:52 +0100 Subject: [PATCH] Optimize map operations --- .../main/java/com/topjohnwu/magisk/utils/CallbackHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java b/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java index 65e994006..cfc5a3e57 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java @@ -17,10 +17,9 @@ public class CallbackHandler { } public static void unRegister(Event event) { - HashSet list = listeners.get(event); + HashSet list = listeners.remove(event); if (list != null) { list.clear(); - listeners.remove(event); } }