Skip to content

Commit f21b675

Browse files
author
371718330@qq.com
committed
修改单例写法
1 parent e1a8c37 commit f21b675

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CommonUtil/src/main/java/com/jingewenku/abrahamcaijin/commonutil/AppDavikActivityMgr.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ public class AppDavikActivityMgr {
3131
*/
3232
public static AppDavikActivityMgr getScreenManager() {
3333
if (instance == null) {
34-
instance = new AppDavikActivityMgr();
34+
synchronized (AppDavikActivityMgr.class){
35+
if (instance == null) {
36+
instance = new AppDavikActivityMgr();
37+
}
38+
}
3539
}
3640
return instance;
3741
}

0 commit comments

Comments
 (0)