提交 c890c92a 编写于 作者: B Blankj

see 05/05 log

上级 4305698d
......@@ -42,7 +42,7 @@ public class BaseApplication extends Application {
initLeakCanary();
initLog();
initCrash();
// MessengerUtils.init();
// BusUtils.init();
}
private void initLeakCanary() {// 内存泄露检查工具
......
......@@ -23,7 +23,7 @@ class UtilCodeApp : BaseApplication() {
Utils.init(this)
super.onCreate()
instance = this
// MessengerUtils.registerClient("com.blankj.androidutilcode")
// BusUtils.registerClient("com.blankj.androidutilcode")
}
}
......
......@@ -346,17 +346,17 @@ public final class BusUtils {
try {
mServer.send(msg);
} catch (RemoteException e) {
Log.e("MessengerUtils", "onServiceConnected: ", e);
Log.e("BusUtils", "onServiceConnected: ", e);
}
sendCachedMsg2Server();
}
@Override
public void onServiceDisconnected(ComponentName name) {
Log.w("MessengerUtils", "client service disconnected:" + name);
Log.w("BusUtils", "client service disconnected:" + name);
mServer = null;
if (!bind()) {
Log.e("MessengerUtils", "client service rebind failed: " + name);
Log.e("BusUtils", "client service rebind failed: " + name);
}
}
};
......@@ -376,11 +376,11 @@ public final class BusUtils {
intent.setPackage(mPkgName);
return Utils.getApp().bindService(intent, mConn, Context.BIND_AUTO_CREATE);
} else {
Log.e("MessengerUtils", "bind: the app is not running -> " + mPkgName);
Log.e("BusUtils", "bind: the app is not running -> " + mPkgName);
return false;
}
} else {
Log.e("MessengerUtils", "bind: the app is not installed -> " + mPkgName);
Log.e("BusUtils", "bind: the app is not installed -> " + mPkgName);
return false;
}
}
......@@ -391,7 +391,7 @@ public final class BusUtils {
try {
mServer.send(msg);
} catch (RemoteException e) {
Log.e("MessengerUtils", "unbind: ", e);
Log.e("BusUtils", "unbind: ", e);
}
Utils.getApp().unbindService(mConn);
}
......@@ -425,7 +425,7 @@ public final class BusUtils {
mServer.send(msg);
return true;
} catch (RemoteException e) {
Log.e("MessengerUtils", "send2Server: ", e);
Log.e("BusUtils", "send2Server: ", e);
return false;
}
}
......
......@@ -53,7 +53,7 @@ class BusRemoteActivity : BaseTitleActivity() {
override fun doBusiness() {
BusUtils.subscribe(BUS_KEY, object : BusUtils.MessageCallback {
override fun onMsgCallBack(data: Bundle?) {
LogUtils.eTag("MessengerUtils", data)
LogUtils.eTag("BusUtils", data)
}
})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册