[Change]
发布新版本1.4.5.10 替换Logger为原生Log,防止过度调用Logger 同步synchronized获取堆栈信息导致卡顿
This commit is contained in:
@@ -5,7 +5,6 @@ import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.live.listener.ILiveStatusListener;
|
||||
import com.mogo.cloud.live.manager.LiveStreamManagerImpl;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
@@ -122,23 +121,23 @@ public class LivePlayAndPushActivity extends BaseLiveActivity
|
||||
|
||||
@Override
|
||||
public void onLive(String liveSn) {
|
||||
Logger.d(TAG, "开始直播 onLive");
|
||||
Log.d(TAG, "开始直播 onLive");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFirstFrame() {
|
||||
textureView.setVisibility(View.VISIBLE);
|
||||
Logger.d(TAG, "onFirstFrame");
|
||||
Log.d(TAG, "onFirstFrame");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisConnect() {
|
||||
Logger.d(TAG, "失去连接 onDisConnect");
|
||||
Log.d(TAG, "失去连接 onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Logger.d(TAG, "发生错误 onError msg: " + errorMsg);
|
||||
Log.d(TAG, "发生错误 onError msg: " + errorMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.cloud;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@@ -11,7 +12,6 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.passport.IMoGoTokenCallback;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
@@ -121,34 +121,34 @@ public class MainActivity extends AppCompatActivity {
|
||||
MoGoAiCloudTrafficLive.viewDesignativeIntersectionLive("556834859_trafficcamera_100514_89", new ITrafficIntersectionLiveCallBack() {
|
||||
@Override
|
||||
public void liveUrlResult(String liveUrl) {
|
||||
Logger.i(TAG, "liveUrl : " + liveUrl);
|
||||
Log.i(TAG, "liveUrl : " + liveUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Logger.e(TAG, "errorMsg : " + errorMsg);
|
||||
Log.e(TAG, "errorMsg : " + errorMsg);
|
||||
}
|
||||
});
|
||||
// MoGoAiCloudTrafficLive.viewDesignativeIntersectionLive("POLE1617103029423", new ITrafficIntersectionLiveCallBack() {
|
||||
// @Override
|
||||
// public void liveUrlResult(String liveUrl) {
|
||||
// Logger.d(TAG, "liveUrl : " + liveUrl);
|
||||
// Log.d(TAG, "liveUrl : " + liveUrl);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(String errorMsg) {
|
||||
// Logger.e(TAG, "errorMsg : " + errorMsg);
|
||||
// Log.e(TAG, "errorMsg : " + errorMsg);
|
||||
// }
|
||||
// });
|
||||
// MoGoAiCloudTrafficLive.viewFrontIntersectionLive(40.11547, 116.22544, 60, new ITrafficIntersectionLiveCallBack() {
|
||||
// @Override
|
||||
// public void liveUrlResult(String liveUrl) {
|
||||
// Logger.d(TAG, "liveUrl : " + liveUrl);
|
||||
// Log.d(TAG, "liveUrl : " + liveUrl);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onError(String errorMsg) {
|
||||
// Logger.e(TAG, "errorMsg : " + errorMsg);
|
||||
// Log.e(TAG, "errorMsg : " + errorMsg);
|
||||
// }
|
||||
// });
|
||||
});
|
||||
@@ -158,12 +158,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
MoGoAiCloudTrafficLive.viewDesignativeIntersectionLive("556834859_trafficcamera_100514_89", new ITrafficIntersectionLiveCallBack() {
|
||||
@Override
|
||||
public void liveUrlResult(String liveUrl) {
|
||||
Logger.i(TAG, "liveUrl : " + liveUrl);
|
||||
Log.i(TAG, "liveUrl : " + liveUrl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Logger.e(TAG, "errorMsg : " + errorMsg);
|
||||
Log.e(TAG, "errorMsg : " + errorMsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -187,22 +187,22 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void onLive(String liveSn) {
|
||||
Logger.e(TAG, "liveSn : " + liveSn);
|
||||
Log.e(TAG, "liveSn : " + liveSn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFirstFrame() {
|
||||
Logger.e(TAG, "onFirstFrame");
|
||||
Log.e(TAG, "onFirstFrame");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisConnect() {
|
||||
Logger.e(TAG, "onDisConnect");
|
||||
Log.e(TAG, "onDisConnect");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String errorMsg) {
|
||||
Logger.e(TAG, "errorMsg");
|
||||
Log.e(TAG, "errorMsg");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -230,32 +230,32 @@ public class MainActivity extends AppCompatActivity {
|
||||
public void onAck(@NonNull V2XEvent event) {
|
||||
if (event instanceof V2XEvent.ForwardsWarning) {
|
||||
V2XEvent.ForwardsWarning warning = (V2XEvent.ForwardsWarning) event;
|
||||
Logger.d("V2XManager", "forward-warning<->onAck::" + warning.toString());
|
||||
Log.d("V2XManager", "forward-warning<->onAck::" + warning.toString());
|
||||
}
|
||||
if (event instanceof V2XEvent.OptimalRoute) {
|
||||
V2XEvent.OptimalRoute route = (V2XEvent.OptimalRoute) event;
|
||||
Logger.d("V2XManager", "route<->onAck::" + route.toString());
|
||||
Log.d("V2XManager", "route<->onAck::" + route.toString());
|
||||
}
|
||||
|
||||
if (event instanceof V2XEvent.Warning) {
|
||||
V2XEvent.Warning warning = (V2XEvent.Warning) event;
|
||||
Logger.d("V2XManager", "warning<->onAck::" + warning.toString());
|
||||
Log.d("V2XManager", "warning<->onAck::" + warning.toString());
|
||||
}
|
||||
|
||||
if (event instanceof V2XEvent.Road) {
|
||||
V2XEvent.Road road = (V2XEvent.Road) event;
|
||||
Logger.d("V2XManager", "road<-->onAck::" + road.toString());
|
||||
Log.d("V2XManager", "road<-->onAck::" + road.toString());
|
||||
}
|
||||
|
||||
if (event instanceof V2XEvent.Marker) {
|
||||
V2XEvent.Marker marker = (V2XEvent.Marker) event;
|
||||
Logger.d("V2XManager", "marker<-->onAck::" + marker.toString());
|
||||
Log.d("V2XManager", "marker<-->onAck::" + marker.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(@NonNull String s) {
|
||||
Logger.d("V2XManager", "onFail::" + s);
|
||||
Log.d("V2XManager", "onFail::" + s);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.mogo.cloud.location;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.tanlu.bean.location.MogoLocation;
|
||||
|
||||
@Keep
|
||||
public class MogoLocationInfoServices {
|
||||
|
||||
private static final String TAG = "MogoLocationInfoServices-sdk";
|
||||
private static final String TAG = "LocationInfoServices";
|
||||
|
||||
private static volatile MogoLocationInfoServices sInstance;
|
||||
private MogoLocation mLocation;
|
||||
@@ -44,16 +44,16 @@ public class MogoLocationInfoServices {
|
||||
|
||||
public void start() {
|
||||
LocationManager.getInstance().start();
|
||||
Logger.d(TAG, "sdk - start");
|
||||
Log.d(TAG, "sdk - start");
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
LocationManager.getInstance().stop();
|
||||
Logger.d(TAG, "sdk - stop");
|
||||
Log.d(TAG, "sdk - stop");
|
||||
}
|
||||
|
||||
public void init(Context context) {
|
||||
LocationManager.getInstance().init(context);
|
||||
Logger.d(TAG, "sdk - init");
|
||||
Log.d(TAG, "sdk - init");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.cloud.live.manager;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.network.utils.GsonUtil;
|
||||
import com.mogo.cloud.live.model.BaseData;
|
||||
import com.mogo.cloud.live.model.CameraStatusModel;
|
||||
@@ -72,22 +73,22 @@ public class CameraStatusManager {
|
||||
.subscribe(new Observer<BaseData>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Logger.d(TAG, "上传摄像头状态 onSubscribe");
|
||||
Log.d(TAG, "上传摄像头状态 onSubscribe");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseData baseData) {
|
||||
Logger.d(TAG, "上传摄像头状态 onNext");
|
||||
Log.d(TAG, "上传摄像头状态 onNext");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Logger.e(TAG, "上传摄像头状态 onError");
|
||||
Log.e(TAG, "上传摄像头状态 onError");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Logger.d(TAG, "上传摄像头状态 onComplete");
|
||||
Log.d(TAG, "上传摄像头状态 onComplete");
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -4,8 +4,8 @@ import android.app.Application;
|
||||
import android.media.AudioFormat;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.live.listener.ILiveRoomPersonListener;
|
||||
import com.mogo.cloud.live.listener.ILiveStatusListener;
|
||||
import com.mogo.cloud.live.model.CommandModel;
|
||||
@@ -81,7 +81,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager, ILiveRoomPerso
|
||||
|
||||
@Override
|
||||
public void onMsgReceived(int msgType, CommandModel obj) {
|
||||
Logger.i(TAG, "onMsgReceived: obj=" + obj + " systemClock :" + SystemClock.elapsedRealtime() + " SystemTime : " + System.currentTimeMillis());
|
||||
Log.i(TAG, "onMsgReceived: obj=" + obj + " systemClock :" + SystemClock.elapsedRealtime() + " SystemTime : " + System.currentTimeMillis());
|
||||
livePushHandler(obj.getType(), obj.getVideoChannel());
|
||||
}
|
||||
});
|
||||
@@ -133,19 +133,19 @@ public class LiveStreamManagerImpl implements ILiveStreamManager, ILiveRoomPerso
|
||||
|
||||
@Override
|
||||
public void startLiveStream() {
|
||||
Logger.i(TAG, "startLiveStream");
|
||||
Log.i(TAG, "startLiveStream");
|
||||
PushService.startService(mApplication, PushService.ACTION_START_RTMP_PUSH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopLiveStream() {
|
||||
Logger.i(TAG, "stopLiveStream");
|
||||
Log.i(TAG, "stopLiveStream");
|
||||
PushService.startService(mApplication, PushService.ACTION_STOP_RTMP_PUSH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadCamStatus(int frontStatus, int backStatus) {
|
||||
Logger.i(TAG, "上传摄像头状态 frontStatus is:" + frontStatus + " backStatus is:" + backStatus);
|
||||
Log.i(TAG, "上传摄像头状态 frontStatus is:" + frontStatus + " backStatus is:" + backStatus);
|
||||
sCam1AvailableStatus = frontStatus;
|
||||
sCam2AvailableStatus = backStatus;
|
||||
MsgBody msgBody = new MsgBody();
|
||||
@@ -188,7 +188,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager, ILiveRoomPerso
|
||||
* 开启摄像头状态循环检测
|
||||
*/
|
||||
private void restartCamStatusLoop() {
|
||||
Logger.i(TAG, "开启摄像头状态循环检测");
|
||||
Log.i(TAG, "开启摄像头状态循环检测");
|
||||
if (mHandlerPushCameraStatus != null) {
|
||||
mHandlerPushCameraStatus.removeCallbacks(mCamStatusRun);
|
||||
mHandlerPushCameraStatus.postDelayed(mCamStatusRun, PUSH_CAM_TIME);
|
||||
@@ -199,7 +199,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager, ILiveRoomPerso
|
||||
* 开启房间人数检测
|
||||
*/
|
||||
private void restartCheckOnlineNumLoop() {
|
||||
Logger.i(TAG, "开启房间人数检测");
|
||||
Log.i(TAG, "开启房间人数检测");
|
||||
if (mHandlerCheckOnlineNum != null) {
|
||||
mHandlerCheckOnlineNum.removeCallbacks(mOnlineNumRun);
|
||||
mHandlerCheckOnlineNum.postDelayed(mOnlineNumRun, PUSH_CHECK_TIME);
|
||||
@@ -210,7 +210,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager, ILiveRoomPerso
|
||||
* 循环同步摄像头状态
|
||||
*/
|
||||
private final Runnable mCamStatusRun = () -> {
|
||||
Logger.i(TAG, "循环同步摄像头状态");
|
||||
Log.i(TAG, "循环同步摄像头状态");
|
||||
uploadCamStatus(sCam1AvailableStatus, sCam2AvailableStatus);
|
||||
restartCamStatusLoop();
|
||||
};
|
||||
@@ -220,7 +220,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager, ILiveRoomPerso
|
||||
*/
|
||||
private final Runnable mOnlineNumRun = () -> {
|
||||
// 判断当前观众的个数,如果没人观看了的情况则停止直播
|
||||
Logger.i(TAG, "直播状态为:" + mMoGoLiveManager.getLiveStatusModel().isPushing() +
|
||||
Log.i(TAG, "直播状态为:" + mMoGoLiveManager.getLiveStatusModel().isPushing() +
|
||||
" 观众人数:" + mMoGoLiveManager.getLiveStatusModel().getOnlineNumber());
|
||||
|
||||
if (mMoGoLiveManager.getLiveStatusModel().isPushing() &&
|
||||
@@ -256,7 +256,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager, ILiveRoomPerso
|
||||
// 记录直播状态
|
||||
sCam1LiveStatus = status;
|
||||
} else {
|
||||
Logger.e(TAG, "目前只支持前置行车记录仪");
|
||||
Log.e(TAG, "目前只支持前置行车记录仪");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -5,10 +5,10 @@ import static im.zego.zegoexpress.constants.ZegoRoomState.DISCONNECTED;
|
||||
|
||||
import android.app.Application;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.TextureView;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.live.listener.ILiveCurrentRoomStatusListener;
|
||||
import com.mogo.cloud.live.listener.ILiveMultiRoomStatusListener;
|
||||
import com.mogo.cloud.live.listener.ILiveProgressListener;
|
||||
@@ -140,7 +140,7 @@ public class MoGoLiveManager {
|
||||
}
|
||||
|
||||
private MoGoLiveManager() {
|
||||
Logger.i(TAG, "初始化 MoGoLiveManager");
|
||||
Log.i(TAG, "初始化 MoGoLiveManager");
|
||||
mLiveStatusModel = new LiveStatusModel();
|
||||
|
||||
zeGoRoomConfig = new ZegoRoomConfig();
|
||||
@@ -182,7 +182,7 @@ public class MoGoLiveManager {
|
||||
@Override
|
||||
public void onDebugError(int errorCode, String funcName, String info) {
|
||||
super.onDebugError(errorCode, funcName, info);
|
||||
Logger.i(TAG, "调试错误信息回调 onDebugError errorCode : " + errorCode);
|
||||
Log.i(TAG, "调试错误信息回调 onDebugError errorCode : " + errorCode);
|
||||
for (ILiveProgressListener iLiveProgressListener : mProgressListener) {
|
||||
iLiveProgressListener.onDebugError(errorCode, funcName, info);
|
||||
}
|
||||
@@ -197,7 +197,7 @@ public class MoGoLiveManager {
|
||||
@Override
|
||||
public void onEngineStateUpdate(ZegoEngineState state) {
|
||||
super.onEngineStateUpdate(state);
|
||||
Logger.i(TAG, "音视频引擎状态更新回调 onEngineStateUpdate state : " + state.name());
|
||||
Log.i(TAG, "音视频引擎状态更新回调 onEngineStateUpdate state : " + state.name());
|
||||
if (state == ZegoEngineState.START) {
|
||||
for (ILiveProgressListener iLiveProgressListener : mProgressListener) {
|
||||
iLiveProgressListener.onEngineStart();
|
||||
@@ -215,7 +215,7 @@ public class MoGoLiveManager {
|
||||
super.onRoomStateUpdate(roomID, state, errorCode, extendedData);
|
||||
// 这里回调的是当前用户的房间状态
|
||||
if (mLiveStatusModel.getCurrentRoomId().equals(roomID)) {
|
||||
Logger.i(TAG, "房间状态变化通知 onRoomStateUpdate currentRoomId : " + roomID +
|
||||
Log.i(TAG, "房间状态变化通知 onRoomStateUpdate currentRoomId : " + roomID +
|
||||
" state:" + state +
|
||||
" errorCode:" + errorCode +
|
||||
" extendedData:" + extendedData.toString());
|
||||
@@ -239,7 +239,7 @@ public class MoGoLiveManager {
|
||||
//errorCode 不为 0 时,房间状态异常,完整错误状态可参考错误码说明 https://doc-zh.zego.im/article/4378
|
||||
// 处理被踢掉的情况
|
||||
if (errorCode != 0) {
|
||||
Logger.w(TAG, "用户被踢出房间,尝试再次登录……");
|
||||
Log.w(TAG, "用户被踢出房间,尝试再次登录……");
|
||||
if (errorCode == 1002053) {
|
||||
//房间连接断开并且重试超时
|
||||
//此时可以在业务中退出房间/直播间/课堂,或者手动调用接口再次登录
|
||||
@@ -260,7 +260,7 @@ public class MoGoLiveManager {
|
||||
}
|
||||
// 这里回调的是登录的他人房间的状态
|
||||
if (mLiveStatusModel.getMultiRoomId().equals(roomID)) {
|
||||
Logger.i(TAG, "这里回调的是登录的他人房间的状态 onRoomStateUpdate multiRoomId : " + roomID +
|
||||
Log.i(TAG, "这里回调的是登录的他人房间的状态 onRoomStateUpdate multiRoomId : " + roomID +
|
||||
" state:" + state +
|
||||
" errorCode:" + errorCode +
|
||||
" extendedData:" + extendedData.toString());
|
||||
@@ -294,7 +294,7 @@ public class MoGoLiveManager {
|
||||
if (count > 2) {
|
||||
PushService.startService(mApplication, PushService.ACTION_START_RTMP_PUSH);
|
||||
}
|
||||
Logger.i(TAG, "房间内当前在线用户数量回调 onRoomOnlineUserCountUpdate roomID : " + roomID +
|
||||
Log.i(TAG, "房间内当前在线用户数量回调 onRoomOnlineUserCountUpdate roomID : " + roomID +
|
||||
" , online user number : " + mLiveStatusModel.getOnlineNumber());
|
||||
for (ILiveRoomPersonListener iLiveRoomPersonListener : mRoomPersonListener) {
|
||||
if (iLiveRoomPersonListener != null) {
|
||||
@@ -317,7 +317,7 @@ public class MoGoLiveManager {
|
||||
mLiveStatusModel.setOnlineNumber(mLiveStatusModel.getOnlineNumber() - userList.size());
|
||||
}
|
||||
|
||||
Logger.i(TAG, "房间内其他用户增加或减少的通知回调 onRoomUserUpdate roomId : " + roomID +
|
||||
Log.i(TAG, "房间内其他用户增加或减少的通知回调 onRoomUserUpdate roomId : " + roomID +
|
||||
" , updateType : " + updateType.name() +
|
||||
" , online user number : " + mLiveStatusModel.getOnlineNumber());
|
||||
for (ILiveRoomPersonListener iLiveRoomPersonListener : mRoomPersonListener) {
|
||||
@@ -338,7 +338,7 @@ public class MoGoLiveManager {
|
||||
if (mLiveStatusModel.getCurrentStreamId().equals(streamID)) {
|
||||
// 判断不是非推流状态则为推流
|
||||
mLiveStatusModel.setPushing(state != ZegoPublisherState.NO_PUBLISH);
|
||||
Logger.i(TAG, "推流状态回调 onPublisherStateUpdate streamID : " + streamID +
|
||||
Log.i(TAG, "推流状态回调 onPublisherStateUpdate streamID : " + streamID +
|
||||
" , isPushing : " + mLiveStatusModel.isPushing() +
|
||||
" , state : " + state.name() +
|
||||
" , errorCode : " + errorCode +
|
||||
@@ -369,7 +369,7 @@ public class MoGoLiveManager {
|
||||
if (mMediaPlayerStateListener != null && errorCode != 0) {
|
||||
mMediaPlayerStateListener.onPullStreamError(errorCode);
|
||||
}
|
||||
Logger.i(TAG, " 拉流状态变更回调 onPlayerStateUpdate streamId : " + streamID +
|
||||
Log.i(TAG, " 拉流状态变更回调 onPlayerStateUpdate streamId : " + streamID +
|
||||
" , isPlaying : " + mLiveStatusModel.isPlaying() +
|
||||
" , state : " + state.name() +
|
||||
" , errorCode : " + errorCode +
|
||||
@@ -387,19 +387,19 @@ public class MoGoLiveManager {
|
||||
@Override
|
||||
public void onPlayerRecvAudioFirstFrame(String streamID) {
|
||||
super.onPlayerRecvAudioFirstFrame(streamID);
|
||||
Logger.d(TAG, "onPlayerRecvAudioFirstFrame");
|
||||
Log.d(TAG, "onPlayerRecvAudioFirstFrame");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerRenderVideoFirstFrame(String streamID) {
|
||||
super.onPlayerRenderVideoFirstFrame(streamID);
|
||||
Logger.d(TAG, "onPlayerRenderVideoFirstFrame");
|
||||
Log.d(TAG, "onPlayerRenderVideoFirstFrame");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerRecvVideoFirstFrame(String streamID) {
|
||||
super.onPlayerRecvVideoFirstFrame(streamID);
|
||||
Logger.d(TAG, "onPlayerRecvVideoFirstFrame");
|
||||
Log.d(TAG, "onPlayerRecvVideoFirstFrame");
|
||||
if (mMediaPlayerStateListener != null) {
|
||||
mMediaPlayerStateListener.onVideoFirstFrame();
|
||||
}
|
||||
@@ -409,7 +409,7 @@ public class MoGoLiveManager {
|
||||
public void onRemoteCameraStateUpdate(String streamID, ZegoRemoteDeviceState state) {
|
||||
super.onRemoteCameraStateUpdate(streamID, state);
|
||||
if (state != OPEN) {
|
||||
Logger.e(TAG, "onRemoteCameraStateUpdate:" + state);
|
||||
Log.e(TAG, "onRemoteCameraStateUpdate:" + state);
|
||||
if (mMediaPlayerStateListener != null) {
|
||||
mMediaPlayerStateListener.remoteDeviceError();
|
||||
}
|
||||
@@ -419,7 +419,7 @@ public class MoGoLiveManager {
|
||||
@Override
|
||||
public void onDeviceError(int errorCode, String deviceName) {
|
||||
super.onDeviceError(errorCode, deviceName);
|
||||
Logger.e(TAG, "onDeviceError:" + errorCode);
|
||||
Log.e(TAG, "onDeviceError:" + errorCode);
|
||||
if (mMediaPlayerStateListener != null && errorCode != 0) {
|
||||
mMediaPlayerStateListener.onDeviceError(errorCode);
|
||||
}
|
||||
@@ -484,7 +484,7 @@ public class MoGoLiveManager {
|
||||
* 初始化自定义采集
|
||||
*/
|
||||
public void initExpressEngine() {
|
||||
Logger.i(TAG, "initCustomVideoCapture 初始化引擎");
|
||||
Log.i(TAG, "initCustomVideoCapture 初始化引擎");
|
||||
mLiveStatusModel.setExpressEngineCanUse(true);
|
||||
// 创建 enging 对象, appID, appSign 为开发者在 ZEGO 管理控制台申请的凭证信息,
|
||||
// 未上线的开发者 isTestEnvironment 为 true, application 为安卓应用的上下文
|
||||
@@ -559,14 +559,14 @@ public class MoGoLiveManager {
|
||||
@Override
|
||||
public void onStart(ZegoPublishChannel channel) {
|
||||
super.onStart(channel);
|
||||
Logger.i(TAG, "SDK 通知将要开始采集视频帧 setCustomVideoCaptureHandler onStart");
|
||||
Log.i(TAG, "SDK 通知将要开始采集视频帧 setCustomVideoCaptureHandler onStart");
|
||||
mLiveStatusModel.setCaptureStatus(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop(ZegoPublishChannel channel) {
|
||||
super.onStop(channel);
|
||||
Logger.i(TAG, "SDK 通知将要停止采集视频帧 setCustomVideoCaptureHandler onStop");
|
||||
Log.i(TAG, "SDK 通知将要停止采集视频帧 setCustomVideoCaptureHandler onStop");
|
||||
mLiveStatusModel.setCaptureStatus(false);
|
||||
}
|
||||
});
|
||||
@@ -587,7 +587,7 @@ public class MoGoLiveManager {
|
||||
}
|
||||
mLiveStatusModel.setCurrentRoomId(ROOM_ID_PREFIX + userId);
|
||||
mLiveStatusModel.setCurrentStreamId(STREAM_ID_PREFIX + userId);
|
||||
Logger.i(TAG,
|
||||
Log.i(TAG,
|
||||
"尝试进入自己房间 loginRoom userId : " + userId
|
||||
+ " currentRoomId:" + mLiveStatusModel.getCurrentRoomId()
|
||||
+ " currentStreamId:" + mLiveStatusModel.getCurrentStreamId());
|
||||
@@ -601,20 +601,20 @@ public class MoGoLiveManager {
|
||||
* 退出自己房间
|
||||
*/
|
||||
public synchronized void logoutCurrentRoom() {
|
||||
Logger.i(TAG, "尝试退出自己房间 logoutRoom : " + mLiveStatusModel.getCurrentRoomId());
|
||||
Log.i(TAG, "尝试退出自己房间 logoutRoom : " + mLiveStatusModel.getCurrentRoomId());
|
||||
if (mExpressEngine != null) {
|
||||
if (!mLiveStatusModel.isLoginCurrentRoom()) {
|
||||
Logger.w(TAG, "还未登录自己房间");
|
||||
Log.w(TAG, "还未登录自己房间");
|
||||
return;
|
||||
}
|
||||
if (mLiveStatusModel.isPlaying()) {
|
||||
Logger.w(TAG, "处于播放中,不可退出房间");
|
||||
Log.w(TAG, "处于播放中,不可退出房间");
|
||||
return;
|
||||
}
|
||||
Logger.i(TAG, "执行退出房间操作");
|
||||
Log.i(TAG, "执行退出房间操作");
|
||||
mExpressEngine.logoutRoom(mLiveStatusModel.getCurrentRoomId());
|
||||
} else {
|
||||
Logger.w(TAG, "ZeGo 引擎未初始化");
|
||||
Log.w(TAG, "ZeGo 引擎未初始化");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,14 +629,14 @@ public class MoGoLiveManager {
|
||||
}
|
||||
mLiveStatusModel.setMultiRoomId(ROOM_ID_PREFIX + otherRoomId);
|
||||
mLiveStatusModel.setMultiStreamId(STREAM_ID_PREFIX + otherRoomId);
|
||||
Logger.i(TAG,
|
||||
Log.i(TAG,
|
||||
"尝试进入多房间 loginMultiRoom multiRoomId : " + mLiveStatusModel.getMultiRoomId()
|
||||
+ " currentStreamId : " + mLiveStatusModel.getMultiStreamId());
|
||||
// if (!mLiveStatusModel.isLoginMultiRoom()) {
|
||||
Logger.i(TAG, "执行登录多房间");
|
||||
Log.i(TAG, "执行登录多房间");
|
||||
mExpressEngine.loginRoom(mLiveStatusModel.getMultiRoomId(), zegoUserCurrent, zeGoRoomConfig);
|
||||
// } else {
|
||||
// Logger.w(TAG, "已经登录了多房间");
|
||||
// Log.w(TAG, "已经登录了多房间");
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -644,16 +644,16 @@ public class MoGoLiveManager {
|
||||
* 退出多房间
|
||||
*/
|
||||
public synchronized void logoutMultiRoom(String sn) {
|
||||
Logger.i(TAG, "尝试退出多房间 logoutMultiRoom multiRoomId : " + mLiveStatusModel.getMultiRoomId());
|
||||
Log.i(TAG, "尝试退出多房间 logoutMultiRoom multiRoomId : " + mLiveStatusModel.getMultiRoomId());
|
||||
if (mExpressEngine != null) {
|
||||
// if (mLiveStatusModel.isLoginMultiRoom()) {
|
||||
Logger.i(TAG, "执行退出多房间");
|
||||
Log.i(TAG, "执行退出多房间");
|
||||
mExpressEngine.logoutRoom(ROOM_ID_PREFIX + sn);
|
||||
// } else {
|
||||
// Logger.w(TAG, "还未登录多房间");
|
||||
// Log.w(TAG, "还未登录多房间");
|
||||
// }
|
||||
} else {
|
||||
Logger.w(TAG, "ZeGo 引擎未初始化");
|
||||
Log.w(TAG, "ZeGo 引擎未初始化");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ public class MoGoLiveManager {
|
||||
* 开始推流到ZeGo
|
||||
*/
|
||||
public void startPublish() {
|
||||
Logger.i(TAG, "开始推流到ZeGo startPublish currentStreamId : " + mLiveStatusModel.getCurrentStreamId());
|
||||
Log.i(TAG, "开始推流到ZeGo startPublish currentStreamId : " + mLiveStatusModel.getCurrentStreamId());
|
||||
ZegoPublisherConfig config = new ZegoPublisherConfig();
|
||||
config.roomID = mLiveStatusModel.getCurrentRoomId();
|
||||
mExpressEngine.startPublishingStream(mLiveStatusModel.getCurrentStreamId(), config, ZegoPublishChannel.MAIN);
|
||||
@@ -690,7 +690,7 @@ public class MoGoLiveManager {
|
||||
* 停止推流到ZeGo
|
||||
*/
|
||||
public void stopPublish() {
|
||||
Logger.i(TAG, "停止推流到ZeGo stopPublish currentStreamId : " + mLiveStatusModel.getCurrentStreamId());
|
||||
Log.i(TAG, "停止推流到ZeGo stopPublish currentStreamId : " + mLiveStatusModel.getCurrentStreamId());
|
||||
if (mExpressEngine == null) {
|
||||
return;
|
||||
}
|
||||
@@ -708,7 +708,7 @@ public class MoGoLiveManager {
|
||||
* @param surfaceView 渲染直播的视图
|
||||
*/
|
||||
public void startLive(SurfaceView surfaceView) {
|
||||
Logger.i(TAG, "尝试开始播放直播 startLive multiStreamId : " + mLiveStatusModel.getMultiStreamId());
|
||||
Log.i(TAG, "尝试开始播放直播 startLive multiStreamId : " + mLiveStatusModel.getMultiStreamId());
|
||||
if (!TextUtils.isEmpty(mLiveStatusModel.getMultiStreamId()) &&
|
||||
mLiveStatusModel.getMultiStreamId().startsWith(STREAM_ID_PREFIX)) {
|
||||
ZegoCanvas zegoCanvas = new ZegoCanvas(surfaceView);
|
||||
@@ -719,12 +719,12 @@ public class MoGoLiveManager {
|
||||
|
||||
mExpressEngine.startPlayingStream(mLiveStatusModel.getMultiStreamId(), zegoCanvas, config);
|
||||
} else {
|
||||
Logger.e(TAG, "直播ID有误,请重试");
|
||||
Log.e(TAG, "直播ID有误,请重试");
|
||||
}
|
||||
}
|
||||
|
||||
public void startLive(TextureView textureView) {
|
||||
Logger.i(TAG, "尝试开始播放直播 startLive multiStreamId : " + mLiveStatusModel.getMultiStreamId());
|
||||
Log.i(TAG, "尝试开始播放直播 startLive multiStreamId : " + mLiveStatusModel.getMultiStreamId());
|
||||
if (!TextUtils.isEmpty(mLiveStatusModel.getMultiStreamId()) &&
|
||||
mLiveStatusModel.getMultiStreamId().startsWith(STREAM_ID_PREFIX)) {
|
||||
ZegoCanvas zegoCanvas = new ZegoCanvas(textureView);
|
||||
@@ -735,7 +735,7 @@ public class MoGoLiveManager {
|
||||
|
||||
mExpressEngine.startPlayingStream(mLiveStatusModel.getMultiStreamId(), zegoCanvas, config);
|
||||
} else {
|
||||
Logger.e(TAG, "直播ID有误,请重试");
|
||||
Log.e(TAG, "直播ID有误,请重试");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -743,9 +743,9 @@ public class MoGoLiveManager {
|
||||
* 停止播放直播
|
||||
*/
|
||||
public void stopLive(String sn) {
|
||||
Logger.i(TAG, "尝试停止播放直播 stopLive multiStreamId : " + mLiveStatusModel.getMultiStreamId());
|
||||
Log.i(TAG, "尝试停止播放直播 stopLive multiStreamId : " + mLiveStatusModel.getMultiStreamId());
|
||||
if (mExpressEngine == null) {
|
||||
Logger.w(TAG, "ZeGo 引擎未初始化");
|
||||
Log.w(TAG, "ZeGo 引擎未初始化");
|
||||
return;
|
||||
}
|
||||
// 停止播放直播流
|
||||
@@ -761,7 +761,7 @@ public class MoGoLiveManager {
|
||||
private void destroyEngine() {
|
||||
mExpressEngine.enableCustomVideoCapture(false, customVideoCaptureConfig, ZegoPublishChannel.MAIN);
|
||||
ZegoExpressEngine.destroyEngine(() -> {
|
||||
Logger.i(TAG, "销毁ZeGo引擎");
|
||||
Log.i(TAG, "销毁ZeGo引擎");
|
||||
mLiveStatusModel.setExpressEngineCanUse(false);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@ package com.mogo.cloud.live.manager;
|
||||
|
||||
import static com.mogo.cloud.live.constant.LiveConstant.FRONT_CAMERA;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.mogo.cloud.live.constant.LiveConstant;
|
||||
import com.mogo.cloud.live.constant.LiveHostConst;
|
||||
@@ -13,7 +14,6 @@ import com.mogo.cloud.live.model.LiveCamera;
|
||||
import com.mogo.cloud.live.model.LivePush;
|
||||
import com.mogo.cloud.live.model.LiveReceive;
|
||||
import com.mogo.cloud.live.network.LiveApiServer;
|
||||
import com.mogo.cloud.network.NetConstants;
|
||||
import com.mogo.cloud.network.RetrofitFactory;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class RequestLiveManager {
|
||||
if (requestLiveListener != null) {
|
||||
requestLiveListener.onError(e);
|
||||
}
|
||||
Logger.e(LiveConstant.TAG, "requestDesignativeVehicleLive exception : " + e);
|
||||
Log.e(LiveConstant.TAG, "requestDesignativeVehicleLive exception : " + e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -139,7 +139,7 @@ public class RequestLiveManager {
|
||||
if (requestLiveListener != null) {
|
||||
requestLiveListener.onError(e);
|
||||
}
|
||||
Logger.e(LiveConstant.TAG, "requestFrontVehicleLive exception : " + e);
|
||||
Log.e(LiveConstant.TAG, "requestFrontVehicleLive exception : " + e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -192,7 +192,7 @@ public class RequestLiveManager {
|
||||
if (requestLiveListener != null) {
|
||||
requestLiveListener.onError(e);
|
||||
}
|
||||
Logger.e(LiveConstant.TAG, "requestFrontIntersectionLive exception : " + e);
|
||||
Log.e(LiveConstant.TAG, "requestFrontIntersectionLive exception : " + e);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -242,7 +242,7 @@ public class RequestLiveManager {
|
||||
if (requestLiveListener != null) {
|
||||
requestLiveListener.onError(e);
|
||||
}
|
||||
Logger.e(LiveConstant.TAG, "requestDesignativeIntersectionLive exception : " + e);
|
||||
Log.e(LiveConstant.TAG, "requestDesignativeIntersectionLive exception : " + e);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,8 +5,8 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.live.listener.ILiveCurrentRoomStatusListener;
|
||||
import com.mogo.cloud.live.listener.IYUVDataListener;
|
||||
import com.mogo.cloud.live.manager.CameraFrameManager;
|
||||
@@ -39,7 +39,7 @@ public class PushService extends Service
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Logger.i(TAG, "初始化推流服务……");
|
||||
Log.i(TAG, "初始化推流服务……");
|
||||
if (mLivePusher == null) {
|
||||
mLivePusher = MoGoLiveManager.getInstance();
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class PushService extends Service
|
||||
if (intent != null) {
|
||||
// 开启直播
|
||||
if (ACTION_START_RTMP_PUSH.equals(intent.getAction())) {
|
||||
Logger.i(TAG, "接收指令开启直播推送");
|
||||
Log.i(TAG, "接收指令开启直播推送");
|
||||
try {
|
||||
startPush();
|
||||
} catch (Exception e) {
|
||||
@@ -59,16 +59,16 @@ public class PushService extends Service
|
||||
}
|
||||
// 关闭直播,如果还有人观看不关闭
|
||||
else if (ACTION_STOP_RTMP_PUSH.equals(intent.getAction())) {
|
||||
Logger.i(TAG, "接受指令关闭直播推送");
|
||||
Log.i(TAG, "接受指令关闭直播推送");
|
||||
if (mLivePusher.getLiveStatusModel().getOnlineNumber() <= 1) {
|
||||
stopPush();
|
||||
} else {
|
||||
Logger.i(TAG, "房间还有 " + mLivePusher.getLiveStatusModel().getOnlineNumber() + " 位观众,不可以关闭直播");
|
||||
Log.i(TAG, "房间还有 " + mLivePusher.getLiveStatusModel().getOnlineNumber() + " 位观众,不可以关闭直播");
|
||||
}
|
||||
}
|
||||
// 强制关闭直播
|
||||
else if (ACTION_FORCED_STOP_RTMP_PUSH.equals(intent.getAction())) {
|
||||
Logger.i(TAG, "接收指令强制关闭直播推送");
|
||||
Log.i(TAG, "接收指令强制关闭直播推送");
|
||||
stopPush();
|
||||
}
|
||||
}
|
||||
@@ -90,10 +90,10 @@ public class PushService extends Service
|
||||
* 启动发布直播视频流
|
||||
*/
|
||||
private void startPush() {
|
||||
Logger.i(TAG, "startPush");
|
||||
Log.i(TAG, "startPush");
|
||||
if (mLivePusher != null
|
||||
&& mLivePusher.getLiveStatusModel().isPushing()) {
|
||||
Logger.w(TAG, "已经开启了推流,无需重复开启");
|
||||
Log.w(TAG, "已经开启了推流,无需重复开启");
|
||||
return;
|
||||
}
|
||||
if (mLivePusher != null && !mLivePusher.getLiveStatusModel().isLoginCurrentRoom()) {
|
||||
@@ -107,7 +107,7 @@ public class PushService extends Service
|
||||
}
|
||||
|
||||
private void realStartPublish() {
|
||||
Logger.i(TAG, "realStartPublish");
|
||||
Log.i(TAG, "realStartPublish");
|
||||
// 开始发布
|
||||
mLivePusher.startPublish();
|
||||
// 注册视频YUV回调监听
|
||||
@@ -155,7 +155,7 @@ public class PushService extends Service
|
||||
|
||||
@Override
|
||||
public void onCurrentRoomConnected() {
|
||||
Logger.i(TAG, "登录房间成功开启推流");
|
||||
Log.i(TAG, "登录房间成功开启推流");
|
||||
realStartPublish();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.mogo.cloud.live.socket;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.socket.IMogoCloudSocketMsgAckListener;
|
||||
import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener;
|
||||
import com.mogo.cloud.socket.SocketManager;
|
||||
@@ -43,7 +43,7 @@ public class SocketMsgUtils implements IMogoCloudSocketMsgAckListener {
|
||||
* 初始化长连接
|
||||
*/
|
||||
private void initSocket(IMogoCloudSocketOnMessageListener listener) {
|
||||
Logger.i(TAG, "初始化长连接……");
|
||||
Log.i(TAG, "初始化长连接……");
|
||||
mSocketManager = SocketManager.getInstance();
|
||||
mMessageListener = listener;
|
||||
mSocketManager.init(mContext,0,0);
|
||||
@@ -69,6 +69,6 @@ public class SocketMsgUtils implements IMogoCloudSocketMsgAckListener {
|
||||
|
||||
@Override
|
||||
public void onAck(long msgId) {
|
||||
Logger.i(TAG, "msgId=" + msgId);
|
||||
Log.i(TAG, "msgId=" + msgId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,9 @@ import android.net.ConnectivityManager;
|
||||
import android.os.Build;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@@ -79,7 +78,7 @@ public class TelephoneUtil {
|
||||
if (getMobileDataEnabledMethod != null) {
|
||||
getMobileDataEnabledMethod.setAccessible(true);
|
||||
boolean result = (Boolean) getMobileDataEnabledMethod.invoke(iConMgr);
|
||||
Logger.d("TelephoneUtil", "getMobileDataEnabled = " + result);
|
||||
Log.d("TelephoneUtil", "getMobileDataEnabled = " + result);
|
||||
return result;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -92,7 +91,7 @@ public class TelephoneUtil {
|
||||
Method getDataEnabled = telephonyService.getClass().getDeclaredMethod("getDataEnabled");
|
||||
if (null != getDataEnabled) {
|
||||
boolean result = (Boolean) getDataEnabled.invoke(telephonyService);
|
||||
Logger.d("TelephoneUtil", "getDataEnabled = " + result);
|
||||
Log.d("TelephoneUtil", "getDataEnabled = " + result);
|
||||
return result;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -119,7 +118,7 @@ public class TelephoneUtil {
|
||||
if (setMobileDataEnabledMethod != null) {
|
||||
setMobileDataEnabledMethod.setAccessible(true);
|
||||
setMobileDataEnabledMethod.invoke(iConMgr, enable);
|
||||
Logger.d("TelephoneUtil", "setMobileDataEnabled = " + enable);
|
||||
Log.d("TelephoneUtil", "setMobileDataEnabled = " + enable);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -131,7 +130,7 @@ public class TelephoneUtil {
|
||||
Method setDataEnabledMethod = telephonyService.getClass().getDeclaredMethod("setDataEnabled", boolean.class);
|
||||
if (null != setDataEnabledMethod) {
|
||||
setDataEnabledMethod.invoke(telephonyService, enable);
|
||||
Logger.d("TelephoneUtil", "setDataEnabled = " + enable);
|
||||
Log.d("TelephoneUtil", "setDataEnabled = " + enable);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.mogo.cloud.location.third;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.location.LocationConfig;
|
||||
import com.mogo.cloud.location.third.core.LocUploadConfig;
|
||||
import com.mogo.cloud.location.third.core.LocUploadManager;
|
||||
@@ -36,21 +36,21 @@ public class ThirdLocationManager {
|
||||
setContext(context.getApplicationContext()).
|
||||
setLocInterval(1000L);
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, "location sdk - init");
|
||||
Log.d(TAG, "location sdk - init");
|
||||
}
|
||||
}
|
||||
|
||||
public void start() {
|
||||
LocUploadManager.getInstance().startUpload();
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, "sdk - start");
|
||||
Log.d(TAG, "sdk - start");
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
LocUploadManager.getInstance().stopUpload();
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, "sdk - stop");
|
||||
Log.d(TAG, "sdk - stop");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.cloud.location.third.core;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.spi.AbstractDelegateManager;
|
||||
import com.elegant.spi.core.visitor.ServiceClassValue;
|
||||
import com.mogo.cloud.location.LocationConfig;
|
||||
@@ -37,7 +38,7 @@ public class LocationDelegateManager extends AbstractDelegateManager<LocationSer
|
||||
if (loaded) {
|
||||
if(locationServiceProvider != null){
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, String.format("注销 LocationServiceProvider -> %s",
|
||||
Log.d(TAG, String.format("注销 LocationServiceProvider -> %s",
|
||||
locationServiceProvider.getClass().getName()));
|
||||
}
|
||||
locationServiceProvider = null;
|
||||
@@ -52,7 +53,7 @@ public class LocationDelegateManager extends AbstractDelegateManager<LocationSer
|
||||
locationServiceProvider = ServiceClassValue.of(p, unit)
|
||||
.accept(SERVICE_CLASS_VISITOR, unit);
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, String.format("Biz id is [%s], 注册 LocationServiceProvider -> %s ",
|
||||
Log.d(TAG, String.format("Biz id is [%s], 注册 LocationServiceProvider -> %s ",
|
||||
unit, p.getName()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package com.mogo.cloud.location.third.service;
|
||||
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.utils.CheckUtils;
|
||||
import com.google.protobuf.ByteString;
|
||||
import com.mogo.cloud.location.third.core.LocUploadConfig;
|
||||
@@ -28,7 +29,7 @@ public class SocketRequestUtil {
|
||||
}
|
||||
|
||||
private static void sendPayload(byte[] payload, boolean ack, long msgId) {
|
||||
Logger.d(TAG, "Socket---sendPayload");
|
||||
Log.d(TAG, "Socket---sendPayload");
|
||||
try {
|
||||
SocketClient.getInstance().sendData(LocUploadConfig.instance().getAppId(),
|
||||
MogoCommon.Product.mogoBussiness_VALUE,
|
||||
|
||||
@@ -3,11 +3,11 @@ package com.mogo.cloud.location.third.service;
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.elegant.utils.ThreadPoolService;
|
||||
import com.elegant.utils.UiThreadHandler;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
@@ -36,7 +36,7 @@ public class UploadDataService extends Service {
|
||||
@Override
|
||||
public void update(@NonNull CallbackManager manager, @NonNull byte[] message, String appId, long msgId) {
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, " socket收到的消息 " + new String(message)
|
||||
Log.d(TAG, " socket收到的消息 " + new String(message)
|
||||
+ ", app id is " + appId
|
||||
+ ", msg id is " + msgId);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class UploadDataService extends Service {
|
||||
MogoConnsvr.Header header = MogoConnsvr.Header.parseFrom(headerBytes);
|
||||
if (header != null) {
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, "socket 收到的 onAck " + header.toString());
|
||||
Log.d(TAG, "socket 收到的 onAck " + header.toString());
|
||||
}
|
||||
}
|
||||
} catch (InvalidProtocolBufferException e) {
|
||||
@@ -133,21 +133,21 @@ public class UploadDataService extends Service {
|
||||
MogoPayload.Coordinate coordinate = SocketRequestUtil.buildBCoordinate(location);
|
||||
if (coordinate.getLat() != 0 && coordinate.getLon() != 0) {
|
||||
// if (LocationConfig.isPrintLog) {
|
||||
// Logger.d(TAG, "socket-location is " + location.toString());
|
||||
// Logger.d(TAG, "socket-coordinates.size()" + coordinates.size());
|
||||
// Log.d(TAG, "socket-location is " + location.toString());
|
||||
// Log.d(TAG, "socket-coordinates.size()" + coordinates.size());
|
||||
// }
|
||||
synchronized (coordinates) {
|
||||
coordinates.offer(coordinate);
|
||||
}
|
||||
} else {
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, "coordinates size is 0, give up uploading for Socket");
|
||||
Log.d(TAG, "coordinates size is 0, give up uploading for Socket");
|
||||
}
|
||||
}
|
||||
synchronized (coordinates) {
|
||||
while (coordinates.size() > MAX_LOCATION_CACHE_SIZE) {
|
||||
if (LocationConfig.isPrintLog) {
|
||||
Logger.d(TAG, "socket-coordinates number is " + coordinates.size());
|
||||
Log.d(TAG, "socket-coordinates number is " + coordinates.size());
|
||||
}
|
||||
coordinates.pop();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.cloud.network.interceptor
|
||||
|
||||
import com.elegant.log.simplelog.Logger
|
||||
import android.util.Log
|
||||
import com.mogo.cloud.network.NetConstants.Companion.TAG
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import okhttp3.*
|
||||
@@ -83,10 +83,10 @@ class HttpLoggingInterceptor : Interceptor {
|
||||
.append("Time: (").append(endTime).append("ms)").append("\r\n")
|
||||
.append("------> http response end")
|
||||
if (response.code() != 200) {
|
||||
Logger.e(TAG, logMsg.toString())
|
||||
Log.e(TAG, logMsg.toString())
|
||||
} else {
|
||||
if (MoGoAiCloudClientConfig.getInstance().isShowNetDebugLog) {
|
||||
Logger.d(TAG, logMsg.toString())
|
||||
Log.d(TAG, logMsg.toString())
|
||||
}
|
||||
}
|
||||
return if (consumedResponse) response.newBuilder()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.cloud.network.interceptor
|
||||
|
||||
import com.elegant.log.simplelog.Logger
|
||||
import android.util.Log
|
||||
import com.elegant.network.utils.GsonUtil
|
||||
import com.mogo.cloud.network.BaseData
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
@@ -35,7 +35,7 @@ class HttpPassportInterceptor : Interceptor {
|
||||
response?.code == 100006 ||
|
||||
response?.code == 520003
|
||||
) {
|
||||
Logger.e("HttpPassportInterceptor", "Token 异常:$response")
|
||||
Log.e("HttpPassportInterceptor", "Token 异常:$response")
|
||||
MoGoAiCloudClient.getInstance().refreshToken()
|
||||
}
|
||||
consumedResponse = true
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.mogo.cloud.passport;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
@@ -71,18 +72,18 @@ public class MoGoAiCloudClient {
|
||||
}
|
||||
|
||||
public void refreshToken() {
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "═══════════════刷新Token═════════════");
|
||||
Log.i(TAG, "═══════════════刷新Token═════════════");
|
||||
|
||||
PassportManager.getInstance().refreshToken(mContext, new IPassport() {
|
||||
@Override
|
||||
public void onSuccess(String token, String sn) {
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "═════════════════════════════════════");
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "║ PassportVersion:" + com.mogo.cloud.passport.BuildConfig.VERSION_NAME);
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "║ ThirdLoginVersion:" + com.zhidao.thirdlogin.BuildConfig.VERSION_NAME);
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "║ MoGo鉴权成功 ");
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "║ SN:" + sn);
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "║ Token:" + token);
|
||||
com.zhidao.account.sdk.utils.Logger.i(TAG, "═════════════════════════════════════");
|
||||
Log.i(TAG, "═════════════════════════════════════");
|
||||
Log.i(TAG, "║ PassportVersion:" + com.mogo.cloud.passport.BuildConfig.VERSION_NAME);
|
||||
Log.i(TAG, "║ ThirdLoginVersion:" + com.zhidao.thirdlogin.BuildConfig.VERSION_NAME);
|
||||
Log.i(TAG, "║ MoGo鉴权成功 ");
|
||||
Log.i(TAG, "║ SN:" + sn);
|
||||
Log.i(TAG, "║ Token:" + token);
|
||||
Log.i(TAG, "═════════════════════════════════════");
|
||||
|
||||
// 变量赋值
|
||||
if (mAiCloudClientConfig != null) {
|
||||
@@ -99,11 +100,11 @@ public class MoGoAiCloudClient {
|
||||
@Override
|
||||
public void onError(int code, String msg) {
|
||||
Toast.makeText(mContext, "MoGo鉴权失败", Toast.LENGTH_SHORT).show();
|
||||
com.zhidao.account.sdk.utils.Logger.e(TAG, "═════════════════════════════════════");
|
||||
com.zhidao.account.sdk.utils.Logger.e(TAG, "║ MoGo鉴权失败 ");
|
||||
com.zhidao.account.sdk.utils.Logger.e(TAG, "║ ErrorCode:" + code);
|
||||
com.zhidao.account.sdk.utils.Logger.e(TAG, "║ ErrorMessage:" + msg);
|
||||
com.zhidao.account.sdk.utils.Logger.e(TAG, "═════════════════════════════════════");
|
||||
Log.e(TAG, "═════════════════════════════════════");
|
||||
Log.e(TAG, "║ MoGo鉴权失败 ");
|
||||
Log.e(TAG, "║ ErrorCode:" + code);
|
||||
Log.e(TAG, "║ ErrorMessage:" + msg);
|
||||
Log.e(TAG, "═════════════════════════════════════");
|
||||
|
||||
//如果本地sp缓存中存在sn和token,防止在鉴权失败后引起ERROR重置本地缓存
|
||||
if (mAiCloudClientConfig.getSn() != null
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.mogo.cloud.passport;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.LogLevel;
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.passport.location.ICurrentLocation;
|
||||
|
||||
/**
|
||||
@@ -306,7 +306,7 @@ public class MoGoAiCloudClientConfig {
|
||||
*/
|
||||
public String getToken() {
|
||||
if (TextUtils.isEmpty(SpStorage.getToken())) {
|
||||
Logger.e(TAG, "本地 Token 获取失败……");
|
||||
Log.e(TAG, "本地 Token 获取失败……");
|
||||
}
|
||||
return SpStorage.getToken();
|
||||
}
|
||||
@@ -318,7 +318,7 @@ public class MoGoAiCloudClientConfig {
|
||||
*/
|
||||
public String getSn() {
|
||||
if (TextUtils.isEmpty(SpStorage.getSn())) {
|
||||
Logger.e(TAG, "本地 SN 获取失败……");
|
||||
Log.e(TAG, "本地 SN 获取失败……");
|
||||
}
|
||||
return SpStorage.getSn();
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.mogo.cloud.passport.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.passport.IPassport;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
@@ -27,7 +27,7 @@ public class InternalPassportManager {
|
||||
mAiCloudClientConfig = MoGoAiCloudClient.getInstance().getAiCloudClientConfig();
|
||||
String appId = mAiCloudClientConfig.getServiceAppId();
|
||||
if (TextUtils.isEmpty(appId)) {
|
||||
Logger.e(TAG, "需要初始化 passport AppId");
|
||||
Log.e(TAG, "需要初始化 passport AppId");
|
||||
return;
|
||||
}
|
||||
AccountClientManager.init(context.getApplicationContext(), getNetEnvironment(), BusinessType.toc_login, appId);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.mogo.cloud.passport.third;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.passport.IPassport;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
@@ -62,7 +62,7 @@ public class ThirdPassportManager {
|
||||
};
|
||||
|
||||
if (mAiCloudClientConfig.isShowDebugLog()) {
|
||||
Logger.w(TAG, "loginCallback:" + loginCallback);
|
||||
Log.w(TAG, "loginCallback:" + loginCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,10 +93,10 @@ public class ThirdPassportManager {
|
||||
thirdLoginParam,
|
||||
loginCallback);
|
||||
} else {
|
||||
Logger.e(TAG, "═════════════════════════════════════");
|
||||
Logger.e(TAG, "║ MoGo 鉴权失败 ");
|
||||
Logger.e(TAG, "║ 请配置 MoGoAiCloudClientConfig 信息");
|
||||
Logger.e(TAG, "═════════════════════════════════════");
|
||||
Log.e(TAG, "═════════════════════════════════════");
|
||||
Log.e(TAG, "║ MoGo 鉴权失败 ");
|
||||
Log.e(TAG, "║ 请配置 MoGoAiCloudClientConfig 信息");
|
||||
Log.e(TAG, "═════════════════════════════════════");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.elegant.network.utils.GsonUtil;
|
||||
import com.google.protobuf.ByteString;
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
@@ -98,7 +97,7 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
}
|
||||
if (mListeners.containsKey(msgType)) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.w(getTag(), "msgType %d is exist.", msgType);
|
||||
Log.w(getTag(), "msgType " + msgType + " is exist.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -139,7 +138,7 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
}
|
||||
if (mErrorListeners.containsKey(tag)) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.w(getTag(), "Type %d is exist.", tag);
|
||||
Log.w(getTag(), "Type " + tag + " is exist.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -160,7 +159,7 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
@Override
|
||||
public void sendMsg(String appId, int headerType, MsgBody body, IMogoCloudSocketMsgAckListener listener) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(getTag(), "sendMsg msgId : " + body.getMsgId());
|
||||
Log.d(getTag(), "sendMsg msgId : " + body.getMsgId());
|
||||
}
|
||||
|
||||
final byte[] pb = convertToPBBytes(body.getMsgType(), body.getContent());
|
||||
@@ -177,7 +176,7 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
MogoConnsvr.Payload payload = MogoConnsvr.Payload.parseFrom(message);
|
||||
int msgType = payload.getMsgType();
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(getTag(), "received msg type = %d", msgType);
|
||||
Log.d(getTag(), "received msg type = " + msgType);
|
||||
}
|
||||
|
||||
List<IMogoCloudSocketOnMessageListener> listeners = mListeners.get(msgType);
|
||||
@@ -212,7 +211,7 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
}
|
||||
if (listener != null && obj != null) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(getTag(), "received msgId = %s, msgType = %d, content = %s", msgId, msgType, obj);
|
||||
Log.d(getTag(), "received msgId = " + msgId + ", msgType = " + msgType + ", content = " + obj);
|
||||
}
|
||||
listener.onMsgReceived(msgType, obj);
|
||||
}
|
||||
@@ -220,7 +219,6 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
}
|
||||
} catch (InvalidProtocolBufferException e) {
|
||||
e.printStackTrace();
|
||||
Logger.e(getTag(), e, "parse msg error.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +244,7 @@ public class SocketManager implements IMogoCloudSocketManager {
|
||||
listener.onAck(msgId);
|
||||
}
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(getTag(), "send message success: msgId = %d msgType = %d, appId = %s, productLine = %d", msgId, msgType, appId, productLine);
|
||||
Log.d(getTag(), "send message success: msgId = " + msgId + " msgType = " + msgType + ", appId = " + appId + ", productLine = " + productLine);
|
||||
}
|
||||
} catch (InvalidProtocolBufferException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.mogo.cloud.socket.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.socket.SocketBuildConfig;
|
||||
@@ -47,7 +47,7 @@ public class InternalSocketManager implements OnSocketReceiveCallback, OnSocketA
|
||||
String appId = cloudClientConfig.getServiceAppId();
|
||||
if (TextUtils.isEmpty(appId)) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.e(TAG, "需要初始化 Socket AppId");
|
||||
Log.e(TAG, "需要初始化 Socket AppId");
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ public class InternalSocketManager implements OnSocketReceiveCallback, OnSocketA
|
||||
@Override
|
||||
public void onAck(byte[] headerBytes, byte[] payload) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(TAG, "InternalSocketManager update ack");
|
||||
Log.d(TAG, "InternalSocketManager update ack");
|
||||
}
|
||||
SocketManager.getInstance().onAck(headerBytes);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public class InternalSocketManager implements OnSocketReceiveCallback, OnSocketA
|
||||
@Override
|
||||
public void onMessageReceived(byte[] message) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(TAG, "InternalSocketManager update message");
|
||||
Log.d(TAG, "InternalSocketManager update message");
|
||||
}
|
||||
|
||||
SocketManager.getInstance().update(message, 0);
|
||||
@@ -75,12 +75,12 @@ public class InternalSocketManager implements OnSocketReceiveCallback, OnSocketA
|
||||
public void sendMsg(byte[] pb, int headerType, boolean isAck, long msgId) {
|
||||
if (mSocketConnManager.isConnected()) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(TAG, "isConnected.");
|
||||
Log.d(TAG, "isConnected.");
|
||||
}
|
||||
|
||||
mSocketConnManager.sendPayload(MSG_PRODUCT_LINE, pb, headerType, isAck, msgId);
|
||||
} else {
|
||||
Logger.e(TAG, "sendMsg error, connect is lost.");
|
||||
Log.e(TAG, "sendMsg error, connect is lost.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ import static com.mogo.cloud.socket.SocketServicesConstants.getTag;
|
||||
import static com.zhidao.socket.location.MLocation.GCJ02;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.cloud.socket.SocketBuildConfig;
|
||||
@@ -76,7 +76,7 @@ public class ThirdSocketManager implements Callback, ErrorCallback {
|
||||
@Override
|
||||
public void update(@NonNull CallbackManager manager, @NonNull byte[] message, String appId, long msgId) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(getTag(), "ThirdSocketManager update message");
|
||||
Log.d(getTag(), "ThirdSocketManager update message");
|
||||
}
|
||||
SocketManager.getInstance().update(message, msgId);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class ThirdSocketManager implements Callback, ErrorCallback {
|
||||
@Override
|
||||
public void onAck(@NonNull CallbackManager manager, @NonNull byte[] header, byte[] content) {
|
||||
if (SocketBuildConfig.isPrintLog) {
|
||||
Logger.d(getTag(), "ThirdSocketManager update ack");
|
||||
Log.d(getTag(), "ThirdSocketManager update ack");
|
||||
}
|
||||
|
||||
SocketManager.getInstance().onAck(header);
|
||||
|
||||
@@ -36,24 +36,24 @@ PASSWORD=xintai2018
|
||||
RELEASE=true
|
||||
# AI CLOUD 云平台
|
||||
# 工具类
|
||||
MOGO_UTILS_VERSION=1.4.5.7
|
||||
MOGO_UTILS_VERSION=1.4.5.10
|
||||
# 网络请求
|
||||
MOGO_NETWORK_VERSION=1.4.5.7
|
||||
MOGO_NETWORK_VERSION=1.4.5.10
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.4.5.7
|
||||
MOGO_PASSPORT_VERSION=1.4.5.10
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.4.5.7
|
||||
MOGO_SOCKET_VERSION=1.4.5.10
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.4.5.7
|
||||
MOGO_REALTIME_VERSION=1.4.5.10
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.4.5.7
|
||||
MOGO_TANLU_VERSION=1.4.5.10
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.4.5.7
|
||||
MOGO_LIVE_VERSION=1.4.5.10
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.5.7
|
||||
MOGO_TRAFFICLIVE_VERSION=1.4.5.10
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.4.5.7
|
||||
MOGO_LOCATION_VERSION=1.4.5.10
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.4.5.7
|
||||
MOGO_TELEMATIC_VERSION=1.4.5.10
|
||||
# v2x
|
||||
MOGO_V2X_VERSION=1.4.5.7
|
||||
MOGO_V2X_VERSION=1.4.5.10
|
||||
|
||||
@@ -5,8 +5,8 @@ import static com.mogo.telematic.client.status.ConnectState.STATUS_CONNECT_CLOSE
|
||||
import android.content.Context;
|
||||
import android.net.nsd.NsdServiceInfo;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.telematic.client.NettyTcpClient;
|
||||
import com.mogo.telematic.client.NsdClient;
|
||||
import com.mogo.telematic.client.listener.MessageStateListener;
|
||||
@@ -140,7 +140,7 @@ public class NSDNettyManager implements TelematicHandler.ITelematicListener {
|
||||
nettyTcpServer.setListener(mDefaultServerListener);
|
||||
nettyTcpServer.start();
|
||||
} else {
|
||||
Logger.i(TAG, "服务端已开启,不要重复启动!");
|
||||
Log.i(TAG, "服务端已开启,不要重复启动!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public class NSDNettyManager implements TelematicHandler.ITelematicListener {
|
||||
mNsdServer.setRegisterState(new NSDServer.IRegisterState() {
|
||||
@Override
|
||||
public void onServiceRegistered(NsdServiceInfo serviceInfo) {
|
||||
Logger.i(TAG, "已注册服务onServiceRegistered: " + serviceInfo.toString());
|
||||
Log.i(TAG, "已注册服务onServiceRegistered: " + serviceInfo.toString());
|
||||
//已经注册可停止该服务
|
||||
// nsdServer.stopNSDServer();
|
||||
}
|
||||
@@ -234,7 +234,7 @@ public class NSDNettyManager implements TelematicHandler.ITelematicListener {
|
||||
public void onServerFound(NsdServiceInfo info, int port) {
|
||||
if (info != null) {
|
||||
String hostAddress = info.getHost().getHostAddress();
|
||||
Logger.d(TAG, "NSD查询到指定服务器信息ip为:" + hostAddress + ",port为:" + port);
|
||||
Log.d(TAG, "NSD查询到指定服务器信息ip为:" + hostAddress + ",port为:" + port);
|
||||
//获取到指定的地址,进行Netty的连接
|
||||
if (Thread.currentThread() == Looper.getMainLooper().getThread()) {
|
||||
new Thread(() -> {
|
||||
@@ -248,7 +248,7 @@ public class NSDNettyManager implements TelematicHandler.ITelematicListener {
|
||||
|
||||
@Override
|
||||
public void onServerFail() {
|
||||
Logger.d(TAG, "NSD查询失败,未找到");
|
||||
Log.d(TAG, "NSD查询失败,未找到");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -298,16 +298,16 @@ public class NSDNettyManager implements TelematicHandler.ITelematicListener {
|
||||
String hostAddress = "";
|
||||
for (HostBean hostBean : hostList) {
|
||||
if (mNettyTcpClient != null && (mNettyTcpClient.isConnecting() || mNettyTcpClient.getConnectStatus())) {
|
||||
Logger.d(TAG, "当前乘客屏幕已经连接到了ip:" + hostAddress + ",port为:" + 1088);
|
||||
Log.d(TAG, "当前乘客屏幕已经连接到了ip:" + hostAddress + ",port为:" + 1088);
|
||||
return;
|
||||
}
|
||||
hostAddress = hostBean.ipAddress;
|
||||
Logger.d(TAG, "NSD查询到指定服务器信息ip为:" + hostAddress + ",port为:" + 1088);
|
||||
Log.d(TAG, "NSD查询到指定服务器信息ip为:" + hostAddress + ",port为:" + 1088);
|
||||
//获取到指定的地址,进行Netty的连接
|
||||
connectNettyServer(hostAddress, 1088, uuid);
|
||||
}
|
||||
} else {
|
||||
Logger.d(TAG, "扫描完成,未找到可连接司机屏幕服务");
|
||||
Log.d(TAG, "扫描完成,未找到可连接司机屏幕服务");
|
||||
// 这里做1、8网段的切换扫描
|
||||
if (currentIp.equals(currentIp1)) {
|
||||
currentIp = currentIp8;
|
||||
@@ -327,9 +327,9 @@ public class NSDNettyManager implements TelematicHandler.ITelematicListener {
|
||||
}
|
||||
|
||||
private void connectNettyServer(String serverAddress, int port, String sign) {
|
||||
Logger.d(TAG, "connectNettyServer");
|
||||
Log.d(TAG, "connectNettyServer");
|
||||
if (serverAddress == null || serverAddress.length() == 0) {
|
||||
Logger.e(TAG, "Netty Server的ip不能为空!");
|
||||
Log.e(TAG, "Netty Server的ip不能为空!");
|
||||
return;
|
||||
}
|
||||
if (!isCanceled) {
|
||||
@@ -379,7 +379,7 @@ public class NSDNettyManager implements TelematicHandler.ITelematicListener {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Logger.d(TAG, "Client is connected.");
|
||||
Log.d(TAG, "Client is connected.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ import static com.mogo.telematic.MogoProtocolMsg.IDENTITY_REGIST;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.telematic.MogoLengthFrameDecoder;
|
||||
import com.mogo.telematic.MogoMessageEncoder;
|
||||
import com.mogo.telematic.MogoProtocolMsg;
|
||||
@@ -124,7 +124,7 @@ public class NettyTcpClient {
|
||||
|
||||
public void connect() {
|
||||
if (isConnecting) {
|
||||
Logger.d(TAG, "正在连接中,connect return");
|
||||
Log.d(TAG, "正在连接中,connect return");
|
||||
return;
|
||||
}
|
||||
if (Thread.currentThread() == Looper.getMainLooper().getThread()) {
|
||||
@@ -169,12 +169,12 @@ public class NettyTcpClient {
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
Logger.w(TAG, "初始化出错的原因为:" + e.getMessage());
|
||||
Log.w(TAG, "初始化出错的原因为:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private void connectServer() {
|
||||
Logger.d(TAG, "connectServer fun is called.");
|
||||
Log.d(TAG, "connectServer fun is called.");
|
||||
synchronized (NettyTcpClient.this) {
|
||||
if (!isConnected) {
|
||||
isConnecting = true;
|
||||
@@ -184,18 +184,18 @@ public class NettyTcpClient {
|
||||
initBootstrap();
|
||||
doConnect();
|
||||
} else {
|
||||
Logger.w(TAG, "socket正在连接中,无需重连");
|
||||
Log.w(TAG, "socket正在连接中,无需重连");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void doConnect() {
|
||||
if (channel != null && channel.isOpen() && channel.isActive()) {
|
||||
Logger.w(TAG, "Channel is active, no need to call start.");
|
||||
Log.w(TAG, "Channel is active, no need to call start.");
|
||||
return;
|
||||
}
|
||||
if (!canReconnect) {
|
||||
Logger.d(TAG, "重连已被关闭则直接return.");
|
||||
Log.d(TAG, "重连已被关闭则直接return.");
|
||||
return;
|
||||
}
|
||||
ChannelFuture channelFuture;
|
||||
@@ -215,12 +215,12 @@ public class NettyTcpClient {
|
||||
// future.channel().eventLoop().shutdownGracefully();
|
||||
// }
|
||||
channel = null;
|
||||
Logger.e(TAG, "连接已经结束!");
|
||||
Log.e(TAG, "连接已经结束!");
|
||||
});
|
||||
Logger.d(TAG, "连接获取channel已完成!");
|
||||
Log.d(TAG, "连接获取channel已完成!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, "连接Server ip:" + host + ",port:" + tcp_port + ",失败信息:" + e.getMessage());
|
||||
Log.e(TAG, "连接Server ip:" + host + ",port:" + tcp_port + ",失败信息:" + e.getMessage());
|
||||
isConnected = false;
|
||||
}
|
||||
}
|
||||
@@ -248,7 +248,7 @@ public class NettyTcpClient {
|
||||
byte[] signByteArr = mSign.getBytes();
|
||||
MogoProtocolMsg msg = new MogoProtocolMsg(IDENTITY_REGIST, signByteArr.length, signByteArr);
|
||||
sendMsgToServer(msg, isSuccess -> {
|
||||
Logger.d(TAG, "身份注册成功:" + isSuccess);
|
||||
Log.d(TAG, "身份注册成功:" + isSuccess);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -257,21 +257,21 @@ public class NettyTcpClient {
|
||||
private ChannelFutureListener mFutureListener = channelFuture -> {
|
||||
if (channelFuture.isDone()) {
|
||||
if (channelFuture.isSuccess()) {
|
||||
Logger.d(TAG, "连接成功");
|
||||
Log.d(TAG, "连接成功");
|
||||
reconnectNum = MAX_CONNECT_TIMES;
|
||||
isConnected = true;
|
||||
} else {
|
||||
if (channelFuture.isCancelled()) {
|
||||
Logger.w(TAG, "Connection attempt cancelled by user.");
|
||||
Log.w(TAG, "Connection attempt cancelled by user.");
|
||||
} else {
|
||||
Logger.e(TAG, "连接失败原因为:" + channelFuture.cause().getMessage());
|
||||
Log.e(TAG, "连接失败原因为:" + channelFuture.cause().getMessage());
|
||||
}
|
||||
isConnected = false;
|
||||
channelFuture.channel().pipeline().fireChannelInactive();
|
||||
}
|
||||
isConnecting = false;
|
||||
} else {
|
||||
Logger.w(TAG, "Connection isn't done.");
|
||||
Log.w(TAG, "Connection isn't done.");
|
||||
isConnected = false;
|
||||
}
|
||||
synchronized (NettyTcpClient.this) {
|
||||
@@ -280,7 +280,7 @@ public class NettyTcpClient {
|
||||
};
|
||||
|
||||
public void disconnect() {
|
||||
Logger.e(TAG, "disconnect");
|
||||
Log.e(TAG, "disconnect");
|
||||
isNeedReconnect = false;
|
||||
isConnected = false;
|
||||
if (group != null) {
|
||||
|
||||
@@ -3,10 +3,8 @@ package com.mogo.telematic.client;
|
||||
import android.content.Context;
|
||||
import android.net.nsd.NsdManager;
|
||||
import android.net.nsd.NsdServiceInfo;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.util.ArrayList;
|
||||
@@ -64,23 +62,23 @@ public class NsdClient {
|
||||
@Override
|
||||
public void onStartDiscoveryFailed(String serviceType, int errorCode) {
|
||||
isRegisterDiscovery = false;
|
||||
Logger.e(TAG, "onStartDiscoveryFailed()");
|
||||
Log.e(TAG, "onStartDiscoveryFailed()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopDiscoveryFailed(String serviceType, int errorCode) {
|
||||
isRegisterDiscovery = false;
|
||||
Logger.e(TAG, "onStopDiscoveryFailed()");
|
||||
Log.e(TAG, "onStopDiscoveryFailed()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiscoveryStarted(String serviceType) {
|
||||
Logger.e(TAG, "onDiscoveryStarted()");
|
||||
Log.e(TAG, "onDiscoveryStarted()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiscoveryStopped(String serviceType) {
|
||||
Logger.e(TAG, "onDiscoveryStopped()");
|
||||
Log.e(TAG, "onDiscoveryStopped()");
|
||||
isRegisterDiscovery = false;
|
||||
}
|
||||
|
||||
@@ -90,7 +88,7 @@ public class NsdClient {
|
||||
*/
|
||||
@Override
|
||||
public void onServiceFound(NsdServiceInfo serviceInfo) {
|
||||
Logger.e(TAG, "onServiceFound()");
|
||||
Log.e(TAG, "onServiceFound()");
|
||||
//根据咱服务器的定义名称,指定解析该 NsdServiceInfo
|
||||
if (serviceInfo.getServiceName().startsWith(mServiceName)) {
|
||||
mNsdManager.resolveService(serviceInfo, getResolveListener());
|
||||
@@ -105,7 +103,7 @@ public class NsdClient {
|
||||
|
||||
@Override
|
||||
public void onServiceLost(NsdServiceInfo serviceInfo) {
|
||||
Logger.e(TAG, "onServiceLost(): serviceInfo=" + serviceInfo);
|
||||
Log.e(TAG, "onServiceLost(): serviceInfo=" + serviceInfo);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -117,7 +115,7 @@ public class NsdClient {
|
||||
return new NsdManager.ResolveListener() {
|
||||
@Override
|
||||
public void onResolveFailed(NsdServiceInfo serviceInfo, int errorCode) {
|
||||
Logger.e(TAG, "onResolveFailed()");
|
||||
Log.e(TAG, "onResolveFailed()");
|
||||
isRegisterDiscovery = false;
|
||||
}
|
||||
|
||||
@@ -128,7 +126,7 @@ public class NsdClient {
|
||||
InetAddress host = serviceInfo.getHost();
|
||||
String serviceName = serviceInfo.getServiceName();
|
||||
String hostAddress = serviceInfo.getHost().getHostAddress();
|
||||
Logger.i(TAG, "onServiceResolved 已解析:" + " host:" + hostAddress + ":" + port + " ----- serviceName: " + serviceName);
|
||||
Log.i(TAG, "onServiceResolved 已解析:" + " host:" + hostAddress + ":" + port + " ----- serviceName: " + serviceName);
|
||||
|
||||
mNsdServiceInfoList.add(serviceInfo);
|
||||
|
||||
@@ -141,7 +139,7 @@ public class NsdClient {
|
||||
if (mIServerFound != null) {
|
||||
mIServerFound.onServerFound(serviceInfo, serviceInfo.getPort());
|
||||
}
|
||||
Logger.e(TAG, " 指定onServiceFound(" + mServiceName + "): Service Info: --> " + serviceInfo);
|
||||
Log.e(TAG, " 指定onServiceFound(" + mServiceName + "): Service Info: --> " + serviceInfo);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package com.mogo.telematic.client.handler;
|
||||
|
||||
import static com.mogo.telematic.client.status.ConnectState.STATUS_CONNECT_CLOSED;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.telematic.MogoProtocolMsg;
|
||||
import com.mogo.telematic.client.NettyTcpClient;
|
||||
import com.mogo.telematic.client.listener.NettyClientListener;
|
||||
@@ -10,11 +9,8 @@ import com.mogo.telematic.client.status.ConnectState;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import io.netty.handler.timeout.IdleStateEvent;
|
||||
|
||||
|
||||
public class NettyClientHandler extends SimpleChannelInboundHandler<MogoProtocolMsg> {
|
||||
@@ -61,7 +57,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<MogoProtocol
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// Logger.d(TAG, "不发送心跳");
|
||||
// Log.d(TAG, "不发送心跳");
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -72,7 +68,7 @@ public class NettyClientHandler extends SimpleChannelInboundHandler<MogoProtocol
|
||||
*/
|
||||
@Override
|
||||
public void channelActive(ChannelHandlerContext ctx) {
|
||||
Logger.d(TAG, "channelActive");
|
||||
Log.d(TAG, "channelActive");
|
||||
listener.onClientStatusConnectChanged(ConnectState.STATUS_CONNECT_SUCCESS, mSign, ctx.channel());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.telematic.client.handler
|
||||
|
||||
import com.elegant.log.simplelog.Logger
|
||||
import android.util.Log
|
||||
import com.mogo.telematic.client.NettyTcpClient
|
||||
import com.mogo.telematic.client.listener.NettyClientListener
|
||||
import com.mogo.telematic.client.status.ConnectState
|
||||
@@ -33,7 +33,7 @@ class ReconnectHandler(
|
||||
|
||||
@Throws(Exception::class)
|
||||
override fun exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable) {
|
||||
Logger.e(TAG, "ReconnectHandler#exceptionCaught cause message is:${cause.message}")
|
||||
Log.e(TAG, "ReconnectHandler#exceptionCaught cause message is:${cause.message}")
|
||||
listener.onClientStatusConnectChanged(
|
||||
ConnectState.STATUS_CONNECT_ERROR,
|
||||
cause.message,
|
||||
@@ -45,7 +45,7 @@ class ReconnectHandler(
|
||||
|
||||
@Throws(Exception::class)
|
||||
override fun channelInactive(ctx: ChannelHandlerContext) {
|
||||
Logger.d(TAG, "ReconnectHandler channelInactive ...")
|
||||
Log.d(TAG, "ReconnectHandler channelInactive ...")
|
||||
if (retries == 0) {
|
||||
synchronized(NettyTcpClient::class.java) {
|
||||
NettyTcpClient.sSERVER_SN = ""
|
||||
@@ -70,13 +70,13 @@ class ReconnectHandler(
|
||||
if (sleepTimeMs > maxSleepMs) {
|
||||
sleepTimeMs = maxSleepMs.toLong()
|
||||
}
|
||||
Logger.d(TAG, "${sleepTimeMs}ms后执行重连操作!")
|
||||
Log.d(TAG, "${sleepTimeMs}ms后执行重连操作!")
|
||||
ctx.channel().eventLoop().schedule({
|
||||
mNettyClient.reconnectServer()
|
||||
}, sleepTimeMs, TimeUnit.MILLISECONDS)
|
||||
++retries
|
||||
} else {
|
||||
Logger.d(TAG, "Try to reconnect to the server Over Retry count:${retries + 1}")
|
||||
Log.d(TAG, "Try to reconnect to the server Over Retry count:${retries + 1}")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.mogo.telematic.discovery;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.telematic.discovery.bean.HostBean;
|
||||
import com.mogo.telematic.discovery.bean.NetInfo;
|
||||
|
||||
@@ -38,7 +38,7 @@ public abstract class AbstractDiscoveryTask extends AsyncTask<Void, HostBean, Vo
|
||||
this.ip = ip;
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
Logger.d(TAG, "setNetwork: ip=" + NetInfo.getIpFromLongUnsigned(ip)
|
||||
Log.d(TAG, "setNetwork: ip=" + NetInfo.getIpFromLongUnsigned(ip)
|
||||
+ ", start=" + NetInfo.getIpFromLongUnsigned(start)
|
||||
+ ", end=" + NetInfo.getIpFromLongUnsigned(end)
|
||||
);
|
||||
@@ -49,7 +49,7 @@ public abstract class AbstractDiscoveryTask extends AsyncTask<Void, HostBean, Vo
|
||||
|
||||
@Override
|
||||
protected void onProgressUpdate(HostBean... host) {
|
||||
Logger.d(TAG, "onProgressUpdate: isCancelled=" + isCancelled());
|
||||
Log.d(TAG, "onProgressUpdate: isCancelled=" + isCancelled());
|
||||
if (hostList != null) {
|
||||
if (!isCancelled()) {
|
||||
if (host[0] != null) {
|
||||
@@ -61,7 +61,7 @@ public abstract class AbstractDiscoveryTask extends AsyncTask<Void, HostBean, Vo
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void unused) {
|
||||
Logger.d(TAG, "onPostExecute: 完成扫描,hostList=" + hostList);
|
||||
Log.d(TAG, "onPostExecute: 完成扫描,hostList=" + hostList);
|
||||
if (mDiscoveryDriverListenerList != null) {
|
||||
for (DiscoveryDriverListener discoveryDriverListener : mDiscoveryDriverListenerList) {
|
||||
discoveryDriverListener.onSuccess(hostList);
|
||||
@@ -71,7 +71,7 @@ public abstract class AbstractDiscoveryTask extends AsyncTask<Void, HostBean, Vo
|
||||
|
||||
@Override
|
||||
protected void onCancelled() {
|
||||
Logger.d(TAG, "onCancelled: 取消扫描");
|
||||
Log.d(TAG, "onCancelled: 取消扫描");
|
||||
if (mDiscoveryDriverListenerList != null) {
|
||||
for (DiscoveryDriverListener discoveryDriverListener : mDiscoveryDriverListenerList) {
|
||||
discoveryDriverListener.onCancel();
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package com.mogo.telematic.discovery;
|
||||
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.telematic.discovery.bean.HostBean;
|
||||
import com.mogo.telematic.discovery.bean.NetInfo;
|
||||
|
||||
@@ -36,10 +37,10 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
Logger.v(TAG, "start=" + NetInfo.getIpFromLongUnsigned(start) + " (" + start + "), end=" + NetInfo.getIpFromLongUnsigned(end) + " (" + end + "), length=" + size);
|
||||
Log.v(TAG, "start=" + NetInfo.getIpFromLongUnsigned(start) + " (" + start + "), end=" + NetInfo.getIpFromLongUnsigned(end) + " (" + end + "), length=" + size);
|
||||
mPool = Executors.newFixedThreadPool(THREADS);
|
||||
if (ip <= end && ip >= start) {
|
||||
Logger.i(TAG, "Back and forth scanning");
|
||||
Log.i(TAG, "Back and forth scanning");
|
||||
// gateway
|
||||
launch(start);
|
||||
|
||||
@@ -52,7 +53,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
if (isCancelled()) {
|
||||
break;
|
||||
}
|
||||
Logger.d(TAG, "doInBackground: "
|
||||
Log.d(TAG, "doInBackground: "
|
||||
+ " ip=" + NetInfo.getIpFromLongUnsigned(ip)
|
||||
+ " start=" + NetInfo.getIpFromLongUnsigned(start)
|
||||
+ " end=" + NetInfo.getIpFromLongUnsigned(end)
|
||||
@@ -78,7 +79,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Logger.i(TAG, "Sequencial scanning");
|
||||
Log.i(TAG, "Sequencial scanning");
|
||||
for (long i = start; i <= end; i++) {
|
||||
if (isCancelled()) {
|
||||
break;
|
||||
@@ -90,9 +91,9 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
try {
|
||||
if (!mPool.awaitTermination(TIMEOUT_SCAN, TimeUnit.SECONDS)) {
|
||||
mPool.shutdownNow();
|
||||
Logger.e(TAG, "Shutting down pool");
|
||||
Log.e(TAG, "Shutting down pool");
|
||||
if (!mPool.awaitTermination(TIMEOUT_SHUTDOWN, TimeUnit.SECONDS)) {
|
||||
Logger.e(TAG, "Pool did not terminate");
|
||||
Log.e(TAG, "Pool did not terminate");
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
@@ -100,7 +101,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
mPool.shutdownNow();
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
Logger.d(TAG, "doInBackground: return null");
|
||||
Log.d(TAG, "doInBackground: return null");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -109,7 +110,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
if (mPool != null) {
|
||||
synchronized (mPool) {
|
||||
mPool.shutdownNow();
|
||||
Logger.d(TAG, "onCancelled: 停止线程");
|
||||
Log.d(TAG, "onCancelled: 停止线程");
|
||||
}
|
||||
}
|
||||
super.onCancelled();
|
||||
@@ -117,7 +118,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
|
||||
private void launch(long i) {
|
||||
if (!mPool.isShutdown()) {
|
||||
Logger.d(TAG, "launch: 子线程:" + NetInfo.getIpFromLongUnsigned(i));
|
||||
Log.d(TAG, "launch: 子线程:" + NetInfo.getIpFromLongUnsigned(i));
|
||||
mPool.execute(new CheckRunnable(NetInfo.getIpFromLongUnsigned(i)));
|
||||
}
|
||||
}
|
||||
@@ -139,7 +140,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
publish(null);
|
||||
return;
|
||||
}
|
||||
Logger.e(TAG, "run=" + addr + " isCancelled()=" + isCancelled());
|
||||
Log.e(TAG, "run=" + addr + " isCancelled()=" + isCancelled());
|
||||
// Create host object
|
||||
final HostBean host = new HostBean();
|
||||
host.responseTime = TIMEOUT_CONNECT;
|
||||
@@ -149,7 +150,7 @@ public class DiscoveryDriverTask extends AbstractDiscoveryTask {
|
||||
try {
|
||||
s.bind(null);
|
||||
s.connect(new InetSocketAddress(addr, dport), TIMEOUT_CONNECT);
|
||||
Logger.i(TAG, "found using TCP connect " + addr + " on port=" + dport);
|
||||
Log.i(TAG, "found using TCP connect " + addr + " on port=" + dport);
|
||||
publish(host);
|
||||
} catch (IOException | IllegalArgumentException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -7,8 +7,8 @@ import android.net.wifi.SupplicantState;
|
||||
import android.net.wifi.WifiInfo;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -57,7 +57,7 @@ public class NetInfo {
|
||||
InetAddress ia = nis.nextElement();
|
||||
if (!ia.isLoopbackAddress()) {
|
||||
if (ia instanceof Inet6Address) {
|
||||
Logger.i(TAG, "IPv6 detected and not supported yet!");
|
||||
Log.i(TAG, "IPv6 detected and not supported yet!");
|
||||
continue;
|
||||
}
|
||||
return ia.getHostAddress();
|
||||
@@ -84,10 +84,10 @@ public class NetInfo {
|
||||
cidr = IpToCidr(match);
|
||||
return;
|
||||
} else {
|
||||
Logger.i(TAG, "cannot find cidr, using default /24");
|
||||
Log.i(TAG, "cannot find cidr, using default /24");
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
Logger.i(TAG, e.getMessage() + " -> cannot find cidr, using default /24");
|
||||
Log.i(TAG, e.getMessage() + " -> cannot find cidr, using default /24");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class NetInfo {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, "Can't use native command: " + e.getMessage());
|
||||
Log.e(TAG, "Can't use native command: " + e.getMessage());
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.mogo.telematic.server;
|
||||
import android.content.Context;
|
||||
import android.net.nsd.NsdManager;
|
||||
import android.net.nsd.NsdServiceInfo;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
|
||||
public class NSDServer {
|
||||
public static final String TAG = "NSDServer";
|
||||
@@ -28,7 +28,7 @@ public class NSDServer {
|
||||
mRegistrationListener = new NsdManager.RegistrationListener() {
|
||||
@Override
|
||||
public void onRegistrationFailed(NsdServiceInfo serviceInfo, int errorCode) {
|
||||
Logger.e(TAG, "NsdServiceInfo onRegistrationFailed");
|
||||
Log.e(TAG, "NsdServiceInfo onRegistrationFailed");
|
||||
isRegister = false;
|
||||
if (registerState != null) {
|
||||
registerState.onRegistrationFailed(serviceInfo, errorCode);
|
||||
@@ -37,7 +37,7 @@ public class NSDServer {
|
||||
|
||||
@Override
|
||||
public void onUnregistrationFailed(NsdServiceInfo serviceInfo, int errorCode) {
|
||||
Logger.i(TAG, "onUnregistrationFailed serviceInfo: " + serviceInfo + " ,errorCode:" + errorCode);
|
||||
Log.i(TAG, "onUnregistrationFailed serviceInfo: " + serviceInfo + " ,errorCode:" + errorCode);
|
||||
isRegister = false;
|
||||
if (registerState != null) {
|
||||
registerState.onUnRegistrationFailed(serviceInfo, errorCode);
|
||||
@@ -47,8 +47,8 @@ public class NSDServer {
|
||||
@Override
|
||||
public void onServiceRegistered(NsdServiceInfo serviceInfo) {
|
||||
mServerName = serviceInfo.getServiceName();
|
||||
Logger.i(TAG, "onServiceRegistered: " + serviceInfo.toString());
|
||||
Logger.i(TAG, "mServerName onServiceRegistered: " + mServerName);
|
||||
Log.i(TAG, "onServiceRegistered: " + serviceInfo.toString());
|
||||
Log.i(TAG, "mServerName onServiceRegistered: " + mServerName);
|
||||
if (registerState != null) {
|
||||
registerState.onServiceRegistered(serviceInfo);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public class NSDServer {
|
||||
|
||||
@Override
|
||||
public void onServiceUnregistered(NsdServiceInfo serviceInfo) {
|
||||
Logger.i(TAG, "onServiceUnregistered serviceInfo: " + serviceInfo);
|
||||
Log.i(TAG, "onServiceUnregistered serviceInfo: " + serviceInfo);
|
||||
isRegister = false;
|
||||
if (registerState != null) {
|
||||
registerState.onServiceUnregistered(serviceInfo);
|
||||
|
||||
@@ -3,7 +3,8 @@ package com.mogo.telematic.server.netty;
|
||||
import static com.mogo.telematic.MogoProtocolMsg.IDENTITY_REGIST;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.telematic.MogoProtocolMsg;
|
||||
|
||||
import io.netty.channel.ChannelHandler;
|
||||
@@ -25,7 +26,7 @@ public class MogoProtocolServerHandler extends SimpleChannelInboundHandler<MogoP
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx,
|
||||
Throwable cause) {
|
||||
Logger.e(TAG, "ProtocolServerHandler$exception msg is:" + cause.getMessage());
|
||||
Log.e(TAG, "ProtocolServerHandler$exception msg is:" + cause.getMessage());
|
||||
cause.printStackTrace();
|
||||
ctx.close();
|
||||
}
|
||||
@@ -53,7 +54,7 @@ public class MogoProtocolServerHandler extends SimpleChannelInboundHandler<MogoP
|
||||
*/
|
||||
@Override
|
||||
public void channelActive(ChannelHandlerContext ctx) throws Exception {
|
||||
Logger.d(TAG, "channelActive");
|
||||
Log.d(TAG, "channelActive");
|
||||
NettyTcpServer.getInstance().addChannel(ctx.channel());
|
||||
if (mListener != null) {
|
||||
mListener.onChannelConnect(ctx.channel());
|
||||
@@ -64,9 +65,9 @@ public class MogoProtocolServerHandler extends SimpleChannelInboundHandler<MogoP
|
||||
MogoProtocolMsg msg = new MogoProtocolMsg(IDENTITY_REGIST, signByteArr.length, signByteArr);
|
||||
NettyTcpServer.getInstance().sendMsgToSpecifiedClient(msg, ctx.channel(), future -> {
|
||||
if (future.isSuccess()) {
|
||||
Logger.d(TAG, "Netty Server端注册身份成功!");
|
||||
Log.d(TAG, "Netty Server端注册身份成功!");
|
||||
} else {
|
||||
Logger.d(TAG, "Netty Server端注册身份不成功!");
|
||||
Log.d(TAG, "Netty Server端注册身份不成功!");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -75,7 +76,7 @@ public class MogoProtocolServerHandler extends SimpleChannelInboundHandler<MogoP
|
||||
|
||||
@Override
|
||||
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
|
||||
Logger.w(TAG, "channelInactive");
|
||||
Log.w(TAG, "channelInactive");
|
||||
// NettyTcpServer.getInstance().setConnectStatus(false);
|
||||
NettyTcpServer.getInstance().removeChannelSN(ctx.channel().id());
|
||||
NettyTcpServer.getInstance().removeChannel(ctx.channel());
|
||||
|
||||
@@ -4,7 +4,8 @@ import static com.mogo.telematic.MogoLengthFrameDecoder.LENGTH_FIELD_OFFSET;
|
||||
import static com.mogo.telematic.MogoLengthFrameDecoder.LENGTH_FIELD_SIZE;
|
||||
import static com.mogo.telematic.MogoLengthFrameDecoder.MAX_FRAME_LENGTH;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.telematic.MogoLengthFrameDecoder;
|
||||
import com.mogo.telematic.MogoMessageEncoder;
|
||||
import com.mogo.telematic.MogoProtocolMsg;
|
||||
@@ -103,7 +104,7 @@ public class NettyTcpServer {
|
||||
|
||||
// Bind and start to accept incoming connections.
|
||||
ChannelFuture f = b.bind().sync();
|
||||
Logger.e(TAG, NettyTcpServer.class.getName() + " started and listen on " + f.channel().localAddress());
|
||||
Log.e(TAG, NettyTcpServer.class.getName() + " started and listen on " + f.channel().localAddress());
|
||||
isServerStart = true;
|
||||
if (mListener != null) {
|
||||
mListener.onStartServer();
|
||||
@@ -113,7 +114,7 @@ public class NettyTcpServer {
|
||||
// shut down your server.
|
||||
f.channel().closeFuture().sync();
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, e.getLocalizedMessage());
|
||||
Log.e(TAG, e.getLocalizedMessage());
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
isServerStart = false;
|
||||
@@ -165,9 +166,9 @@ public class NettyTcpServer {
|
||||
|
||||
private final ChannelFutureListener mProxyListener = channelFuture -> {
|
||||
if (channelFuture.isSuccess()) {
|
||||
Logger.d(TAG, "SendMsgToAllClients result was successful");
|
||||
Log.d(TAG, "SendMsgToAllClients result was successful");
|
||||
} else {
|
||||
Logger.d(TAG, "SendMsgToAllClients result was unsuccessful");
|
||||
Log.d(TAG, "SendMsgToAllClients result was unsuccessful");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ package com.mogo.realtime.core;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
import static com.mogo.realtime.constant.RealTimeConstant.TAG;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
|
||||
|
||||
/**
|
||||
@@ -42,11 +42,11 @@ public class UploadInTimeHandler {
|
||||
}
|
||||
|
||||
public synchronized void start() {
|
||||
Logger.d(TAG, "UploadInTimeHandler start");
|
||||
Log.d(TAG, "UploadInTimeHandler start");
|
||||
if (mHandler == null) {
|
||||
if (mThread == null) {
|
||||
mThread = new HandlerThread(TAG);
|
||||
Logger.d(TAG, "start Handler Thread");
|
||||
Log.d(TAG, "start Handler Thread");
|
||||
mThread.start();
|
||||
}
|
||||
mHandler = new Handler(mThread.getLooper()) {
|
||||
@@ -81,7 +81,7 @@ public class UploadInTimeHandler {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mThread = null;
|
||||
Logger.d(TAG, "stop Thread set null");
|
||||
Log.d(TAG, "stop Thread set null");
|
||||
}
|
||||
iUploadInTimeListener = null;
|
||||
uploadInTimeHandler = null;
|
||||
|
||||
@@ -5,8 +5,8 @@ import static com.mogo.cloud.socket.SocketMsgType.MSG_TYPE_DOWNLINK_CAR_DATA;
|
||||
import static com.mogo.realtime.constant.RealTimeConstant.TAG;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener;
|
||||
import com.mogo.cloud.socket.SocketManager;
|
||||
@@ -79,7 +79,7 @@ public class SocketHandler {
|
||||
@Override
|
||||
public void onMsgReceived(int msgType, SocketDownData.SocketDownDataProto webSocketData) {
|
||||
if (webSocketData == null) {
|
||||
Logger.e(TAG, "onMsgReceived SocketDownDataProto3 == null ");
|
||||
Log.e(TAG, "onMsgReceived SocketDownDataProto3 == null ");
|
||||
return;
|
||||
}
|
||||
if (webSocketData.getMsgType() == MSG_TYPE_DOWNLINK_CAR_DATA.getMsgType()) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.mogo.cloud.trafficlive.api;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.TextureView;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.trafficlive.core.TrafficLiveCurrentManager;
|
||||
|
||||
import static com.mogo.cloud.trafficlive.constant.TrafficLiveConstant.TAG;
|
||||
@@ -23,7 +23,7 @@ public class MoGoAiCloudTrafficLive {
|
||||
try {
|
||||
TrafficLiveCurrentManager.getInstance().viewFrontVehicleLive(lat, lon, bearing, surfaceView, callBack);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, " viewFrontVehicleLive error : " + e);
|
||||
Log.e(TAG, " viewFrontVehicleLive error : " + e);
|
||||
callBack.onError(e != null ? e.getMessage() : "check input param");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public class MoGoAiCloudTrafficLive {
|
||||
try {
|
||||
TrafficLiveCurrentManager.getInstance().viewDesignativeVehicleLive(liveSn, surfaceView, callBack);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, " viewDesignativeVehicleLive error : " + e);
|
||||
Log.e(TAG, " viewDesignativeVehicleLive error : " + e);
|
||||
callBack.onError(e != null ? e.getMessage() : "check input param");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class MoGoAiCloudTrafficLive {
|
||||
try {
|
||||
TrafficLiveCurrentManager.getInstance().viewDesignativeVehicleLive(liveSn, textureView, callBack);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, " viewDesignativeVehicleLive error : " + e);
|
||||
Log.e(TAG, " viewDesignativeVehicleLive error : " + e);
|
||||
callBack.onError(e != null ? e.getMessage() : "check input param");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class MoGoAiCloudTrafficLive {
|
||||
try {
|
||||
TrafficLiveCurrentManager.getInstance().viewFrontIntersectionLive(lat, lon, bearing, callBack);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, " viewFrontIntersectionLive error : " + e);
|
||||
Log.e(TAG, " viewFrontIntersectionLive error : " + e);
|
||||
callBack.onError(e != null ? e.getMessage() : "check input param");
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -84,7 +84,7 @@ public class MoGoAiCloudTrafficLive {
|
||||
try {
|
||||
TrafficLiveCurrentManager.getInstance().viewDesignativeIntersectionLive(cameraId, callBack);
|
||||
} catch (Exception e) {
|
||||
Logger.e(TAG, " viewDesignativeIntersectionLive error : " + e);
|
||||
Log.e(TAG, " viewDesignativeIntersectionLive error : " + e);
|
||||
callBack.onError(e != null ? e.getMessage() : "check input param");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.mogo.cloud.trafficlive.core;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.TextureView;
|
||||
|
||||
import com.elegant.log.simplelog.Logger;
|
||||
import com.mogo.cloud.live.listener.ILiveMultiRoomStatusListener;
|
||||
import com.mogo.cloud.live.listener.ILiveProgressListener;
|
||||
import com.mogo.cloud.live.listener.IMediaPlayerStateListener;
|
||||
@@ -131,7 +131,7 @@ public class TrafficLiveCurrentManager
|
||||
if (TrafficLiveCurrentManager.this.trafficLiveCallBack != null) {
|
||||
TrafficLiveCurrentManager.this.trafficLiveCallBack.onError("There are no live vehicles ahead !");
|
||||
} else {
|
||||
Logger.e(TAG, "onVehicleLiveSuccess , but result liveSn is null");
|
||||
Log.e(TAG, "onVehicleLiveSuccess , but result liveSn is null");
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ public class TrafficLiveCurrentManager
|
||||
if (TrafficLiveCurrentManager.this.trafficLiveCallBack != null) {
|
||||
TrafficLiveCurrentManager.this.trafficLiveCallBack.onError("There are no live vehicles ahead !");
|
||||
} else {
|
||||
Logger.e(TAG, "onVehicleLiveSuccess , but result liveSn is null");
|
||||
Log.e(TAG, "onVehicleLiveSuccess , but result liveSn is null");
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ public class TrafficLiveCurrentManager
|
||||
|
||||
@Override
|
||||
public void onDebugError(int errorCode, String funcName, String errorInfo) {
|
||||
Logger.e(TAG, "onDebugError errorCode : " + errorCode + " funcName : " + funcName + " errorInfo : " + errorInfo);
|
||||
Log.e(TAG, "onDebugError errorCode : " + errorCode + " funcName : " + funcName + " errorInfo : " + errorInfo);
|
||||
if (trafficLiveCallBack != null) {
|
||||
trafficLiveCallBack.onError(errorInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user