全志代码首次提交

This commit is contained in:
2025-11-06 10:55:48 +08:00
commit fc767791f3
299 changed files with 26337 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
package com.android.eventbaus;
import org.greenrobot.eventbus.EventBus;
public class EventBusUtils {
public static void registerEventBus(Object subscriber){
if(!EventBus.getDefault().isRegistered(subscriber)){
EventBus.getDefault().register(subscriber);
}
}
public static void unRegisterEventBus(Object subscriber){
if(EventBus.getDefault().isRegistered(subscriber)){
EventBus.getDefault().unregister(subscriber);
}
}
public static void postMsg(MessageEvent meshMsgEvent){
EventBus.getDefault().post(meshMsgEvent);
}
public static void postSticky(MessageEvent meshMsgEvent){
EventBus.getDefault().postSticky(meshMsgEvent);
}
public static void removeStickEvent(MessageEvent meshMsgEvent){
EventBus.getDefault().removeStickyEvent(meshMsgEvent);
}
}