mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-12 16:57:46 +00:00
Optimize map operations
This commit is contained in:
@@ -17,10 +17,9 @@ public class CallbackHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void unRegister(Event event) {
|
public static void unRegister(Event event) {
|
||||||
HashSet<EventListener> list = listeners.get(event);
|
HashSet<EventListener> list = listeners.remove(event);
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
list.clear();
|
list.clear();
|
||||||
listeners.remove(event);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user