diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 2343eab90b..8e9756d758 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -50,7 +50,6 @@
-
diff --git a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/AnalyticsUtil.kt b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/AnalyticsUtil.kt
index a3976af13d..6290f538ba 100644
--- a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/AnalyticsUtil.kt
+++ b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/AnalyticsUtil.kt
@@ -50,7 +50,6 @@ fun trackNormalEvent(event: String, data: MutableMap?, context: Con
localParams["systemversion"] = getSystemVersion(context)
localParams["sn"] = Utils.getSn()
-// Log.d("liyz", "data =" + data.toString() + ">>>>event=" + event)
Analytics.getInstance().setCustomParams(localParams)
Analytics.getInstance().track(event, data)
}
\ No newline at end of file
diff --git a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/FileUtil.kt b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/FileUtil.kt
index 4fa2a65426..ff4354b6f9 100644
--- a/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/FileUtil.kt
+++ b/libraries/tanlulib/src/main/java/com/zhidao/roadcondition/util/FileUtil.kt
@@ -51,7 +51,6 @@ fun deleteAllFile(file: File?) { //判断文件不为null或文件目录存在
//遍历该目录下的文件对象
for (f in files) {
val name: String = file.getName()
- Log.e("liyz", name)
//判断子目录是否存在子目录,如果是文件则删除
if (f.isDirectory()) {
deleteAllFile(f)
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/IShareControl.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/IShareControl.java
deleted file mode 100644
index 0224679a7e..0000000000
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/IShareControl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.mogo.module.share;
-
-import android.content.Context;
-
-import androidx.annotation.Keep;
-
-/**
- * @author lixiaopeng
- * @description
- * @since 2020-01-10
- */
-@Keep
-public interface IShareControl {
- /**
- * 显示对话框
- */
- @Keep
- void showDialog(/*Context context*/);
-
- /**
- * 对话框消失
- */
- @Keep
- void dismissDialog();
-}
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java
index 7ac8253c63..4add852f19 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/TanluManager.java
@@ -47,6 +47,7 @@ import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.utils.NetworkUtils;
import com.mogo.utils.TipDrawable;
import com.mogo.utils.TipToast;
+import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.WorkThreadHandler;
import com.mogo.utils.logger.Logger;
@@ -155,41 +156,11 @@ public class TanluManager implements IMogoMarkerClickListener,
});
}
-
public void shareSuccess(String poiType, MogoLatLng location) {
MarkerInfo markerInfo = new MarkerInfo(poiType, "", location.lon, location.lat, true, "1");
EventBus.getDefault().post(markerInfo);
}
-
- /**
- * 构造经纬度列表
- *
- * @param markerExploreWay
- * @return
- */
- private List getList(MarkerExploreWay markerExploreWay) {
- List list = new ArrayList<>();
- if (markerExploreWay != null) {
- MarkerLocation location = markerExploreWay.getLocation();
- if (location != null) {
- Logger.d(TAG, "getList location.getLon() =" + location.getLon() + " >>>location.getLat()=" + location.getLat());
- MogoLatLng mogoLatLng = new MogoLatLng(location.getLat(), location.getLon());
- //经度
- Double longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude();
- //维度
- Double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude();
-
- list.add(mogoLatLng);
- } else {
- Logger.e(TAG, "getList() location == null");
- }
- } else {
- Logger.e(TAG, "getList() markerExploreWay == null");
- }
- return list;
- }
-
private void initInterface() {
//地图marker,地图操作
mMarkerManager = TanluServiceManager.getMapService().getMarkerManager(mContext);
@@ -364,6 +335,7 @@ public class TanluManager implements IMogoMarkerClickListener,
Logger.e(TAG, "onQueryRoadInfoFail ----- msg = " + msg);
// speakFailVoice(searchfaileVoiceStrings[1]);
speakFailVoice("未发现" + mKeywords + "附近的特殊路况");
+ moveToMarcker(currentLat, currentLon);
}
@Override
@@ -460,24 +432,6 @@ public class TanluManager implements IMogoMarkerClickListener,
}, delay);
}
-
- /**
- * 发送广播
- */
- private void sendShareReceiver(String type) {
- if (!type.equals("0") && mMogoStatusManager != null) {
- mMogoStatusManager.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true);
- }
-
- Logger.d(TAG, "TanluListWindow sendShareReceiver type = " + type);
- Intent intent = new Intent();
- intent.setAction("com.zhidao.share.roadcondition.action"); //com.zhidao.roadcondition.share
- intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
- intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
- intent.putExtra("type", type);
- mContext.sendBroadcast(intent);
- }
-
private void moveToMarcker(double lat, double lon) {
Logger.d(TAG, "moveToMarcker lat = " + lat + " >>>>lon = " + lon);
MogoLatLng latLng = new MogoLatLng(lat, lon);
@@ -485,6 +439,10 @@ public class TanluManager implements IMogoMarkerClickListener,
mMApUIController.moveToCenter(latLng);
}
+ private void moveNotFresh() {
+ mMogoStatusManager.setUserInteractionStatus(TAG, true, false);
+ }
+
/**
* marker点击事件
*
@@ -620,15 +578,17 @@ public class TanluManager implements IMogoMarkerClickListener,
.owner(ShareConstants.MODEL_NAME)
.longitude(lon);
- final IMogoMarker mogoAnimationMarker = mMarkerManager.addMarker(ShareConstants.MODEL_NAME, options);
- mogoAnimationMarker.startScaleAnimation(0, 4f, 0, 4f, 500, new LinearInterpolator(), new OnMarkerAnimationListener() {
+ IMogoMarker mogoAnimationMarker = mMarkerManager.addMarker(ShareConstants.MODEL_NAME, options);
+ mogoAnimationMarker.startScaleAnimation(0, 1f, 0, 1f, 500, new LinearInterpolator(), new OnMarkerAnimationListener() {
@Override
public void onAnimStart() {
}
@Override
public void onAnimEnd() {
- mogoAnimationMarker.destroy();
+ UiThreadHandler.postDelayed( () -> {
+ mogoAnimationMarker.destroy();
+ }, 1_200L );
}
});
}
@@ -665,10 +625,6 @@ public class TanluManager implements IMogoMarkerClickListener,
});
}
- private void moveNotFresh() {
- mMogoStatusManager.setUserInteractionStatus(TAG, true, false);
- }
-
private void showBonndsRoadtion() {
Logger.e(TAG, "showBonndsRoadtion markerExploreWayList.size() = " + markerExploreWayList.size());
Logger.d(TAG, "showBonndsRoadtion getMogoList().size() = " + getMogoList().size());
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/ServiceApisManager.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/ServiceApisManager.kt
index 1ebbeeea93..49ca5a0210 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/ServiceApisManager.kt
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/ServiceApisManager.kt
@@ -13,7 +13,6 @@ object ServiceApisManager {
lateinit var serviceApis: IMogoServiceApis
fun init(context: Context) {
- Log.d("liyz", "ServiceApisManager --- init ")
serviceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context) as IMogoServiceApis
}
}
\ No newline at end of file
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
index f76986a2d7..9fff555579 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/manager/UploadHelper.kt
@@ -47,13 +47,12 @@ object UploadHelper {
// 有网就正常上报
ServiceApisManager.serviceApis.statusManagerApi.setUploadingStatus("CARD_TYPE_ROAD_CONDITION", true)
// 上报即成功
- Log.d("liyz", "upload --- init------2---- ")
TanluManager.getInstance(context).shareSuccess(type.eventType, type.location)
val location = ServiceApisManager.serviceApis.mapServiceApi.getSingletonLocationClient(context).lastKnowLocation
val latLon = MogoLatLng(location.latitude, location.longitude)
type.location = latLon
Logger.d("UploadHelper", "upload ----> $type")
- TanluManager.getInstance(context).uploadRoadCondition(type)
+ ServiceApisManager.serviceApis.tanluApi.uploadRoadCondition(type)
//语音播报
showVoiceTip(context, type.eventType)
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/ShareApiService.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/ShareApiService.kt
index eb3619c6a6..1485f30d96 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/ShareApiService.kt
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/ShareApiService.kt
@@ -42,6 +42,6 @@ interface ShareApiService {
*/
@FormUrlEncoded
@POST("/yycp-launcherSnapshot/launcherSnapshot/searchRoadEventsSync")
- fun queryRoadInfos(@FieldMap params: Map?): Observable?>?
+ fun queryRoadInfos(@FieldMap params: Map): Observable>
}
\ No newline at end of file
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/TanluApiService.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/TanluApiService.java
new file mode 100644
index 0000000000..55fe73fab3
--- /dev/null
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/TanluApiService.java
@@ -0,0 +1,31 @@
+package com.mogo.module.share.net;
+
+
+import com.mogo.module.share.bean.BaseDataCompat;
+import com.mogo.module.share.bean.RoadInfos;
+
+import java.util.Map;
+
+import io.reactivex.Observable;
+import retrofit2.http.FieldMap;
+import retrofit2.http.FormUrlEncoded;
+import retrofit2.http.POST;
+
+/**
+ * @author lixiaopeng
+ * @description 探路相关接口定义
+ * @since 2020-01-07
+ */
+public interface TanluApiService {
+
+ /**
+ * 查询(搜索)道路事件信息
+ * 接口文档:http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42305842
+ * 文档中有些参数暂时没有用到,包括radius,limit
+ * @return
+ */
+ @FormUrlEncoded
+ @POST("/yycp-launcherSnapshot/launcherSnapshot/searchRoadEventsSync")
+ Observable> queryRoadInfos(@FieldMap Map params);
+
+}
diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/TanluModelData.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/TanluModelData.java
index aa029fe7fe..71a6442627 100644
--- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/TanluModelData.java
+++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/net/TanluModelData.java
@@ -48,13 +48,13 @@ import static com.mogo.module.share.constant.ShareConstants.TYPE_NAME_BLOCK;
public class TanluModelData {
private final Context mContext;
- private ShareApiService mShareApiService;
+ private TanluApiService mShareApiService;
private static final String TAG = "TanluModelData";
public TanluModelData(Context context) {
this.mContext = context;
IMogoNetwork network = (IMogoNetwork) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_NETWORK).navigation(context);
- mShareApiService = network.create(ShareApiService.class, getBaseUrl());
+ mShareApiService = network.create(TanluApiService.class, getBaseUrl());
}
private String getBaseUrl() {
diff --git a/modules/mogo-module-share/src/main/res/drawable-xhdpi/tanlu_circle_image.png b/modules/mogo-module-share/src/main/res/drawable-xhdpi/tanlu_circle_image.png
index 4b3c40856e..32847b095d 100644
Binary files a/modules/mogo-module-share/src/main/res/drawable-xhdpi/tanlu_circle_image.png and b/modules/mogo-module-share/src/main/res/drawable-xhdpi/tanlu_circle_image.png differ
diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java
index d4e9630b6e..b7cbed5842 100644
--- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java
+++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java
@@ -544,12 +544,10 @@ public class TanluSlideAdapterNew extends RecyclerView.Adapter ");
mRoundLayout.setBackgroundResource(R.drawable.shape_tanlu_top_bg);
break;
case Type_Light:
- Log.d("liyz", "Type_Light ---------> ");
mRoundLayout.setBackgroundResource(R.drawable.shape_tanlu_top_bg_light);
break;
}
diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt
index 4d6228e2e8..d55a6345cb 100644
--- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt
+++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt
@@ -112,8 +112,6 @@ package com.mogo.module.tanlu.video
// completionListener.let {
// it.onCompletion()
// }
-//
-// Log.d("liyz", "MediaCoverVideoPlayer onAutoCompletion ------->")
// }
//
// override fun showWifiDialog() {
diff --git a/settings.gradle b/settings.gradle
index 6dffa6f0a2..849a39e744 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -57,7 +57,7 @@ include ':modules:mogo-module-push-noop'
include ':modules:mogo-module-guide'
-include ':modules:mogo-module-tanlu'
+//include ':modules:mogo-module-tanlu'
include ':libraries:tanlulib'
include ':skin'
include ':test'