From cc6023291bc94a229b53d7c2d83bf2b39bbfa9a0 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期日, 27 三月 2022 21:27:29 +0800
Subject: [PATCH] 华尔思线上版本库

---
 HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/event/EventDispatcher.java |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/event/EventDispatcher.java b/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/event/EventDispatcher.java
index 9316f07..172ed9b 100644
--- a/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/event/EventDispatcher.java
+++ b/HDLSDK/hdl-common/src/main/java/com/hdl/sdk/common/event/EventDispatcher.java
@@ -4,6 +4,7 @@
 import androidx.collection.ArrayMap;
 
 
+import com.hdl.sdk.common.utils.LogUtils;
 import com.hdl.sdk.common.utils.ThreadToolUtils;
 
 import java.util.ArrayList;
@@ -32,12 +33,12 @@
     private EventDispatcher() {
     }
 
-    private static class SingletonInstance {
-        private static final EventDispatcher INSTANCE = new EventDispatcher();
-    }
+//    private static class SingletonInstance {
+        private static final EventDispatcher instance = new EventDispatcher();
+//    }
 
     public static EventDispatcher getInstance() {
-        return SingletonInstance.INSTANCE;
+        return instance;
     }
 
     public synchronized void register(Object tag, EventListener listener) {
@@ -77,12 +78,13 @@
                             EVENT.remove(tag);
                         }
                     } catch (Exception ignored) {
-
+                        LogUtils.e("绉婚櫎event寮傚父1锛�"+ignored.getMessage());
                     }
-
                 }
             });
-        }catch (Exception e){}
+        }catch (Exception e){
+            LogUtils.e("绉婚櫎event寮傚父2锛�"+e.getMessage());
+        }
     }
 
     public synchronized void remove(Object tag, EventListener listener) {
@@ -99,12 +101,14 @@
                             }
                         }
                     } catch (Exception ignored) {
-
+                        LogUtils.e("绉婚櫎event寮傚父1锛�"+ignored.getMessage());
                     }
 
                 }
             });
-        }catch (Exception e){}
+        }catch (Exception e){
+            LogUtils.e("绉婚櫎event寮傚父2锛�"+e.getMessage());
+        }
     }
 
 
@@ -165,12 +169,14 @@
                             ALL_TOPICS_EVENT.remove(listener);
                         }
                     } catch (Exception ignored) {
-
+                        LogUtils.e("绉婚櫎event寮傚父1锛�" + ignored.getMessage());
                     }
 
                 }
             });
-        }catch (Exception e){}
+        } catch (Exception e) {
+            LogUtils.e("绉婚櫎event寮傚父2锛�" + e.getMessage());
+        }
     }
 
     public synchronized void clear() {

--
Gitblit v1.8.0