enterprise 3.0
This commit is contained in:
parent
cdb994d5e3
commit
3527c80e7b
@ -19,13 +19,15 @@ public class OnBaseListener implements Base {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(int l, String s) {
|
public void onError(int l, String s) {
|
||||||
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
String threadName = Thread.currentThread().getName();
|
||||||
|
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
||||||
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String s) {
|
public void onSuccess(String s) {
|
||||||
Log.i("F-OpenIMSDK(native call flutter)", "method: 【 " + call.method + " 】, onSuccess: " + s);
|
String threadName = Thread.currentThread().getName();
|
||||||
|
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onSuccess: " + s);
|
||||||
CommonUtil.runMainThreadReturn(result, s);
|
CommonUtil.runMainThreadReturn(result, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ public class CommonUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public synchronized static <T> void emitEvent(String method, String type, Object errCode, String errMsg, T data) {
|
public synchronized static <T> void emitEvent(String method, String type, Object errCode, String errMsg, T data) {
|
||||||
|
String threadName = Thread.currentThread().getName();
|
||||||
runMainThread(() -> {
|
runMainThread(() -> {
|
||||||
Map<String, Object> res = new ArrayMap<>();
|
Map<String, Object> res = new ArrayMap<>();
|
||||||
if (null != type) {
|
if (null != type) {
|
||||||
@ -47,7 +48,7 @@ public class CommonUtil {
|
|||||||
if (null != errMsg) {
|
if (null != errMsg) {
|
||||||
res.put("errMsg", errMsg);
|
res.put("errMsg", errMsg);
|
||||||
}
|
}
|
||||||
Log.i("F-OpenIMSDK(native call flutter)", "{ method:" + method + ", type:" + type + " }");
|
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " { method:" + method + ", type:" + type + " }");
|
||||||
FlutterOpenimSdkPlugin.channel.invokeMethod(method, res);
|
FlutterOpenimSdkPlugin.channel.invokeMethod(method, res);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user