refix name
This commit is contained in:
@@ -2,5 +2,5 @@ package com.mogo.realtime.constant;
|
||||
|
||||
public class RealTimeConstant {
|
||||
|
||||
public static final String TAG = "MoGoAiCloudRealTime";
|
||||
public static final String TAG = "MoGoAiCloud_RealTime";
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class MogoRTKLocation {
|
||||
Logger.e(TAG, "暂无定位数据");
|
||||
return list;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
cacheList.clear();
|
||||
}
|
||||
return list;
|
||||
@@ -58,28 +58,20 @@ public class MogoRTKLocation {
|
||||
public void init() {
|
||||
locationManager = (LocationManager) MoGoAiCloudClient.getInstance().getContext().getSystemService(Context.LOCATION_SERVICE);
|
||||
String provider = locationManager.getBestProvider(getCriteria(), true);
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "init provider : " + provider);
|
||||
}
|
||||
Logger.d(TAG, "init provider : " + provider);
|
||||
if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
|
||||
try {
|
||||
locationManager.requestLocationUpdates(provider, 0, 0, locationListener);
|
||||
Location location = locationManager.getLastKnownLocation(provider);
|
||||
if (location != null) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.i(TAG, "location : " + location.toString());
|
||||
}
|
||||
Logger.i(TAG, "location : " + location.toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "RTK LocationManager requestLocationUpdates has Exception : " + e.getMessage());
|
||||
}
|
||||
Logger.d(TAG, "RTK LocationManager requestLocationUpdates has Exception : " + e.getMessage());
|
||||
}
|
||||
} else {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "RTK LocationManager Provider GPS_PROVIDER unable");
|
||||
}
|
||||
Logger.d(TAG, "RTK LocationManager Provider GPS_PROVIDER unable");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -110,31 +102,23 @@ public class MogoRTKLocation {
|
||||
locInfo = cloudLocationInfo;
|
||||
cacheList.add(cloudLocationInfo);
|
||||
} else {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.e(TAG, "location == null");
|
||||
}
|
||||
Logger.e(TAG, "location == null");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "onStatusChanged status: " + status);
|
||||
}
|
||||
Logger.d(TAG, "onStatusChanged status: " + status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderEnabled(String provider) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "onProviderEnabled");
|
||||
}
|
||||
Logger.d(TAG, "onProviderEnabled");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderDisabled(String provider) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "onProviderEnabled");
|
||||
}
|
||||
Logger.d(TAG, "onProviderEnabled");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -142,15 +126,11 @@ public class MogoRTKLocation {
|
||||
* 关闭定位服务
|
||||
*/
|
||||
public void stop() {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "stop RTK Location");
|
||||
}
|
||||
Logger.d(TAG, "stop RTK Location");
|
||||
if (locationManager != null && locationListener != null) {
|
||||
locationManager.removeUpdates(locationListener);
|
||||
} else {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Logger.d(TAG, "stop failed , reason : loc" + locationManager + " , or loc listener: " + locationListener + " is null");
|
||||
}
|
||||
Logger.d(TAG, "stop failed , reason : loc" + locationManager + " , or loc listener: " + locationListener + " is null");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mogo.realtime.socket;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient;
|
||||
import com.mogo.cloud.socket.IMogoCloudSocketOnMessageListener;
|
||||
@@ -17,6 +16,7 @@ import com.mogo.realtime.entity.MogoSnapshotSetData;
|
||||
import com.mogo.realtime.entity.OnePerSecondSendContent;
|
||||
import com.mogo.realtime.spi.RealTimeProviderImp;
|
||||
import com.mogo.realtime.util.MortonCode;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.zhidao.ptech.connsvr.protocol.MogoConnsvr;
|
||||
|
||||
@@ -115,9 +115,7 @@ public class SocketHandler {
|
||||
if (msgType == MSG_TYPE_DOWNLINK_CAR_DATA.getMsgType()) {
|
||||
MogoSnapshotSetData data = GsonUtil.objectFromJson(webSocketData.getData(), MogoSnapshotSetData.class);
|
||||
if (data == null) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.e(TAG, "onMsgReceived MogoSnapshotSetData == null ");
|
||||
}
|
||||
Logger.e(TAG, "onMsgReceived MogoSnapshotSetData == null ");
|
||||
return;
|
||||
}
|
||||
for (IMogoCloudOnMsgListener listener : onMsgListenerList) {
|
||||
@@ -136,9 +134,7 @@ public class SocketHandler {
|
||||
*/
|
||||
public void sendMsg(List<CloudLocationInfo> cloudLocationInfo) {
|
||||
if (cloudLocationInfo == null) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.e(TAG, "请检查传入数组对象为Null");
|
||||
}
|
||||
Logger.e(TAG, "请检查传入数组对象为Null");
|
||||
return;
|
||||
}
|
||||
CloudLocationInfo lastInfo = null;
|
||||
@@ -170,9 +166,7 @@ public class SocketHandler {
|
||||
|
||||
if (content.self == null &&
|
||||
(content.adas == null || content.adas.isEmpty())) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(TAG, "no information to sent");
|
||||
}
|
||||
Logger.d(TAG, "no information to sent");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@ import io.reactivex.annotations.NonNull;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
|
||||
import static android.content.ContentValues.TAG;
|
||||
|
||||
/**
|
||||
* @author lixiaopeng
|
||||
* @description 道路搜索
|
||||
@@ -81,7 +79,7 @@ public class MogoRoadSearchManager {
|
||||
@Override
|
||||
public void onNext(@NonNull BaseData<RoadInfos> roadInfos) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(HttpConstant.TANLU, "queryRoadInfos onNext roadInfos = " + roadInfos.getResult().getData());
|
||||
Log.d(HttpConstant.TAG, "queryRoadInfos onNext roadInfos = " + roadInfos.getResult().getData());
|
||||
}
|
||||
callback.onSuccess(roadInfos);
|
||||
}
|
||||
@@ -94,7 +92,7 @@ public class MogoRoadSearchManager {
|
||||
@Override
|
||||
public void onComplete() {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(HttpConstant.TANLU, "queryRoadInfos onComplete ");
|
||||
Log.d(HttpConstant.TAG, "queryRoadInfos onComplete ");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -6,5 +6,5 @@ package com.mogo.cloud.tanlu.constant;
|
||||
* @since 2021/1/20
|
||||
*/
|
||||
public class HttpConstant {
|
||||
public static final String TANLU = "TANLU_MODULE";
|
||||
public static final String TAG = "MoGoAiCloud_TanLu";
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class CosUpload implements CosStatusCallback {
|
||||
videoCoverImage = getVideoPicPath();
|
||||
boolean isSuccess = getVideoThumbnail(info.getFilePath(), videoCoverImage);
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(HttpConstant.TANLU, "isSuccess = " + isSuccess + "--videoCoverImage = " + videoCoverImage);
|
||||
Log.d(HttpConstant.TAG, "isSuccess = " + isSuccess + "--videoCoverImage = " + videoCoverImage);
|
||||
}
|
||||
filePath.add(info.getFilePath());
|
||||
filePath.add(videoCoverImage);
|
||||
@@ -81,7 +81,7 @@ public class CosUpload implements CosStatusCallback {
|
||||
filePath.add(info.getFilePath());
|
||||
}
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(HttpConstant.TANLU, "filePath.size() = " + filePath.size());
|
||||
Log.d(HttpConstant.TAG, "filePath.size() = " + filePath.size());
|
||||
}
|
||||
CosUploadManagerImpl.getInstance(mContext.getApplicationContext())
|
||||
.upload(filePath, mPicEventId, DbPriorityConfig.PRIORITY_HIGH);
|
||||
@@ -99,8 +99,8 @@ public class CosUpload implements CosStatusCallback {
|
||||
@Override
|
||||
public void uploadCosCompleted(String cosPath, String eventId, String downloadUrl, String localPath) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(HttpConstant.TANLU, "uploadCosCompleted ----> cosPath =" + cosPath + "--eventId =" + eventId);
|
||||
Log.d(HttpConstant.TANLU, "uploadCosCompleted ----> downloadUrl =" + downloadUrl + "--localPath =" + localPath);
|
||||
Log.d(HttpConstant.TAG, "uploadCosCompleted ----> cosPath =" + cosPath + "--eventId =" + eventId);
|
||||
Log.d(HttpConstant.TAG, "uploadCosCompleted ----> downloadUrl =" + downloadUrl + "--localPath =" + localPath);
|
||||
}
|
||||
if (filePath.size() == 2) {
|
||||
if (isVideo(localPath)) { //如果是视频 localPath
|
||||
@@ -109,7 +109,7 @@ public class CosUpload implements CosStatusCallback {
|
||||
mCosPicUrl = downloadUrl;
|
||||
}
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(HttpConstant.TANLU, "mCosVideoUrl = " + mCosVideoUrl + " >>>mCosPicUrl = " + mCosPicUrl);
|
||||
Log.d(HttpConstant.TAG, "mCosVideoUrl = " + mCosVideoUrl + " >>>mCosPicUrl = " + mCosPicUrl);
|
||||
}
|
||||
if (mCosPicUrl != null && mCosVideoUrl != null) {
|
||||
sendInformation();
|
||||
@@ -123,7 +123,7 @@ public class CosUpload implements CosStatusCallback {
|
||||
@Override
|
||||
public void uploadCosFailed(String cosPath, String eventId, String localPath) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.e(HttpConstant.TANLU, "uploadCosFailed ----> cosPath = " + cosPath + "--eventId =" + eventId + "--localPath =" + localPath);
|
||||
Log.e(HttpConstant.TAG, "uploadCosFailed ----> cosPath = " + cosPath + "--eventId =" + eventId + "--localPath =" + localPath);
|
||||
}
|
||||
sendInformation();
|
||||
}
|
||||
@@ -149,7 +149,7 @@ public class CosUpload implements CosStatusCallback {
|
||||
public void onSuccess(BaseData<UploadResult> result) {
|
||||
if (result != null && result.getResult() != null) {
|
||||
if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isShowDebugLog()) {
|
||||
Log.d(HttpConstant.TANLU, "uploadRoadInfo result.id = " + result.getResult().id);
|
||||
Log.d(HttpConstant.TAG, "uploadRoadInfo result.id = " + result.getResult().id);
|
||||
}
|
||||
}
|
||||
mCallback.onSuccess(result);
|
||||
|
||||
@@ -2,5 +2,5 @@ package com.mogo.cloud.trafficlive.constant;
|
||||
|
||||
public class TrafficLiveConstant {
|
||||
|
||||
public static final String TAG = "TrafficLiveConstant";
|
||||
public static final String TAG = "MoGoAiCloud_TrafficLive";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user