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