[Change]
发布新版本1.4.5.10 替换Logger为原生Log,防止过度调用Logger 同步synchronized获取堆栈信息导致卡顿
This commit is contained in:
@@ -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