diff --git a/app/build.gradle b/app/build.gradle index 075e685ac7..70605f40a2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -341,9 +341,7 @@ dependencies { implementation rootProject.ext.dependencies.modulesplash implementation rootProject.ext.dependencies.moduleV2x implementation rootProject.ext.dependencies.moduleshare -// implementation rootProject.ext.dependencies.moduletanlu, { -// exclude group: 'com.mogo.module', module: 'module-share' -// } + implementation rootProject.ext.dependencies.tanluupload implementation rootProject.ext.dependencies.mogomonitor implementation rootProject.ext.dependencies.mogomoduleback @@ -358,9 +356,7 @@ dependencies { implementation project(':modules:mogo-module-splash') implementation project(':modules:mogo-module-v2x') implementation project(':modules:mogo-module-share') -// implementation project(':modules:mogo-module-tanlu'), { -// exclude group: 'com.mogo.module', module: 'module-share' -// } + implementation project(':libraries:tanlulib') implementation project(':modules:mogo-module-monitor') implementation project(':modules:mogo-module-back') diff --git a/modules/mogo-module-tanlu/.gitignore b/modules/mogo-module-tanlu/.gitignore deleted file mode 100644 index 796b96d1c4..0000000000 --- a/modules/mogo-module-tanlu/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/modules/mogo-module-tanlu/build.gradle b/modules/mogo-module-tanlu/build.gradle deleted file mode 100644 index daff133d4a..0000000000 --- a/modules/mogo-module-tanlu/build.gradle +++ /dev/null @@ -1,85 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' -apply plugin: 'com.alibaba.arouter' - -android { - compileSdkVersion rootProject.ext.android.compileSdkVersion - // buildToolsVersion rootProject.ext.android.buildToolsVersion - defaultConfig { - minSdkVersion rootProject.ext.android.minSdkVersion - targetSdkVersion rootProject.ext.android.targetSdkVersion - versionCode Integer.valueOf(VERSION_CODE) - versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles 'consumer-rules.pro' - - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] - } - } - } - - buildTypes { - release { - minifyEnabled false - zipAlignEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - lintOptions { - abortOnError false - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation rootProject.ext.dependencies.androidxccorektx - implementation rootProject.ext.dependencies.kotlinstdlibjdk7 - implementation rootProject.ext.dependencies.androidxrecyclerview - implementation rootProject.ext.dependencies.androidxappcompat - implementation rootProject.ext.dependencies.arouter - annotationProcessor rootProject.ext.dependencies.aroutercompiler - implementation rootProject.ext.dependencies.androidxconstraintlayout - implementation rootProject.ext.dependencies.rxjava - implementation rootProject.ext.dependencies.rxandroid - implementation rootProject.ext.dependencies.localbroadcastmanager - - if (Boolean.valueOf(RELEASE)) { - compileOnly rootProject.ext.dependencies.mogomap - compileOnly rootProject.ext.dependencies.mogoutils - compileOnly rootProject.ext.dependencies.mogocommons - compileOnly rootProject.ext.dependencies.mogoserviceapi - compileOnly rootProject.ext.dependencies.modulecommon - compileOnly rootProject.ext.dependencies.moduleshare - }else{ - compileOnly project(":libraries:mogo-map") - compileOnly project(":foudations:mogo-utils") - compileOnly project(":foudations:mogo-commons") - compileOnly project(":services:mogo-service-api") - compileOnly project(":modules:mogo-module-common") - compileOnly project(":modules:mogo-module-share") - } - compileOnly rootProject.ext.dependencies.carcallprovider - - implementation rootProject.ext.dependencies.eventbus - - -// if( Boolean.valueOf(RELEASE)){ -// implementation rootProject.ext.dependencies.moduletanlulib -// } else { -// implementation project(":tanlulib") -// } -} -apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() -repositories { - mavenCentral() -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/com.java b/modules/mogo-module-tanlu/com.java deleted file mode 100644 index 4bd93c5158..0000000000 --- a/modules/mogo-module-tanlu/com.java +++ /dev/null @@ -1,13 +0,0 @@ --keep class com.mogo.module.tanlu.model.**{*;} --keep class com.mogo.module.tanlu.fragment.*{*;} --keep class com.mogo.module.tanlu.receiver.*{*;} --keep class com.mogo.module.tanlu.video.*{*;} --keep interface * implements com.mogo.module.tanlu.net.TanluApiService --keep interface * implements com.mogo.module.tanlu.callback.AlongTheWayCallback --keep interface * implements com.mogo.module.tanlu.callback.IThumbsUpCallback --keep interface * implements com.mogo.module.tanlu.callback.NaviCallback --keep interface * implements com.mogo.module.tanlu.callback.RoadInfoCallback --keep interface * implements com.mogo.module.tanlu.callback.RoadLineCallback --keep interface * implements com.mogo.module.tanlu.callback.UploadShareCallback --keep interface * implements com.mogo.module.tanlu.callback.VoiceSearchCallback --keep class com.mogo.module.tanlu.util.*{*;} diff --git a/modules/mogo-module-tanlu/consumer-rules.pro b/modules/mogo-module-tanlu/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/modules/mogo-module-tanlu/gradle.properties b/modules/mogo-module-tanlu/gradle.properties deleted file mode 100644 index 3b59b15369..0000000000 --- a/modules/mogo-module-tanlu/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.module -POM_ARTIFACT_ID=module-tanlu -VERSION_CODE=1 diff --git a/modules/mogo-module-tanlu/proguard-rules.pro b/modules/mogo-module-tanlu/proguard-rules.pro deleted file mode 100644 index abda68c28d..0000000000 --- a/modules/mogo-module-tanlu/proguard-rules.pro +++ /dev/null @@ -1,40 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile --keep class com.mogo.module.tanlu.model.**{*;} --keep class com.mogo.module.tanlu.fragment.*{*;} --keep class com.mogo.module.tanlu.receiver.*{*;} --keep class com.mogo.module.tanlu.video.*{*;} --keep interface * implements com.mogo.module.tanlu.net.TanluApiService --keep interface * implements com.mogo.module.tanlu.callback.AlongTheWayCallback --keep interface * implements com.mogo.module.tanlu.callback.IThumbsUpCallback --keep interface * implements com.mogo.module.tanlu.callback.NaviCallback --keep interface * implements com.mogo.module.tanlu.callback.RoadInfoCallback --keep interface * implements com.mogo.module.tanlu.callback.RoadLineCallback --keep interface * implements com.mogo.module.tanlu.callback.UploadShareCallback --keep interface * implements com.mogo.module.tanlu.callback.VoiceSearchCallback --keep class com.mogo.module.tanlu.util.*{*;} - - - - - - diff --git a/modules/mogo-module-tanlu/src/main/AndroidManifest.xml b/modules/mogo-module-tanlu/src/main/AndroidManifest.xml deleted file mode 100644 index 4337c2942a..0000000000 --- a/modules/mogo-module-tanlu/src/main/AndroidManifest.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/AlongTheWayCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/AlongTheWayCallback.java deleted file mode 100644 index de8c420fc6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/AlongTheWayCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.InformationAndLiveCarResult; - -/** - * @author lixiaopeng - * @description 导航沿途搜索 - * @since 2020-01-09 - */ -public interface AlongTheWayCallback { - void onSuccess(InformationAndLiveCarResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/DataSetChangedAdapter.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/DataSetChangedAdapter.java deleted file mode 100644 index a13c7e2ff1..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/DataSetChangedAdapter.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.service.datamanager.IMogoDataChangedListener; - -/** - * @author congtaowang - * @since 2020-02-12 - *

- * 描述 - */ -public class DataSetChangedAdapter implements IMogoDataChangedListener { - - private Object mData; - - private DataSetChangedAdapter(){ - // private constructor - } - - private static final class InstanceHolder{ - private static final DataSetChangedAdapter INSTANCE = new DataSetChangedAdapter(); - } - - private IMogoDataChangedListener mDelegate; - - public void setDelegate( IMogoDataChangedListener delegate ) { - this.mDelegate = delegate; - } - - public static DataSetChangedAdapter getInstance(){ - return InstanceHolder.INSTANCE; - } - - @Override - public void onDataSetChanged( Object data ) { - mData = data; - if ( mDelegate != null ) { - mDelegate.onDataSetChanged( data ); - } - } - - public Object getData() { - return mData; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/IThumbsUpCallback.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/IThumbsUpCallback.kt deleted file mode 100644 index 0f7f6fb6f6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/IThumbsUpCallback.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.mogo.module.tanlu.callback - -interface IThumbsUpCallback { - fun onThumbsUpSuccess() - fun onThumbsUpFail() -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/NaviCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/NaviCallback.java deleted file mode 100644 index 3eb098bb58..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/NaviCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.NaviResult; - -/** - * @author lixiaopeng - * @description 导航沿途数据 - * @since 2020-01-09 - */ -public interface NaviCallback { - void onSuccess(NaviResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadInfoCallback.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadInfoCallback.kt deleted file mode 100644 index 503f675283..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadInfoCallback.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.mogo.module.tanlu.callback - -import com.mogo.module.common.entity.MarkerExploreWay -import com.mogo.module.tanlu.model.RoadInfos - -interface RoadInfoCallback { - fun onLocatSuccess(lat: Double, lon: Double) - fun onQueryRoadInfoSuccess(roadInfoList:List) - fun onQueryRoadInfoFail(msg: String, code: Int) - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadLineCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadLineCallback.java deleted file mode 100644 index 53e81c13dc..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/RoadLineCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.PathLineResult; - -/** - * @author lixiaopeng - * @description 通勤族回调 - * @since 2020-01-09 - */ -public interface RoadLineCallback { - void onSuccess(PathLineResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/UploadShareCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/UploadShareCallback.java deleted file mode 100644 index 550b674874..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/UploadShareCallback.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.commons.data.BaseData; - - -/** - * @author lixiaopeng - * @description 上报分享 废弃 - * @since 2020-01-09 - */ -public interface UploadShareCallback { - void onSuccess(BaseData data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/VoiceSearchCallback.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/VoiceSearchCallback.java deleted file mode 100644 index 6b0913e7fb..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/callback/VoiceSearchCallback.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.callback; - -import com.mogo.module.tanlu.model.VoiceSearchResult; - -/** - * @author lixiaopeng - * @description 声音控制搜索回调 - * @since 2020-01-09 - */ -public interface VoiceSearchCallback { - void onSuccess(VoiceSearchResult data); - void onFail(String message, int code); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/Const.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/Const.kt deleted file mode 100644 index 75800d758b..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/Const.kt +++ /dev/null @@ -1,34 +0,0 @@ -package com.mogo.module.tanlu.constant - -const val REQUESTCODE_MAINACTIVITY = 0 -const val REQUESTCODE_MEDIAACTIVITY = 1 - -//EXTRA_STATE -const val AUTO_NAVI_START = 8 //开始导航 -const val AUTO_NAVI_END = 9 //结束导航 - -// 道路事件名称,用于语音识别区分道路事件 -const val TYPE_NAME_BLOCK = "拥堵" -const val TYPE_NAME_TRAFFIC_CHECK = "交通检查" -const val TYPE_NAME_CLOSURE = "封路" -const val TYPE_NAME_ACCIDENT = "交通事故" -const val TYPE_NAME_REAL_TIME_TRAFFIC = "实时路况" -const val TYPE_NAME_STAGNANT_WATER = "积水" -const val TYPE_NAME_ROAD_ICY = "积冰" -const val TYPE_NAME_DENSE_FOG = "雾" -const val TYPE_NAME_ROAD_CONSTRUCTION = "施工" - -/** - * 搜索交通检查 - */ -const val VOICE_COMMAND_QUERY_TRAFFIC_CHECK = "com.zhidao.share.traffic.police" - -/** - * 搜索封路信息 - */ -const val VOICE_COMMAND_QUERY_ROAD_CLOSED = "com.zhidao.share.road.closure.query" - -/** - * 其他道路事件,包括事故,实时路况,道路积水,道路积冰,浓雾 - */ -const val VOICE_COMMAND_NOVELTY_QUERY = "com.zhidao.novelty.query" diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/HttpConst.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/HttpConst.java deleted file mode 100644 index db8261e5c3..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/HttpConst.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.mogo.module.tanlu.constant; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class HttpConst { - public static final String HOST_DEV = "http://dzt-test.zhidaohulian.com"; - public static final String HOST_SHOW = "http://dzt-show.zhidaohulian.com"; - public static final String HOST_TEST = "http://dzt-test.zhidaohulian.com"; - public static final String HOST_PRODUCT = "https://dzt.zhidaohulian.com"; -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java deleted file mode 100644 index eb5dad8178..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/constant/TanluConstants.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.mogo.module.tanlu.constant; - -/** - * @author congtaowang - * @since 2019-12-24 - *

- * 描述 - */ -public class TanluConstants { - - /** - * 加油 10001 - * 交通检查 10002 - * 封路 10003 - * 商场打折 10004 - * 4S店 10005 - * 施工 10006 - * 拥堵 10007 - * 积水 10008 - * 超市折扣 10009 - * 浓雾 10010 - * 结冰 10011 - * 停车场 10012 - * 交通事故 10013 - * 社保 10014 - * 实时路况 10015 - */ - public static final String TANLU_ROAD_PONDING = "10008"; //积水 - public static final String TANLU_ROAD_ICING = "10011"; //积冰 - public static final String TANLU_ROAD_HEAVY_FOG = "10010"; //大雾 - public static final String TANLU_ROAD_ACCIDENT = "10013"; //事故 - public static final String TANLU_ROAD_CONSTRUCTION = "10006"; //道路施工 - public static final String TANLU_ROAD_CONGESTION_COMPAT = "10007"; //拥堵,适配语音不做数值转换 - public static final String TANLU_TRAFFIC_CHECK_COMPAT = "10002"; //交通检查,适配语音不做数值转换 - public static final String TANLU_ROAD_CLOSURE_COMPAT = "10003"; //封路,适配语音不做数值转换 - public static final String TANLU_ROAD_CURRENT = "10015"; //实时路况 - - - public static final String TAG = "/tanlu/ui"; - public static final String NAVI_INFO = "navi_info"; - public static final String MODEL_NAME = "CARD_TYPE_ROAD_CONDITION"; - - public static final String[] CMD_PLAY_ROAD_CONDITION = {"播放路况"}; - public static final String[] CMD_THE_PREVIOUS = {"上一条"}; - public static final String[] CMD_THE_NEXT = {"下一条"}; - public static final String[] CMD_UPLOAD_BLOCK = {"上报拥堵"}; - public static final String[] CMD_TRAFFIC_CHECK = {"上报交通检查"}; - public static final String[] CMD_ROAD_CLOSURE = {"上报封路"}; - - //上报拥堵 - public static final String UPLOAD_ROAD_BLOCK = "command_upload_block"; - //上报交通检查 - public static final String UPLOAD_TRAFFIC_CHECK = "command_upload_traffic_check"; - //上报封路 - public static final String UPLOAD_ROAD_CLOSURE = "command_upload_road_closure"; - - //上报路况 - public static final String UPLOAD_ROAD_CONDITION = "command_upload_roadcondition"; - //打开探路 免唤醒 - public static final String OPEN_ROADCONDITION = "command_open_roadcondition"; - //打开探路 唤醒 - public static final String OPEN_ROADCONDITION_AWAKE = "com.zhidao.desk.switchCard"; - //打开探路 唤醒 - public static final String OPEN_ROADCONDITION_AWAKE_COMMAND = "system.application.operation"; - - // 同行者 xx堵不堵 唤醒 - public static final String TXZ_SPECIFIEDROAD_SEARCH = "com.zhidao.roadcondition.roadinfo"; - - //思必驰 xx堵不堵 唤醒 - public static final String SPECIFIEDROAD_SEARCH = "com.zhidao.pathfinder.specifiedroad.search"; - //播放 免唤醒 - public static final String PLAY_VIDEO = "com.zhidao.tanlu.play"; - //播放 唤醒 - public static final String PLAY_VIDEO_AWAKEN = "com.zhidao.pathfinder.play.roadCondition"; - //分享路况/上报路况/上报拥堵/上报交通检查/上报封路 唤醒 - public static final String UPLOAD_ROAD_CONDITION_AWAKEN = "com.zhidao.pathfinder.report.roadCondition"; - //关闭分享框 唤醒 - public static final String SHARE_DIALOG_CLOSE = "com.zhidao.share.close"; - - public static final String AWAKE_NOTIFY = "com.zhidao.speech.awake.notify"; - - - //上一条 -// public static final String THE_PREVIOUS = "com.zhidao.tanlu.previous"; - //下一条 -// public static final String THE_NEXT = "com.zhidao.tanlu.next"; - - //分享封路 - public static final String SHARE_ROAD_CLOSURE = "com.zhidao.share.road.closure"; - //分享交通检查 - public static final String SHARE_TRAFFIC_CHECK = "com.zhidao.share.traffic.check"; - //我要分享 - public static final String GO_TO_SHARE = "com.zhidao.share"; - - //埋点数据 - //marker点击 - public static final String LAUNCHER_ICON_CLICK = "Launcher_Icon_Click"; - //分享分类 1:路况,2:油价,3:交通检查,4:封路 - public static final String LAUNCHER_SHARE_TYPE = "Launcher_Share_type"; - //分享/上报按钮点击 from=1 手动点击 from=2 语音打开 - public static final String LAUNCHER_SHARE_CLICK = "Launcher_Share_Click"; - public static final String CARNET_USER_UPLOAD = "CarNet_user_upload"; - - public static final String CARNET_ROAD_ENVENT = "v2x_road_event"; - - //语音搜索 - public static final String CARNET_VOICE_SEARCH = "CarNet_Voice_Search"; - - //视频播放 - public static final String CARNET_USER_VIDEO_PLAY = "CarNet_user_video_play"; - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewProvider.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewProvider.java deleted file mode 100644 index 74ed7bc9e3..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewProvider.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.mogo.module.tanlu.fragment; - -import android.content.Context; -import android.content.Intent; - -import com.alibaba.android.arouter.facade.annotation.Route; -import com.mogo.map.MogoLatLng; -import com.mogo.module.tanlu.callback.DataSetChangedAdapter; -import com.mogo.module.tanlu.model.event.MarkerInfo; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.service.share.IMogoTanluUiProvider; -import com.mogo.utils.logger.Logger; - -import org.greenrobot.eventbus.EventBus; - -import io.reactivex.Single; -import io.reactivex.SingleOnSubscribe; -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.disposables.Disposable; -import io.reactivex.schedulers.Schedulers; - -/** - * @author congtaowang - * @since 2019-12-24 - *

- * 描述 - */ -@Route( path = TanluConstants.TAG ) -public class TanluCardViewProvider implements IMogoTanluUiProvider { - - private static final String TAG = "TanluCardViewProvider"; - - private TanluListWindow tanluListWindow; - @Override - public void init( Context context ) { - Logger.d(TAG, "init --------------> 1"); -// TanluServiceManager.init( context ); -// TanluServiceManager.getDataManager().registerDataListener( TanluConstants.MODEL_NAME, DataSetChangedAdapter.getInstance() ); -// -// tanluListWindow = new TanluListWindow(context); -// tanluListWindow.initWindow(); - } - - @Override - public void searchRoadCondition(String intentStr, String data, String city, String keywords) { - Disposable disposable = Single.create((SingleOnSubscribe) emitter -> { - Logger.d(TAG, "searchRoadCondition---> intentStr: " + intentStr + " data: " + data + " " + - "city: " + city + " keywords: " + keywords); - Intent intent = new Intent(intentStr); - intent.putExtra("data", data); - intent.putExtra("city", city); - intent.putExtra("keywords", keywords); - Thread.sleep(3000); - emitter.onSuccess(intent); - }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(intent -> { - Logger.d(TAG, "searchRoadCondition---go real share"); - tanluListWindow.realShare(intentStr, intent); - }); - } - - @Override - public void shareSuccess(String poiType, MogoLatLng location) { - MarkerInfo markerInfo = new MarkerInfo(poiType, "", location.lon, location.lat, true, "1"); - EventBus.getDefault().post(markerInfo); - } - - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java deleted file mode 100644 index 244dafdc50..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluListWindow.java +++ /dev/null @@ -1,1600 +0,0 @@ -package com.mogo.module.tanlu.fragment; - -import android.content.Context; -import android.content.Intent; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.Rect; -import android.location.LocationManager; -import android.net.Uri; -import android.os.CountDownTimer; -import android.os.Handler; -import android.text.TextUtils; -import android.util.AttributeSet; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.view.WindowManager; -import android.view.animation.AccelerateInterpolator; -import android.view.animation.Interpolator; -import android.view.animation.LinearInterpolator; -import android.widget.RelativeLayout; - -import androidx.annotation.NonNull; -import androidx.localbroadcastmanager.content.LocalBroadcastManager; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.PagerSnapHelper; -import androidx.recyclerview.widget.RecyclerView; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.commons.data.BaseData; -import com.mogo.commons.voice.AIAssist; -import com.mogo.commons.voice.IMogoVoiceCmdCallBack; -import com.mogo.map.MogoLatLng; -import com.mogo.map.location.MogoLocation; -import com.mogo.map.marker.IMogoMarker; -import com.mogo.map.marker.IMogoMarkerClickListener; -import com.mogo.map.marker.IMogoMarkerManager; -import com.mogo.map.marker.MogoMarkerOptions; -import com.mogo.map.marker.anim.OnMarkerAnimationListener; -import com.mogo.map.navi.IMogoNaviListener; -import com.mogo.map.navi.MogoNaviInfo; -import com.mogo.map.navi.MogoTraffic; -import com.mogo.map.search.geo.IMogoGeoSearch; -import com.mogo.map.search.geo.IMogoGeoSearchListener; -import com.mogo.map.search.geo.MogoGeocodeAddress; -import com.mogo.map.search.geo.MogoGeocodeResult; -import com.mogo.map.search.geo.MogoPoiItem; -import com.mogo.map.search.geo.MogoRegeocodeResult; -import com.mogo.map.search.poisearch.IMogoPoiSearch; -import com.mogo.map.search.poisearch.IMogoPoiSearchListener; -import com.mogo.map.search.poisearch.MogoPoiResult; -import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; -import com.mogo.map.uicontroller.IMogoMapUIController; -import com.mogo.module.common.entity.MarkerExploreWay; -import com.mogo.module.common.entity.MarkerExploreWayItem; -import com.mogo.module.common.entity.MarkerLocation; -import com.mogo.module.common.entity.MarkerShowEntity; -import com.mogo.module.common.entity.MarkerUserInfo; -import com.mogo.module.common.entity.V2XMessageEntity; -import com.mogo.module.common.entity.V2XRoadEventEntity; -import com.mogo.module.common.utils.Const; -import com.mogo.module.tanlu.R; -import com.mogo.module.tanlu.callback.DataSetChangedAdapter; -import com.mogo.module.tanlu.callback.NaviCallback; -import com.mogo.module.tanlu.callback.RoadInfoCallback; -import com.mogo.module.tanlu.callback.RoadLineCallback; -import com.mogo.module.tanlu.callback.UploadShareCallback; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.module.tanlu.fragment.recycler.TanluSlideAdapterNew; -import com.mogo.module.tanlu.model.Center; -import com.mogo.module.tanlu.model.Information; -import com.mogo.module.tanlu.model.Items; -import com.mogo.module.tanlu.model.NaviResult; -import com.mogo.module.tanlu.model.PathLineResult; -import com.mogo.module.tanlu.model.TanluModelData; -import com.mogo.module.tanlu.model.VoiceCmdData; -import com.mogo.module.tanlu.model.event.CloseWindowInfo; -import com.mogo.module.tanlu.model.event.ControlClickUpInfo; -import com.mogo.module.tanlu.model.event.DataErrorInfo; -import com.mogo.module.tanlu.model.event.GetInfoError; -import com.mogo.module.tanlu.model.event.MarkerInfo; -import com.mogo.module.tanlu.model.event.PushTypeInfo; -import com.mogo.module.tanlu.model.event.StartPlayInfo; -import com.mogo.module.tanlu.model.event.VoiceControlUpInfo; -import com.mogo.module.tanlu.util.LocationUtils; -import com.mogo.module.tanlu.util.Utils; -import com.mogo.module.tanlu.view.NetErrorDialog; -import com.mogo.module.tanlu.view.UploadFailedDialog; -import com.mogo.service.MogoServicePaths; -import com.mogo.service.adas.IMogoADASController; -import com.mogo.service.analytics.IMogoAnalytics; -import com.mogo.service.datamanager.IMogoDataChangedListener; -import com.mogo.service.imageloader.IMogoImageloader; -import com.mogo.service.intent.IMogoIntentListener; -import com.mogo.service.intent.IMogoIntentManager; -import com.mogo.service.module.IMogoActionListener; -import com.mogo.service.module.IMogoActionManager; -import com.mogo.service.module.IMogoModuleLifecycle; -import com.mogo.service.module.IMogoRegisterCenter; -import com.mogo.service.module.MogoAction; -import com.mogo.service.statusmanager.IMogoStatusManager; -import com.mogo.service.windowview.IMogoTopViewStatusListener; -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; -//import com.shuyu.gsyvideoplayer.GSYVideoManager; - -import org.greenrobot.eventbus.EventBus; -import org.greenrobot.eventbus.Subscribe; -import org.greenrobot.eventbus.ThreadMode; -import org.jetbrains.annotations.NotNull; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import static com.mogo.module.tanlu.constant.ConstKt.TYPE_NAME_BLOCK; -import static com.mogo.module.tanlu.constant.ConstKt.TYPE_NAME_CLOSURE; -import static com.mogo.module.tanlu.constant.ConstKt.TYPE_NAME_TRAFFIC_CHECK; -import static com.mogo.module.tanlu.constant.ConstKt.VOICE_COMMAND_NOVELTY_QUERY; -import static com.mogo.module.tanlu.constant.ConstKt.VOICE_COMMAND_QUERY_ROAD_CLOSED; -import static com.mogo.module.tanlu.constant.ConstKt.VOICE_COMMAND_QUERY_TRAFFIC_CHECK; -import static com.mogo.module.tanlu.constant.TanluConstants.PLAY_VIDEO_AWAKEN; -import static com.mogo.module.tanlu.constant.TanluConstants.SPECIFIEDROAD_SEARCH; -import static com.mogo.module.tanlu.constant.TanluConstants.TXZ_SPECIFIEDROAD_SEARCH; -//import static com.mogo.module.tanlu.video.VideoInitKt.initVideo; - -/** - * @author lixiaopeng - * @description 探路和新鲜事的view - * @since 2020/5/19 - */ -public class TanluListWindow extends RelativeLayout implements IMogoMarkerClickListener, - IMogoPoiSearchListener, - View.OnClickListener, - IMogoModuleLifecycle, - IMogoDataChangedListener, -// IMogoStatusChangedListener, - IMogoGeoSearchListener { - - private static final String TAG = "TanluListWindow"; - private Context mContext; - //map - private IMogoMarkerManager mMarkerManager; - private IMogoStatusManager mMogoStatusManager; - private IMogoIntentManager mogoIntentManager; - private IMogoMapUIController mMApUIController; - private IMogoAnalytics mAnalytics; - private IMogoGeoSearch mIMogoGeoSearch; - private IMogoADASController mADASController; - private IMogoImageloader mogoImageloader; - - //语音上一条,下一条 - private IMogoActionManager mActionManager; - - //声音控制文字 - private String voiceGetInfoMationTts; - private String[] searchingVoiceStrings; - private String[] searchfaileVoiceStrings; - private String voiceShareSuccessTts; - - private List markerExploreWayList = new ArrayList<>(); - private int mCurrentPosition = 0; //卡片媒体当前位置 - private Bitmap multiMarkerIcon; - private TanluModelData mTanluModelData; - private List passedByPoints; - private IMogoRegisterCenter mMogoRegisterCenter; - private String mKeywords; - private String mCity; - Random mRandom = new Random(); - - //新修改 - private RecyclerView mLoopRecyclerView; - private TanluSlideAdapterNew mTanluSlideAdapter; - - - public TanluListWindow(Context context) { - super(context); - mContext = context; - } - - public TanluListWindow(Context context, AttributeSet attrs) { - super(context, attrs); - mContext = context; - } - - public TanluListWindow(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - mContext = context; - } - - public void initWindow() { - EventBus.getDefault().register(this); - initInterface(); - initModelData(); - initViews(); - initMap(); - initStrings(); - initListener(); - initData(DataSetChangedAdapter.getInstance().getData(), markerExploreWayList); - } - - protected void initViews() { - LayoutInflater.from(mContext).inflate(R.layout.tanlu_main_media_recycler_new, this); -// initVideo(); - mLoopRecyclerView = findViewById(R.id.tanlu_rloop_recycleview); - mLoopRecyclerView.setHasFixedSize(true); - mLoopRecyclerView.setOverScrollMode(OVER_SCROLL_NEVER); - - LinearLayoutManager layoutManager = new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false); - mLoopRecyclerView.setLayoutManager(layoutManager); - - mTanluSlideAdapter = new TanluSlideAdapterNew(mContext, mAnalytics, mTanluModelData, mogoImageloader, mMogoRegisterCenter); - mLoopRecyclerView.setAdapter(mTanluSlideAdapter); - - //保证滑动单页显示 - PagerSnapHelper snapHelper = new PagerSnapHelper(); - snapHelper.attachToRecyclerView(mLoopRecyclerView); - - //滑动监听 - mLoopRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() { - @Override - public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) { - super.onScrollStateChanged(recyclerView, newState); - } - - @Override - public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { - super.onScrolled(recyclerView, dx, dy); - } - }); - } - - private void moveNotFresh() { - mMogoStatusManager.setUserInteractionStatus(TAG, true, false); - } - - /** - * 构造经纬度列表 - * - * @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() { - mActionManager = TanluServiceManager.getServiceApis().getActionManagerApi(); - mADASController = TanluServiceManager.getServiceApis().getAdasControllerApi(); - //地图marker,地图操作 - mMarkerManager = TanluServiceManager.getMapService().getMarkerManager(mContext); - mMApUIController = TanluServiceManager.getMapService().getMapUIController(); - //地图逆序 - mIMogoGeoSearch = TanluServiceManager.getMapService().getGeoSearch(mContext); - //唤醒 - mogoIntentManager = TanluServiceManager.getMogoIntentManager(); - mMogoStatusManager = TanluServiceManager.getMogoStatusManager(); - mAnalytics = TanluServiceManager.getAnalytics(); - mMogoRegisterCenter = TanluServiceManager.getIMogoRegisterCenter(); - mMogoRegisterCenter.registerMogoModuleLifecycle(TanluConstants.MODEL_NAME, this); - mogoImageloader = (IMogoImageloader) ARouter.getInstance().build(MogoServicePaths.PATH_UTILS_IMAGE_LOADER).navigation(); - - mIMogoGeoSearch.setGeoSearchListener(this); - DataSetChangedAdapter.getInstance().setDelegate(this); - } - - private void initModelData() { - if (mTanluModelData == null) { - mTanluModelData = new TanluModelData(mContext); - } - } - - @Override - public void onRegeocodeSearched(MogoRegeocodeResult regeocodeResult) { - Logger.d(TAG, "onRegeocodeSearched -----> "); - } - - @Override - public void onGeocodeSearched(MogoGeocodeResult geocodeResult) { - Logger.d(TAG, "onGeocodeSearched ------mKeywords =" + mKeywords); - if (geocodeResult != null) { - if (geocodeResult.getAddresses() != null && geocodeResult.getAddresses().size() > 0) { - Logger.d(TAG, "geocodeResult.getAddresses().size() = " + geocodeResult.getAddresses().size()); - MogoGeocodeAddress geocodeAddress = geocodeResult.getAddresses().get(0); - MogoLatLng latLon = geocodeAddress.getLatlng(); - Double longit; //经度 - Double lat; //维度 - if (mKeywords.equals("附近")) { - Logger.d(TAG, "附近 ----1---"); - longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude(); - lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); - } else { - Logger.d(TAG, "其他 ---1----"); - longit = latLon.lng; - lat = latLon.lat; - } - Logger.d(TAG, "geoSearch keywords =" + mKeywords + ">>longitude= " + longit + "--latitude= " + lat); -// getVoiceControlRoadData(mKeywords, lat, longit); - } else { - Logger.d(TAG, "onGeocodeSearched ------mKeywords =" + mKeywords); - handlePoi(mKeywords); - } - } else { - Logger.e(TAG, "geocodeResult.getAddresses() == null"); - speakFailVoice(searchfaileVoiceStrings[2]); - } - } - - - /** - * 初始化导航 - */ - private void initMap() { - mMogoRegisterCenter.registerMogoNaviListener(TanluConstants.MODEL_NAME, new IMogoNaviListener() { - @Override - public void onInitNaviFailure() { - } - - @Override - public void onInitNaviSuccess() { - } - - @Override - public void onNaviInfoUpdate(MogoNaviInfo naviinfo) { - } - - @Override - public void onStartNavi() { //开始导航 - Logger.d(TAG, "onStartNavi ------> "); -// initModelData(); -// getNavigationData(); - } - - @Override - public void onStopNavi() { - } - - @Override - public void onCalculateSuccess() { - } - - @Override - public void onoCalculateFailed() { - } - - @Override - public void onUpdateTraffic(MogoTraffic traffic) { - } - }); - -// //监听marker点击 -// mMogoRegisterCenter.registerMogoMarkerClickListener(TanluConstants.MODEL_NAME, new IMogoMarkerClickListener() { -// @Override -// public boolean onMarkerClicked(IMogoMarker marker) { -// GSYVideoManager.releaseAllVideos(); -// initVideo(); -// releaseTimer(); -// //埋点 -// Map properties = new HashMap<>(); -// properties.put("type", "2"); -// mAnalytics.track(TanluConstants.LAUNCHER_ICON_CLICK, properties); -// //点击的marker的具体数据 -// MarkerExploreWay exploreWay = extractFromMarker(marker); -// //更新数据 -// if (markerExploreWayList != null) { -// markerExploreWayList.clear(); -// } else { -// markerExploreWayList = new ArrayList<>(); -// } -// markerExploreWayList.add(exploreWay); -// -// boolean isAdd = TanluServiceManager.getIMogoTopViewManager().isViewAdded(TanluListWindow.this); -// hideWindowTimerStart(); -// Logger.d(TAG, "onMarkerClicked ------ isAdd = " + isAdd); -// -// //添加window窗口,重复创建 -// if (!isAdd) { -// ViewGroup.LayoutParams layoutParams = -// new ViewGroup.LayoutParams( -// ViewGroup.LayoutParams.MATCH_PARENT, -// (int) getContext().getResources().getDimension((R.dimen.tanlu_module_card_height))); -// TanluServiceManager.getIMogoTopViewManager().addView(TanluListWindow.this, layoutParams, new IMogoTopViewStatusListener() { -// @Override -// public void onViewAdded(View view) { -// Logger.d(TAG, "onViewAdded -------->"); -// } -// -// @Override -// public void onViewRemoved(View view) { -// Logger.e(TAG, "onViewRemoved -------->"); -// releaseTimer(); -// releaseAction(); -// } -// -// @Override -// public void beforeViewAddAnim(View view) { -// -// } -// -// @Override -// public void beforeViewRemoveAnim(View view) { -// -// } -// }); -// -// } -// -// renderCardViews(); -// -// return false; -// } -// }); -// } - } - - private CountDownTimer mHideWindowTimer; - - private void hideWindowTimerStart() { - if (mHideWindowTimer == null) { - mHideWindowTimer = new CountDownTimer(30000, 1000) { - @Override - public void onTick(long millisUntilFinished) { - } - - @Override - public void onFinish() { - releaseTimer(); - TanluServiceManager.getIMogoTopViewManager().removeView(TanluListWindow.this); - } - }; - } - mHideWindowTimer.start(); - } - - private void releaseTimer() { - if (mHideWindowTimer != null) { - mHideWindowTimer.cancel(); - mHideWindowTimer = null; - } - } - - @Subscribe(threadMode = ThreadMode.MAIN) - public void onCloseWindow(final CloseWindowInfo event) { - if (event == null) { - return; - } - - releaseTimer(); - TanluServiceManager.getIMogoTopViewManager().removeView(TanluListWindow.this); - } - - /** - * poi 搜索 - * - * @param keywords - */ - private void handlePoi(String keywords) { - String cityCode = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityCode(); - MogoPoiSearchQuery poiSearchQuery = new MogoPoiSearchQuery(keywords, "", cityCode); - IMogoPoiSearch poiSearch = TanluServiceManager.getMapService().getPoiSearch(mContext, poiSearchQuery); - poiSearch.setPoiSearchListener(this); - poiSearch.searchPOIAsyn(); - } - - /** - * 注册listener监听 - */ - private void initListener() { - if (mogoIntentManager != null) { - // 同行者 xxx堵不堵唤醒词语音注册 - Logger.d(TAG, "initListener===="); - mogoIntentManager.registerIntentListener(TXZ_SPECIFIEDROAD_SEARCH, mogoIntentListener); - // 通用唤醒词语音注册 - mogoIntentManager.registerIntentListener(SPECIFIEDROAD_SEARCH, mogoIntentListener); - mogoIntentManager.registerIntentListener(PLAY_VIDEO_AWAKEN, mogoIntentListener); - mogoIntentManager.registerIntentListener(VOICE_COMMAND_QUERY_TRAFFIC_CHECK, mogoIntentListener); - mogoIntentManager.registerIntentListener(VOICE_COMMAND_QUERY_ROAD_CLOSED, mogoIntentListener); - mogoIntentManager.registerIntentListener(VOICE_COMMAND_NOVELTY_QUERY, mogoIntentListener); - } - - AIAssist.getInstance(mContext).registerUnWakeupCommand(TanluConstants.PLAY_VIDEO, - TanluConstants.CMD_PLAY_ROAD_CONDITION, mogoVoiceListener); - if (mActionManager != null) { - mActionManager.registerActionListener(TanluConstants.MODEL_NAME, mogoActionListener); - } - } - - Double currentLat = 0.0; //维度 - Double currentLon = 0.0;//经度 - - /** - * 唤醒语音 - */ - private IMogoIntentListener mogoIntentListener = (intentStr, intent) -> { - AIAssist.getInstance(getContext()).speakTTSVoice(searchingVoiceStrings[mRandom.nextInt(3)], null); - if (TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) { - // 直接执行相关查询操作 - Logger.d(TAG, "智慧出行在前台,可直接分享--->"); - realShare(intentStr, intent); - } else { - // 需要打开智慧驾驶,然后执行操作 - Logger.d(TAG, "智慧出行没在前台,需要打开 --->"); - intent.setAction(Intent.ACTION_VIEW); - String data = intent.getStringExtra("data") == null ? "" : intent.getStringExtra("data"); - String city = intent.getStringExtra("city") == null ? "" : intent.getStringExtra("city"); - String keywords = intent.getStringExtra("keywords") == null ? "" : intent.getStringExtra("keywords"); - intent.setData(Uri.parse("mogo://launcher/main/switch2?type=search-road-condition" + - "&intentStr=" + intentStr + "&data=" + data + "&city=" + city + "&keywords=" + keywords)); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - mContext.startActivity(intent); - } - }; - - public void realShare(String intentStr, Intent intent) { - String data = intent.getStringExtra("data"); - Logger.d(TAG, "唤醒 mogoIntentListener intentStr =" + intentStr + ">>data =" + data); - VoiceCmdData voiceData = null; - switch (intentStr) { - case VOICE_COMMAND_QUERY_TRAFFIC_CHECK: - // 搜索交通检查 - Logger.d(TAG, "搜索交通检查"); - voiceData = Utils.parseTOVoiceCmdData(data); - voiceData.setObj(TYPE_NAME_TRAFFIC_CHECK); - break; - case VOICE_COMMAND_QUERY_ROAD_CLOSED: - // 搜索封路 - Logger.d(TAG, "搜索封路"); - voiceData = Utils.parseTOVoiceCmdData(data); - voiceData.setLocation(voiceData.getObj()); - voiceData.setObj(TYPE_NAME_CLOSURE); - break; - case SPECIFIEDROAD_SEARCH: - // 拥堵和路况 - Logger.d(TAG, "拥堵和路况"); - voiceData = Utils.parseTOVoiceCmdData(data); - voiceData.setObj(TYPE_NAME_BLOCK); - mKeywords = voiceData.getLocation(); - break; - case VOICE_COMMAND_NOVELTY_QUERY: - Logger.d(TAG, "其他"); - voiceData = Utils.parseTOVoiceCmdData(data); - break; - case PLAY_VIDEO_AWAKEN: - Logger.d(TAG, "mogoIntentListener 播放路况 唤醒 ----> "); - delayTime(); - break; - case TXZ_SPECIFIEDROAD_SEARCH: - Logger.d(TAG, "同行者--xx堵不堵--唤醒--->"); - String keyWords = intent.getStringExtra("keywords"); - mKeywords = keyWords; - String city = intent.getStringExtra("city"); - voiceData = new VoiceCmdData("", city + keyWords, TYPE_NAME_BLOCK); - break; - default: - break; - } - - if (voiceData != null) { - mTanluModelData.queryRodeInfo(voiceData, new RoadInfoCallback() { - @Override - public void onQueryRoadInfoSuccess(@NotNull List roadInfoList) { - if (roadInfoList == null || (roadInfoList != null && roadInfoList.size() <= 0)) { - speakFailVoice("未发现" + mKeywords + "附近的特殊路况"); - moveToMarcker(currentLat, currentLon); - return; - } - Logger.d(TAG, "onQueryRoadInfoSuccess roadInfoList.size() = " + roadInfoList.size() - + " >>currentLat = " + currentLat + " -->currentLon = " + currentLon); - MogoLocation location = TanluServiceManager.getLocationClient().getLastKnowLocation(); - if (location != null) { - mCity = location.getCityName(); - } - initData(null, (List) roadInfoList); - addMarkersAction((List) roadInfoList, currentLat, currentLon); - } - - @Override - public void onQueryRoadInfoFail(@NotNull String msg, int code) { - Logger.e(TAG, "onQueryRoadInfoFail ----- msg = " + msg); -// speakFailVoice(searchfaileVoiceStrings[2]); - speakFailVoice("未发现" + mKeywords + "附近的特殊路况"); - moveToMarcker(currentLat, currentLon); - } - - @Override - public void onLocatSuccess(double lat, double lon) { - currentLat = lat; - currentLon = lon; - } - }); - } - } - - /** - * 添加marker - */ - private void addMarkersAction(List list, final double lat, final double lon) { - //播报搜索结果 - speakSuccessVoice(list, ""); - - //移动到具体位置 - if (mMogoStatusManager != null) { - mMogoStatusManager.setUserInteractionStatus(TanluConstants.MODEL_NAME, true, true); - } - moveToMarcker(lat, lon); - inputlon = lon; - inputlat = lat; - - Logger.d(TAG, "addMarker lat =" + lat + ">>>lon =" + lon); - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - markerExploreWayList.clear(); //刷新之前先删除之前的,然后再添加成请求的 - mCurrentPosition = 0; - } - markerExploreWayList.addAll(list); - - //清除探路之前的数据 - if (mMarkerManager != null) { - mMarkerManager.removeMarkers(TanluConstants.MODEL_NAME); - } - //添加埋点数据 - datalon = list.get(0).getLocation().getLon(); - datalat = list.get(0).getLocation().getLat(); - - for (int i = 0; i < list.size(); i++) { - MarkerShowEntity markerShowEntity = new MarkerShowEntity(); - markerShowEntity.setBindObj(markerExploreWayList.get(i)); - markerShowEntity.setTextContent(list.get(i).getAddr()); - markerShowEntity.setMarkerLocation(markerExploreWayList.get(i).getLocation()); - markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME); - - TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity); - - try { - post2AddAndStartAnimation(markerShowEntity, i * 100L); - } catch (Exception e) { - e.printStackTrace(); - } - } - - //防止刷新策略改变 - mMogoStatusManager.setUserInteractionStatus(TanluConstants.MODEL_NAME, true, true); - //展示6个在区域内显示 - showBonndsRoadtion(); - //直接使用当前数据list,作为切换的数据源,切换左侧列表到最新的数据 - } - - - /** - * marker动画 - * - * @param entity - * @param delay - */ - private void post2AddAndStartAnimation(MarkerShowEntity entity, long delay) { - if (entity == null) { - return; - } - WorkThreadHandler.getInstance().postDelayed(() -> { - if (entity == null) { - return; - } - - IMogoMarker marker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(entity); - marker.startScaleAnimation(0, 1.2f, 0, 1.2f, 300, new AccelerateInterpolator(), new OnMarkerAnimationListener() { - @Override - public void onAnimStart() { -// Logger.d(TAG, " onAnimStart ---1----> "); - } - - @Override - public void onAnimEnd() { - if (marker.isDestroyed()) { - return; - } - marker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null); - } - }); - }, delay); - } - - - @Override - public void onDataSetChanged(Object data) { - initData(data, markerExploreWayList); - } - - /** - * 免唤醒语音监听 - */ - private IMogoVoiceCmdCallBack mogoVoiceListener = new IMogoVoiceCmdCallBack() { - @Override - public void onCmdSelected(String cmd) { - Logger.d(TAG, "mogoVoiceListener cmd = " + cmd); - if (cmd.equals(TanluConstants.PLAY_VIDEO)) { //播放路况 --ok - //语音会中断播放 - AIAssist.getInstance(getContext()).speakTTSVoice(mContext.getString(R.string.tanlu_prepare_play), null); - delayTime(); - } - } - - @Override - public void onCmdAction(String speakText) { - } - - @Override - public void onCmdCancel(String speakText) { - } - - @Override - public void onSpeakEnd(String speakText) { - } - - @Override - public void onSpeakSelectTimeOut(String speakText) { - } - }; - - /** - * 上一条,下一条 - */ - private IMogoActionListener mogoActionListener = new IMogoActionListener() { - @Override - public void onActionDone(MogoAction mogoAction) { - Logger.d(TAG, "mogoActionListener mogoAction = " + mogoAction); - if (mogoAction == MogoAction.Prev) { - EventBus.getDefault().post(new VoiceControlUpInfo("1")); - } else if (mogoAction == MogoAction.Next) { - EventBus.getDefault().post(new VoiceControlUpInfo("2")); - } - } - }; - - private void delayTime() { - new Handler().postDelayed(new Runnable() { - @Override - public void run() { - EventBus.getDefault().post(new StartPlayInfo(mCurrentPosition)); - } - }, 1500); - } - - /** - * 发送广播 - */ - 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); - getContext().sendBroadcast(intent); - } - - - private MarkerExploreWay extractFromMarker(IMogoMarker marker) { - if (marker == null) { - return null; - } - if (marker.getObject() instanceof MarkerShowEntity) { - MarkerShowEntity showEntity = ((MarkerShowEntity) marker.getObject()); - if (showEntity.getBindObj() instanceof MarkerExploreWay) { - return ((MarkerExploreWay) showEntity.getBindObj()); - } - } - - return null; - } - - /** - * @param view - */ - @Override - public void onClick(View view) { - } - - private void moveToMarcker(double lat, double lon) { - Logger.d(TAG, "moveToMarcker lat = " + lat + " >>>>lon = " + lon); - MogoLatLng latLng = new MogoLatLng(lat, lon); - mMogoStatusManager.setUserInteractionStatus(TAG, true, false); - mMApUIController.moveToCenter(latLng); - } - - /** - * marker点击事件 - * - * @param marker - * @return - */ - @Override - public boolean onMarkerClicked(IMogoMarker marker) { - return true; - } - - /** - * C位事件,如何获取数据,需要有默认数据 - * 如果只有一个数据,不显示上下切换按钮,没有数据显示空页面 - */ - @Override - public void onPerform() { - } - - /** - * 根据数据展示页面 - */ - private void renderCardViews() { - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - mLoopRecyclerView.setVisibility(View.VISIBLE); - Logger.d(TAG, "renderCardViews size = " + markerExploreWayList.size()); - mTanluSlideAdapter.setDatas(markerExploreWayList); - mTanluSlideAdapter.notifyDataSetChanged(); - } - } - - private void initData(Object data, List list) { - if (markerExploreWayList != null) { - markerExploreWayList.clear(); - } else { - markerExploreWayList = new ArrayList<>(); - } - try { - if (data != null) { -// markerExploreWayList.addAll((List) data); - } else { - markerExploreWayList.addAll(list); - } - } catch (Exception e) { - Logger.e(TAG, e, "error."); - } - - renderCardViews(); - } - - /** - * 离开C位事件 - */ - @Override - public void onDisable() { - } - - /** - * TODO 释放资源 - */ - public void releaseAction() { -// EventBus.getDefault().unregister(this); - mMogoRegisterCenter.unregisterMogoNaviListener(TanluConstants.MODEL_NAME); -// GSYVideoManager.releaseAllVideos(); - if (mTanluSlideAdapter != null) { - mTanluSlideAdapter.release(); - } - - AIAssist.getInstance(mContext).unregisterUnWakeupCommand(TanluConstants.PLAY_VIDEO); - if (mActionManager != null) { - mActionManager.unregisterActionListener(TanluConstants.MODEL_NAME, mogoActionListener); - } - } - - - /** - * poi - * - * @param p0 - * @param p1 - */ - @Override - public void onPoiSearched(MogoPoiResult p0, int p1) { - if (p1 == 1000) { - if (p0.getPois() != null && p0.getPois().size() > 0) { - MogoPoiItem poi = p0.getPois().get(0); - MogoLatLng latLon = poi.getPoint(); - Double longit; //经度 - Double lat; //维度 - if (mKeywords.equals("附近")) { - Logger.d(TAG, "附近 -onPoiSearched---1---"); - longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude(); - lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); - } else { - Logger.d(TAG, "其他 -onPoiSearched---1----"); - longit = latLon.lng; - lat = latLon.lat; - } -// getVoiceControlRoadData(mKeywords, lat, longit); - Logger.d(TAG, "setOnPoiSearchListener keywords =" + mKeywords + ">>longitude= " + longit + "--latitude" + lat); - } else { - Logger.e(TAG, "poi == null"); - Double longit; //经度 - Double lat; //维度 - if (mKeywords.equals("附近")) { - Logger.d(TAG, "附近 -onPoiSearched---2---"); - longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude(); - lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); -// getVoiceControlRoadData(mKeywords, lat, longit); - } else { - Logger.d(TAG, "其他 -onPoiSearched---2----"); - speakFailVoice(searchfaileVoiceStrings[2]); - } - } - } else { - Logger.e(TAG, "poi search result p1 = " + p1); - speakFailVoice(searchfaileVoiceStrings[2]); - } - } - - @Override - public void onPoiItemSearched(MogoPoiItem item, int errorCode) { - if (item == null) { - return; - } - } - - /** - * 列表滑动位置 - * - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onButtonUpAndDown(final ControlClickUpInfo event) { - if (event != null) { - Logger.d(TAG, " onButtonUpAndDown event.type = " + event.type + " >>>mCurrentPosition = " + mCurrentPosition); - if (event.type.equals("1")) { //上一条 - if (mCurrentPosition > 0) { - mLoopRecyclerView.smoothScrollToPosition(mCurrentPosition - 1); - } else { - Logger.e(TAG, " onButtonUpAndDown 上一条 mCurrentPosition <= 0 "); - TipToast.shortTip("已经是第一条"); - } - } else if (event.type.equals("2")) { //下一条 - if (mCurrentPosition >= (markerExploreWayList.size() - 1)) { - TipToast.shortTip("已经是最后一条"); - Logger.e(TAG, " onButtonUpAndDown 下一条 mCurrentPosition >= markerExploreWayList.size() - 1"); - } else { - mLoopRecyclerView.smoothScrollToPosition(mCurrentPosition + 1); - } - } - } else { - Logger.e(TAG, "onButtonUpAndDown event == null "); - } - } - - /** - * 接收到错误数据信息 - * - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onDataErrorInfo(final DataErrorInfo event) { - if (event == null) { - return; - } - Logger.d(TAG, " onDataErrorInfo id = " + event.id + " >>>poiType = " + event.poiType + ">>>updateType = " + event.updateType); - mTanluModelData.uploadDeleteErrorDataInfo(event.id, event.poiType, event.updateType, - new UploadShareCallback() { - @Override - public void onSuccess(BaseData data) { - Logger.d(TAG, "uploadDeleteErrorDataInfo onSuccess -----> "); - } - - @Override - public void onFail(String message, int code) { - Logger.e(TAG, "uploadDeleteErrorDataInfo onFail -----> message = " + message); - } - }); - } - - /** - * 获取情报失败 - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onGetInfoFailed(final GetInfoError error) { -// mMogoStatusManager.setUploadingStatus(TanluConstants.MODEL_NAME, false); -// float bearing = TanluServiceManager.getLocationClient().getLastKnowLocation().getBearing(); //角度 -// Logger.d(TAG, "onGetInfoFailed bearing = " + bearing + " >>>type = " + error.type); -// //失败提示框 -// if (error.type == null) { -// return; -// } -// -// mErrorType = error.type; -// if (error.type.equals("100")) { -// //网络弹框 -// if (errorDialog != null && errorDialog.isShowing()) { -// //TODO -// } else { -// showNetErrorDialog(); -// } -// } else { -// if (customDialog != null && customDialog.isShowing()) { -// //TODO -// } else { -// showNormalDialog(error.type); -// } -// } - } - - private UploadFailedDialog customDialog; - private NetErrorDialog errorDialog; - private String mErrorType; - - - private void showNormalDialog(final String type) { - customDialog = new UploadFailedDialog(mContext); - customDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); - customDialog.setContent("抱歉,无法获取到相关数据"); - customDialog.setSubContent("分享失败"); - customDialog.setOnCancelListener("取消", new View.OnClickListener() { - @Override - public void onClick(View v) { - timer.cancel(); //取消倒计时 - } - }); - customDialog.setOnOkClickListener("重新分享", new View.OnClickListener() { - @Override - public void onClick(View v) { - //发送广播 type:1拥堵,2交通检查,3封路 - sendShareReceiver(type); - } - }); - customDialog.show(); - timer.start(); - } - - private void showNetErrorDialog() { - errorDialog = new NetErrorDialog(mContext); - errorDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); - errorDialog.setContent("由于网络原因上传失败"); - errorDialog.setSubContent("系统将在网络恢复时自动上传"); - errorDialog.setOnCancelListener("好的", new View.OnClickListener() { - @Override - public void onClick(View v) { - timer.cancel(); - } - }); - errorDialog.show(); - timer.start(); - } - - /** - * 倒计时 - */ - CountDownTimer timer = new CountDownTimer(11000, 1000) { - @Override - public void onTick(long arg) { - int theTime = (int) (arg / 1000); - if (mErrorType.equals("100")) { //无网 - if (errorDialog != null) { - errorDialog.getTxtCancel().setText(mContext.getString(R.string.tanlu_neterror_cancle_time, theTime + "")); - } - } else { - if (customDialog != null) { - customDialog.getTxtCancel().setText(mContext.getString(R.string.tanlu_cancle_time, theTime + "")); - } - } - } - - @Override - public void onFinish() { - if (mErrorType.equals("100")) { //无网 - if (errorDialog != null) { - errorDialog.dismiss(); - } - } else { - if (customDialog != null) { - customDialog.dismiss(); - } - } - } - }; - - /** - * 接收到分享对应数据打点 - * - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onMarkerInfo(final MarkerInfo event) { - if (event == null) { - return; - } - - if (!NetworkUtils.isConnected(getContext())) { //没有网络 - TipToast.shortTip("分享失败,请检查网络", new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_fail))); - } else { - float bearing = TanluServiceManager.getLocationClient().getLastKnowLocation().getBearing(); //角度 - Logger.d(TAG, "onMarkerInfo event.type = " + event.type + " >>event.lat = " + event.lat + " >>event.lon = " + event.lon + " >>event.imageUrl =" + event.imageUrl); - String poiType = event.type; - String fromType = event.fromType; - boolean isCumtom = event.isCumtom; - Logger.d(TAG, "onMarkerInfo share poiType = " + poiType + " --isCumtom = " + isCumtom + " >> getMathRandom = " + getMathRandom() + " >>> bearing = " + bearing + ">>>fromType = " + fromType); - if (!fromType.equals("5")) { - if (isCumtom && !poiType.equals("0")) { - // 不管在不在前台,都要提示分享成功 - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format(voiceShareSuccessTts, getMathRandom())), null); - TipToast.shortTip("分享成功", new TipDrawable(getResources().getDrawable(R.drawable.module_tanlu_upload_success))); - - if (TanluServiceManager.getMogoStatusManager().isMainPageOnResume()) { - double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); - double lon = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude(); - Log.d(TAG, "onMarkerInfo lat = " + lat + " >>>> lon = " + lon); - String cityName = TanluServiceManager.getLocationClient().getLastKnowLocation().getCityName(); - String address = TanluServiceManager.getLocationClient().getLastKnowLocation().getAddress(); - MarkerExploreWay markerExploreWay = new MarkerExploreWay(); - markerExploreWay.setCityName(cityName); - markerExploreWay.setPoiType(poiType); - - MarkerLocation markerLocation = new MarkerLocation(); - markerLocation.setLat(lat); - markerLocation.setLon(lon); - markerLocation.setAddress(address); - - MarkerShowEntity markerShowEntity = new MarkerShowEntity(); - markerShowEntity.setBindObj(markerExploreWay); - markerShowEntity.setTextContent(address); - markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME); - markerShowEntity.setMarkerLocation(markerLocation); - - IMogoMarker mogoMarker = TanluServiceManager.getServiceApis().getMarkerService().drawMarker(markerShowEntity); - mogoMarker.setClickable(false); - - //添加图片动画 - Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_circle_image, null); - MarkerShowEntity markerShowEntityAnimation = new MarkerShowEntity(); - markerShowEntityAnimation.setTextContent(address); - markerShowEntityAnimation.setMarkerType(TanluConstants.MODEL_NAME); - MogoMarkerOptions options = new MogoMarkerOptions() - .object(markerShowEntityAnimation) - .icon(bitmap) - .anchor(0.5f, 0.5f) - .latitude(lat) - .owner(TanluConstants.MODEL_NAME) - .longitude(lon); - - IMogoMarker mogoAnimationMarker = mMarkerManager.addMarker(TanluConstants.MODEL_NAME, options); - mogoAnimationMarker.startScaleAnimation(0, 1f, 0, 1f, 500, new LinearInterpolator(), new OnMarkerAnimationListener() { - @Override - public void onAnimStart() { - } - - @Override - public void onAnimEnd() { - UiThreadHandler.postDelayed( () -> { - mogoAnimationMarker.destroy(); - }, 1_200L ); - - } - }); - - //开启动画 -// mogoMarker.startScaleAnimationWithAlpha(0, 1.2f, 0, 1.2f, 0f, 1f, 300, new LinearInterpolator(), new OnMarkerAnimationListener() { -// @Override -// public void onAnimStart() { -// Logger.d(TAG, " onAnimStart ---1----> "); -// } -// -// @Override -// public void onAnimEnd() { -// if (mogoMarker.isDestroyed()) { -// return; -// } -// mogoMarker.startScaleAnimation(1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null); -// } -// }); - } - } else { - Logger.e(TAG, "onMarkerInfo share onCompleted poiType = -1 --- else ---->"); - } - } - } - - mMogoStatusManager.setUploadingStatus(TanluConstants.MODEL_NAME, false); - } - - private void showJumpAnimation(final IMogoMarker mogoMarker) { - if (mogoMarker == null) { - return; - } - - mogoMarker.startJumpAnimation(80, 300, new Interpolator() { - @Override - public float getInterpolation(float input) { - if (input <= 0.5) { - return (float) (0.5f - 2.0 * (0.5 - input) * (0.5 - input)); - } else { - return (float) (0.5f - Math.sqrt(input - 0.5f) * (1.5f - input)); - } - } - }, new OnMarkerAnimationListener() { - @Override - public void onAnimStart() { - } - - @Override - public void onAnimEnd() { - } - }); - } - - /** - * push 类型,1为导航数据,2为通勤族 - * - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onPushInfo(final PushTypeInfo event) { - if (event != null && TextUtils.isEmpty(event.type)) { - Logger.d(TAG, " onPushInfo event.type =" + event.type); - if (event.type.equals("1")) { - getNaviRoadLineInfo(); - } else if (event.type.equals("2")) { - getRoadLineData(); - } - } else { - Logger.e(TAG, "event == null "); - } - } - - /** - * 导航路线数据事件 - */ - public void getNavigationData() { - if (mADASController != null) { - mADASController.closeADAS(); - } - - mTanluModelData.getNaviInformation(TanluServiceManager.getMapService().getNavi(getContext()).getCalculatedPathPos(), - new NaviCallback() { - @Override - public void onSuccess(NaviResult data) { - List informationList = data.getResult().getInformations(); - Logger.d(TAG, "getNavigationData onSuccess informationList =" + informationList); - if (informationList == null || (informationList != null && informationList.size() == 0)) { - return; - } - - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - markerExploreWayList.clear(); //刷新之前先删除之前的,然后再添加成请求的 - mCurrentPosition = 0; - } - - //转换数据结构 - convertData(informationList); - //清除探路之前的数据 - mMarkerManager.removeMarkers(TanluConstants.MODEL_NAME); - - //打点 - ArrayList optionList = new ArrayList<>(); - for (int i = 0; i < informationList.size(); i++) { - //根据type确定添加的图片 - MarkerShowEntity markerShowEntity = new MarkerShowEntity(); - markerShowEntity.setBindObj(markerExploreWayList.get(i)); - markerShowEntity.setTextContent(informationList.get(i).addr); - markerShowEntity.setMarkerType(TanluConstants.MODEL_NAME); - MogoMarkerOptions options = new MogoMarkerOptions() - .object(markerShowEntity) - .icon(multiMarkerIcon) - .latitude(informationList.get(i).lat) - .owner(TanluConstants.MODEL_NAME) - .longitude(informationList.get(i).lon); - - optionList.add(options); - mMarkerManager.addMarker(TanluConstants.MODEL_NAME, options); - } - Logger.d(TAG, "getNavigationData optionList.size() = " + optionList.size()); -// mMarkerManager.addMarkers(TanluConstants.MODEL_NAME, optionList, true); - mLoopRecyclerView.scrollToPosition(0); - - //自身位置和第一个情报自适应显示 - Rect rect = new Rect( - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_left), - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_top), - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_right), - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_bottom)); - - mMogoStatusManager.setUserInteractionStatus(TAG, true, true); - //经度 - Double longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude(); - //纬度 - Double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); - //第一个参数:调用者,第二个参数:当前自车的位置,第三个参数:需要显示在范围内的点(不包含自车的位置) - //第四个参数:显示范围的UI边界,第五个参数:是否锁定自车位置(看业务需要) - if (markerExploreWayList.size() > 0) { - mMApUIController.showBounds(TanluConstants.MODEL_NAME, new MogoLatLng(lat, longit), - getList(markerExploreWayList.get(0)), rect, true); - } - } - - @Override - public void onFail(String message, int code) { - Logger.d(TAG, "getNavigationData message = " + message + ">>>code =" + code); - } - }); - } - - /** - * 通勤族 事件,监听消息自己请求路线数据 - */ - public void getRoadLineData() { - mTanluModelData.getRoadLineData(new RoadLineCallback() { - @Override - public void onSuccess(PathLineResult o) { - //绘制线路线 - if (o != null && o.getResult() != null && o.getResult().getPointList() != null - && o.getResult().getPointList().size() > 0) { - drawMapLine(o.getResult().getPointList()); - } else { - Logger.e(TAG, "getRoadLineData onSuccess o.getPointList() == null"); - } - } - - @Override - public void onFail(String message, int code) { - Logger.e(TAG, "getRoadLineData onFail message =" + message + ">>>code =" + code); - } - }); - } - - /** - * 导航路线,监听消息自己请求路线数据 - */ - public void getNaviRoadLineInfo() { - mTanluModelData.getNaviRoadLineInfo(new RoadLineCallback() { - @Override - public void onSuccess(PathLineResult o) { - //绘制线路线 - if (o != null && o.getResult() != null && o.getResult().getPointList() != null - && o.getResult().getPointList().size() > 0) { - drawMapLine(o.getResult().getPointList()); - } else { - Logger.e(TAG, "getNaviRoadLineInfo onSuccess o.getPointList() == null"); - } - } - - @Override - public void onFail(String message, int code) { - Logger.e(TAG, "getNaviRoadLineInfo onFail message =" + message + ">>>code =" + code); - } - }); - } - - /** - * 绘制线路 - */ - private void drawMapLine(List

pointList) { - //避免人为操作,刷新 - mMogoStatusManager.setUserInteractionStatus(TanluConstants.MODEL_NAME, true, true); - - int intervalNum = Utils.getIntervalValue(pointList.size()); - Logger.d(TAG, "drawMapLine intervalNum = " + intervalNum + ">>> pointList.size =" + pointList.size()); - int listSize = pointList.size(); - passedByPoints = new ArrayList<>(); - - //沿途最多15个点 - for (int i = 0; i < listSize; i += intervalNum) { - passedByPoints.add(new MogoLatLng(pointList.get(i).getLat(), (pointList.get(i).getLon()))); - } - - Logger.d(TAG, "drawMapLine passedByPoints.size() ----> " + passedByPoints.size()); - MogoLatLng startLatLng = new MogoLatLng(pointList.get(0).getLat(), pointList.get(0).getLon()); - MogoLatLng endLatLng = new MogoLatLng(pointList.get(listSize - 1).getLat(), pointList.get(listSize - 1).getLon()); - mMarkerManager.addRouteWay(getContext(), startLatLng, endLatLng, passedByPoints); - } - - - private void showBonndsRoadtion() { - Logger.e(TAG, "showBonndsRoadtion markerExploreWayList.size() = " + markerExploreWayList.size()); - Logger.d(TAG, "showBonndsRoadtion getMogoList().size() = " + getMogoList().size()); - //经度 - Double longit = TanluServiceManager.getLocationClient().getLastKnowLocation().getLongitude(); - //纬度 - Double lat = TanluServiceManager.getLocationClient().getLastKnowLocation().getLatitude(); - Rect rect = new Rect( - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_left), - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_top), - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_right), - (int) getContext().getResources().getDimension(R.dimen.tanlu_module_map_bottom)); - - moveNotFresh(); - //第一个参数:调用者,第二个参数:当前自车的位置,第三个参数:需要显示在范围内的点(不包含自车的位置) - //第四个参数:显示范围的UI边界,第五个参数:是否锁定自车位置(看业务需要) - mMApUIController.showBounds(TanluConstants.MODEL_NAME, null, - getMogoList(), rect, false); - } - - - /** - * 构造经纬度列表 - * - * @return - */ - private List getMogoList() { - List list = new ArrayList<>(); - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - if (markerExploreWayList.size() < 6) { - for (int i = 0; i < markerExploreWayList.size(); i++) { - MarkerLocation location = markerExploreWayList.get(i).getLocation(); - if (location != null) { - MogoLatLng mogoLatLng = new MogoLatLng(location.getLat(), location.getLon()); - list.add(mogoLatLng); - } else { - Logger.e(TAG, "getMogoList() < 6 location == null"); - } - } - } else { - for (int i = 0; i < 6; i++) { - MarkerLocation location = markerExploreWayList.get(i).getLocation(); - if (location != null) { - MogoLatLng mogoLatLng = new MogoLatLng(location.getLat(), location.getLon()); - list.add(mogoLatLng); - } else { - Logger.e(TAG, "getMogoList() location == null"); - } - } - } - } else { - Logger.e(TAG, "getMogoList() markerExploreWay == null"); - } - return list; - } - - - /** - * 将探路的数据结构转换成 MarkerExploreWay的列表 - */ - private void convertData(List informations) { - if (markerExploreWayList != null) { - markerExploreWayList.clear(); - } - - for (int i = 0; i < informations.size(); i++) { - MarkerExploreWay markerExploreWay = new MarkerExploreWay(); - markerExploreWay.setAddr(informations.get(i).addr); - markerExploreWay.setCityName(informations.get(i).cityName); - markerExploreWay.setDistance(informations.get(i).distance); - markerExploreWay.setFileType(informations.get(i).type); - markerExploreWay.setItems(convertMediaData(informations.get(i).items)); - markerExploreWay.setLocation(convertLocation(informations.get(i))); - markerExploreWay.setUserInfo(convertUserInfo(informations.get(i))); - - markerExploreWayList.add(markerExploreWay); - } - - //更新数据 - renderCardViews(); - } - - /** - * 转换媒体数据 - * - * @param items - * @return - */ - private List convertMediaData(ArrayList items) { - List exploreWayItems = new ArrayList<>(); - MarkerExploreWayItem item = new MarkerExploreWayItem(); - if (items != null && items.size() > 0) { - item.setThumbnail(items.get(0).getThumbnail()); - item.setUrl(items.get(0).getUrl()); - - exploreWayItems.add(item); - } - - return exploreWayItems; - } - - - private MarkerLocation convertLocation(Information information) { - MarkerLocation location = new MarkerLocation(); - location.setAddress(information.addr); - location.setAngle(0); - location.setLat(information.lat); - location.setLon(information.lon); - - return location; - } - - - private MarkerUserInfo convertUserInfo(Information information) { - MarkerUserInfo userInfo = new MarkerUserInfo(); - userInfo.setUserHead(information.headImgUrl); - userInfo.setUserName(information.nickName); - - return userInfo; - } - - Random random = new Random(); - - private void speakSuccessVoice(List informations, String - trafficStatus) { - Logger.d(TAG, "speakSuccessVoice informations.size() = " + informations.size()); - switch (informations.size()) { - case 0: - speakFailVoice(searchfaileVoiceStrings[random.nextInt(3)]); - break; - - case 1: - trackVoiceSearch(1); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format(voiceGetInfoMationTts, "1") + trafficStatus), null); - break; - - case 2: - trackVoiceSearch(1); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format( - voiceGetInfoMationTts, - "2" - ) + trafficStatus), null); - break; - case 3: - trackVoiceSearch(1); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format( - voiceGetInfoMationTts, - "3" - ) + trafficStatus), null); - break; - - default: - trackVoiceSearch(1); - AIAssist.getInstance(getContext()).speakTTSVoice(( - String.format( - voiceGetInfoMationTts, - "多" - ) + trafficStatus), null); - } - } - - private void initStrings() { - voiceGetInfoMationTts = - getContext().getResources().getString(R.string.voice_get_informations_tts); - searchingVoiceStrings = - getContext().getResources().getStringArray(R.array.searching_voice_string_array); - searchfaileVoiceStrings = - getContext().getResources().getStringArray(R.array.search_fail_voice_array); - voiceShareSuccessTts = getContext().getResources().getString(R.string.tanlu_share_success); - } - - private void speakFailVoice(String string) { - AIAssist.getInstance(getContext()).speakTTSVoice(string, null); - } - - - Double inputlon = 0.0;//经度 - Double inputlat = 0.0; //维度 - Double datalon = 0.0; //经度 - Double datalat = 0.0; //维度 - - //上报语音搜索 - private void trackVoiceSearch(int type) { - Log.e(TAG, "type = " + type + "-- mCity =" + mCity + "-- mKeywords =" + mKeywords); - Map properties = new HashMap<>(); - properties.put("searcharea", mKeywords); - properties.put("city", mCity); - mAnalytics.track(TanluConstants.CARNET_VOICE_SEARCH, properties); - } - - - private String getMathRandom() { - Random random = new Random(); - int temp = random.nextInt(50) + 10; - - return String.valueOf(temp); - } - - - @Override - public void accOn() { - - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluServiceManager.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluServiceManager.java deleted file mode 100644 index 78d541c5d8..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluServiceManager.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.mogo.module.tanlu.fragment; - -import android.content.Context; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.map.location.IMogoLocationClient; -import com.mogo.map.search.poisearch.IMogoPoiSearch; -import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; -import com.mogo.module.carchattingprovider.ICarsChattingProvider; -import com.mogo.service.IMogoServiceApis; -import com.mogo.service.MogoServicePaths; -import com.mogo.service.analytics.IMogoAnalytics; -import com.mogo.service.datamanager.IMogoDataManager; -import com.mogo.service.intent.IMogoIntentManager; -import com.mogo.service.map.IMogoMapService; -import com.mogo.service.module.IMogoRegisterCenter; -import com.mogo.service.statusmanager.IMogoStatusManager; -import com.mogo.service.windowview.IMogoTopViewManager; -import com.zhidao.carchattingprovider.CallChattingProviderConstant; - -/** - * @author lixiaopeng - * @since 2020-5-19 - *

- * 持有服务接口实例 - */ -public class TanluServiceManager { - private static IMogoMapService mMapService; - private static IMogoPoiSearch mPoiSearch; - private static IMogoLocationClient mLocationClient; - private static IMogoDataManager mDataManager; - private static IMogoServiceApis mServiceApis; - private static IMogoStatusManager mIMogoStatusManager; - private static IMogoAnalytics mAnalytics; - private static IMogoIntentManager mogoIntentManager; - private static IMogoRegisterCenter mogoRegisterCenter; - private static ICarsChattingProvider mCarsChattingProvider; - private static IMogoTopViewManager mIMogoTopViewManager; - - public static void init(Context context) { - mServiceApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context); - mMapService = mServiceApis.getMapServiceApi(); - mDataManager = mServiceApis.getDataManagerApi(); - mIMogoStatusManager = mServiceApis.getStatusManagerApi(); - mAnalytics = mServiceApis.getAnalyticsApi(); - mogoIntentManager = mServiceApis.getIntentManagerApi(); - mogoRegisterCenter = mServiceApis.getRegisterCenterApi(); - - mCarsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation(); - mIMogoTopViewManager = mServiceApis.getTopViewManager(); - mPoiSearch = mMapService.getPoiSearch(context, new MogoPoiSearchQuery()); - mLocationClient = mMapService.getSingletonLocationClient(context); - } - - public static IMogoTopViewManager getIMogoTopViewManager() { - return mIMogoTopViewManager; - } - - public static IMogoRegisterCenter getIMogoRegisterCenter() { - return mogoRegisterCenter; - } - - public static IMogoMapService getMapService() { - return mMapService; - } - - public static IMogoPoiSearch getPoiSearch() { - return mPoiSearch; - } - - public static IMogoLocationClient getLocationClient() { - return mLocationClient; - } - - public static IMogoAnalytics getAnalytics() { - return mAnalytics; - } - - public static IMogoIntentManager getMogoIntentManager() { - return mogoIntentManager; - } - - public static IMogoStatusManager getMogoStatusManager() { - return mIMogoStatusManager; - } - - public static IMogoDataManager getDataManager() { - return mDataManager; - } - - public static IMogoServiceApis getServiceApis() { - return mServiceApis; - } - - public static ICarsChattingProvider getCarsChattingProvider() { - return mCarsChattingProvider; - } - -} 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 deleted file mode 100644 index b7cbed5842..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideAdapterNew.java +++ /dev/null @@ -1,561 +0,0 @@ -package com.mogo.module.tanlu.fragment.recycler; - -import android.animation.Animator; -import android.animation.AnimatorInflater; -import android.animation.AnimatorSet; -import android.content.Context; -import android.text.TextUtils; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.bumptech.glide.Glide; -import com.bumptech.glide.request.RequestOptions; -import com.mogo.commons.debug.DebugConfig; -import com.mogo.map.uicontroller.EnumMapUI; -import com.mogo.module.carchattingprovider.ICarsChattingProvider; -import com.mogo.module.common.entity.MarkerExploreWay; -import com.mogo.module.common.glide.SkinAbleBitmapTarget; -import com.mogo.module.tanlu.R; -import com.mogo.module.tanlu.callback.IThumbsUpCallback; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.module.tanlu.model.TanluModelData; -import com.mogo.module.tanlu.model.event.CloseWindowInfo; -import com.mogo.module.tanlu.model.event.ControlClickUpInfo; -import com.mogo.module.tanlu.model.event.StartPlayInfo; -import com.mogo.module.tanlu.model.event.VoiceControlUpInfo; -import com.mogo.module.tanlu.util.ChartUtil; -//import com.mogo.module.tanlu.video.SimpleCoverVideoPlayer; -import com.mogo.module.tanlu.view.RoundLayout; -import com.mogo.service.adas.IMogoADASControlStatusChangedListener; -import com.mogo.service.analytics.IMogoAnalytics; -import com.mogo.service.imageloader.IMogoImageloader; -import com.mogo.service.imageloader.MogoImageView; -import com.mogo.service.module.IMogoRegisterCenter; -import com.mogo.skin.support.SkinMode; -import com.mogo.utils.TipToast; -import com.mogo.utils.logger.Logger; -//import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder; -import com.zhidao.carchattingprovider.CallChattingProviderConstant; -import com.zhidao.carchattingprovider.MogoDriverInfo; - -import org.greenrobot.eventbus.EventBus; -import org.greenrobot.eventbus.Subscribe; -import org.greenrobot.eventbus.ThreadMode; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static android.view.View.GONE; -import static android.view.View.VISIBLE; -import static com.mogo.module.tanlu.util.StringUitlKt.formatDate; -import static com.mogo.module.tanlu.util.Utils.handleDistance; - - -/** - * @author lixiaopeng - * @description - * @since 2020/3/11 - */ -public class TanluSlideAdapterNew extends RecyclerView.Adapter implements IMogoADASControlStatusChangedListener { - private List markerExploreWayList = new ArrayList<>(); - private static final String TAG = "TanluSlideAdapterNew"; - private Context mContext; - - private TextView mAddressTv; - private TextView mDistanceTv; - private TextView mTimeTv; -// private SimpleCoverVideoPlayer simpleCoverVideoPlayer; - private MogoImageView autoZoomInImageView; - private MogoImageView mHeadImage; - private ImageView mChatImage; - private ImageView mLikeImage; - private LinearLayout mLikeLayout; - private TextView mTypeTv; - private IMogoImageloader mogoImageloader; - private ImageView mCloseImage; - private RoundLayout mRoundLayout; - private ICarsChattingProvider mCarsChattingProvider; - - //media -// private GSYVideoOptionBuilder gsyVideoOptionBuilder = new GSYVideoOptionBuilder(); - private String mVideoUrl = ""; - private String mImageUrl = ""; - - //底层api - private IMogoAnalytics mAnalytics; - private TanluModelData mTanluModelData; - -// private HashMap list = new HashMap<>(); - - - public TanluSlideAdapterNew(Context context, IMogoAnalytics analytics, TanluModelData tanluModelData, IMogoImageloader mogoImageloader, - IMogoRegisterCenter mogoRegisterCenter) { - this.mContext = context; - this.mAnalytics = analytics; - this.mTanluModelData = tanluModelData; - this.mogoImageloader = mogoImageloader; - mCarsChattingProvider = (ICarsChattingProvider) ARouter.getInstance().build(CallChattingProviderConstant.CAR_CALL_PROVIDER).navigation(); - mogoRegisterCenter.registerADASControlStatusChangedListener(TAG, this); - - EventBus.getDefault().register(this); - } - - @NonNull - @Override - public TanluSlideViewHolderNew onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - View inflate = LayoutInflater.from(parent.getContext()) - .inflate(R.layout.tanlu_item_main_media_recycler_new, parent, false); - return new TanluSlideViewHolderNew(inflate); - } - - @Override - public void onBindViewHolder(@NonNull TanluSlideViewHolderNew holder, int position) { - final MarkerExploreWay markerExploreWay = markerExploreWayList.get(position); - if (markerExploreWay == null) { - return; - } - - mAddressTv = holder.itemView.findViewById(R.id.tv_information_media_content); - mDistanceTv = holder.itemView.findViewById(R.id.tv_information_media_distance); - mTimeTv = holder.itemView.findViewById(R.id.tv_information_media_time); -// simpleCoverVideoPlayer = holder.itemView.findViewById(R.id.video_player_main); - autoZoomInImageView = holder.itemView.findViewById(R.id.tanlu_photo_imageView); - mHeadImage = holder.itemView.findViewById(R.id.tanlu_head_imageView); - mChatImage = holder.itemView.findViewById(R.id.tanlu_chat_imageView); - mLikeImage = holder.itemView.findViewById(R.id.tanlu_like_imageView); - mLikeLayout = holder.itemView.findViewById(R.id.tanlu_like_layout); - mTypeTv = holder.itemView.findViewById(R.id.tv_information_type); - mCloseImage = holder.itemView.findViewById(R.id.tanlu_close_imageView); - mRoundLayout = holder.itemView.findViewById(R.id.media_layout); - - mCloseImage.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - EventBus.getDefault().post(new CloseWindowInfo()); - } - }); - - //有可能不是一个对象 -// simpleCoverVideoPlayer.setVisibility(View.VISIBLE); - autoZoomInImageView.setVisibility(View.GONE); - -// list.put(position, simpleCoverVideoPlayer); - - mTypeTv.setText(getTypeName(markerExploreWay.getPoiType())); - if (markerExploreWay.getPoiType().equals(TanluConstants.TANLU_ROAD_CURRENT)) { - mTypeTv.setBackgroundResource(R.drawable.tanlu_type_button_blue_bg); - } else { - mTypeTv.setBackgroundResource(R.drawable.tanlu_event_type_red_bg); - } - - mHeadImage.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - clickHead(markerExploreWay); - } - }); - - - //自研车机 - if (DebugConfig.getCarMachineType() == 0) { - if (markerExploreWay.getUserInfo() != null) { - //是否能拨打 - ChartUtil.isCanCall(mContext.getApplicationContext(), b -> { - Logger.d(TAG, " isCanCall b = " + b + " >>>sn =" + markerExploreWay.getUserInfo().getSn()); - if (b) { - //对方是否在线 - ChartUtil.isOnLine(markerExploreWay.getUserInfo().getSn(), mContext.getApplicationContext(), b1 -> { - Logger.d(TAG, " isonline b1 = " + b1 + " >>>sn =" + markerExploreWay.getUserInfo().getSn()); - if (b1) { - mChatImage.setVisibility(VISIBLE); - } else { - mChatImage.setVisibility(GONE); - } - }); - } else { - mChatImage.setVisibility(GONE); - } - }); - } else { - Logger.e(TAG, " markerExploreWay.getUserInfo() == null "); - mChatImage.setVisibility(GONE); - } - } - - //加载头像图片 -// RequestOptions requestOptions = new RequestOptions() -// .circleCrop() -// .placeholder(R.drawable.tanlu_head_image) -// .error(R.drawable.tanlu_head_image) -// .fallback(R.drawable.tanlu_head_image); -// Glide.with(mContext) -// .load(markerExploreWay.getUserInfo() != null ? markerExploreWay.getUserInfo().getUserHead() : "") -// .apply(requestOptions) -// .into(mHeadImage); - if (mogoImageloader != null) { - mogoImageloader.displayImage(markerExploreWay.getUserInfo() != null ? markerExploreWay.getUserInfo().getUserHead() : "", mHeadImage); - } - - //处理数据显示 - handleMarkerExploreWay(markerExploreWay); - - mChatImage.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - traceTypeData(markerExploreWay.getInfoId() == null ? "" : markerExploreWay.getInfoId(), "2", markerExploreWay.getSn() == null ? "" : markerExploreWay.getSn()); - ChartUtil.callChatting(markerExploreWay.getUserInfo(), markerExploreWay.getLocation()); - } - }); - -// mLikeLayout.setOnClickListener(new View.OnClickListener() { -// @Override -// public void onClick(View v) { - //动画 -// AnimatorSet animatorSet = (AnimatorSet) AnimatorInflater.loadAnimator(mContext, R.anim.v2x_like_heart_animation); -// animatorSet.setTarget(mLikeImage); -// animatorSet.addListener(new Animator.AnimatorListener() { -// @Override -// public void onAnimationStart(Animator animation) { -// -// } -// -// @Override -// public void onAnimationEnd(Animator animation) { -// traceTypeData(markerExploreWay.getInfoId() == null ? "" : markerExploreWay.getInfoId(), "1", markerExploreWay.getSn() == null ? "" : markerExploreWay.getSn()); -// if (TextUtils.isEmpty(markerExploreWay.getInfoId())) { -// TipToast.shortTip("点赞失败"); -// return; -// } -// -// mTanluModelData.thumbsUp(markerExploreWay, new IThumbsUpCallback() { -// @Override -// public void onThumbsUpSuccess() { -// TipToast.shortTip("点赞成功"); -// Logger.d(TAG, "onThumbsUpSuccess -------->"); -// } -// -// @Override -// public void onThumbsUpFail() { -// TipToast.shortTip("点赞失败"); -// Logger.e(TAG, "onThumbsUpFail -------->"); -// } -// }); -// } -// -// @Override -// public void onAnimationCancel(Animator animation) { -// -// } -// -// @Override -// public void onAnimationRepeat(Animator animation) { -// -// } -// }); -// animatorSet.start(); -// -// } -// }); - - } - - - public void clickHead(MarkerExploreWay exploreWay) { - MogoDriverInfo mogoDriverInfo = new MogoDriverInfo(); - int ageNumber = exploreWay.getUserInfo().getAgeNumber(); - mogoDriverInfo.setAge(ageNumber); - String gender = exploreWay.getUserInfo().getGender(); - mogoDriverInfo.setGender(gender != null ? gender : null); - String sn = exploreWay.getUserInfo().getSn(); - mogoDriverInfo.setSn(sn != null ? sn : ""); - String name = exploreWay.getUserInfo().getUserName(); - mogoDriverInfo.setUserName(name != null ? name : ""); - mogoDriverInfo.setUserHead(exploreWay.getUserInfo().getUserHead()); - mCarsChattingProvider.showUserWindow(TanluConstants.MODEL_NAME, mogoDriverInfo, mContext); - } - - - @Override - public int getItemCount() { - return markerExploreWayList == null ? 0 : markerExploreWayList.size(); - } - - @Override - public int getItemViewType(int position) { - return super.getItemViewType(position); - } - - @Override - public long getItemId(int position) { - return position; - } - - /** - * 设置数据 - * - * @param datas - */ - public void setDatas(List datas) { - if (markerExploreWayList != null) { - markerExploreWayList.clear(); - - markerExploreWayList.addAll(datas); - Logger.e(TAG, "setDatas size = " + markerExploreWayList.size()); - } - } - - /** - * 通用的处理数据逻辑 - * - * @param markerExploreWay - */ - private void handleMarkerExploreWay(MarkerExploreWay markerExploreWay) { - if (markerExploreWay != null) { - Logger.d(TAG, "markerExploreWay.getFileType() =" + markerExploreWay.getFileType()); - if (markerExploreWay.getFileType() == 0) { //图片 - refreshPhotoData(markerExploreWay); - } else if (markerExploreWay.getFileType() == 1) { //视频 - refreshVideoData(markerExploreWay); - } - } else { - Logger.e(TAG, "handleMarkerExploreWay == null"); - } - } - - /** - * 刷新单个视频数据,更新位置positon - */ - private void refreshVideoData(MarkerExploreWay markerExploreWay) { -// if (markerExploreWay.getItems() == null) { -// showDefaultImage(); -// return; -// } -// -// if (markerExploreWay.getItems().size() == 0) { -// showDefaultImage(); -// return; -// } -// -// String videoUrl = markerExploreWay.getItems().get(0).getUrl(); -// mImageUrl = markerExploreWay.getItems().get(0).getThumbnail(); -// Logger.d(TAG, "refreshVideoData mImageUrl = " + mImageUrl); -// mAddressTv.setText(markerExploreWay.getAddr()); -// Logger.e(TAG, "refreshVideoData markerExploreWay.getAddr() = " + markerExploreWay.getAddr() + " >>>>videoUrl = " + videoUrl); -// mDistanceTv.setText("距离" + handleDistance(markerExploreWay.getDistance())); -// mTimeTv.setText(formatDate(markerExploreWay.getGenerateTime())); -// //判断是图片还是视频,第一个时,上一个不可点击 -// autoZoomInImageView.setVisibility(View.GONE); -// -// //视频配置 -// mVideoUrl = videoUrl; -// if (!TextUtils.isEmpty(videoUrl) && !TextUtils.isEmpty(mImageUrl)) { -// autoZoomInImageView.setVisibility(View.GONE); -// simpleCoverVideoPlayer.setVisibility(View.VISIBLE); -// //加载封面图 -// simpleCoverVideoPlayer.loadCoverImage(mImageUrl, mContext); -// gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(false).setPlayTag(TAG) -// .build(simpleCoverVideoPlayer); -// simpleCoverVideoPlayer.getStartButton().performClick(); -// } else { -// simpleCoverVideoPlayer.setVisibility(GONE); -// autoZoomInImageView.setVisibility(View.VISIBLE); -// //加载图片 -//// RequestOptions requestOptions = new RequestOptions() -//// .placeholder(R.drawable.tanlu_normal_image) -//// .error(R.drawable.tanlu_normal_image); -//// -//// Glide.with(mContext) -//// .asBitmap() -//// .load(mImageUrl) -//// .apply(requestOptions) -//// .into(new SkinAbleBitmapTarget(autoZoomInImageView, requestOptions)); -// -// mogoImageloader.displayImage(mImageUrl, autoZoomInImageView); - -// } -// -// traceVideoPlayStatusData(); - } - - /** - * 刷新单个图片数据 - */ - private void refreshPhotoData(MarkerExploreWay markerExploreWay) { - if (markerExploreWay.getItems() == null) { - Logger.e(TAG, "refreshPhotoData markerExploreWay.getItems() == null"); - showDefaultImage(); - return; - } - - if (markerExploreWay.getItems().size() == 0) { - Logger.e(TAG, "refreshPhotoData markerExploreWay.getItems().size() == 0"); - showDefaultImage(); - return; - } - - mAddressTv.setText(markerExploreWay.getAddr()); - mDistanceTv.setText("距离 " + handleDistance(markerExploreWay.getDistance())); - mTimeTv.setText(formatDate(markerExploreWay.getGenerateTime())); - String imageUrl = markerExploreWay.getItems().get(0).getUrl(); -// simpleCoverVideoPlayer.setVisibility(View.GONE); - autoZoomInImageView.setVisibility(View.VISIBLE); - Logger.d(TAG, "refreshPhotoData imageUrl = " + imageUrl); - //加载图片 -// RequestOptions requestOptions = new RequestOptions() -// .placeholder(R.drawable.tanlu_normal_image) -// .error(R.drawable.tanlu_normal_image); -// Glide.with(mContext) -// .asBitmap() -// .load(imageUrl) -// .apply(requestOptions) -// .into(new SkinAbleBitmapTarget(autoZoomInImageView, requestOptions)); - - mogoImageloader.displayImage(imageUrl, autoZoomInImageView); - } - - - private void showDefaultImage() { -// simpleCoverVideoPlayer.setVisibility(View.GONE); - autoZoomInImageView.setVisibility(View.VISIBLE); - } - - /** - * 上传播放 - */ - private void traceVideoPlayStatusData() { - if (mAnalytics != null) { - mAnalytics.track(TanluConstants.CARNET_USER_VIDEO_PLAY, null); - } - } - - private void traceTypeData(String id, String type, String sn) { - Map properties = new HashMap<>(); - properties.put("dbid", id); - properties.put("type", type); - properties.put("sn", sn); - mAnalytics.track(TanluConstants.CARNET_ROAD_ENVENT, properties); - } - - /** - * 上一条逻辑 - */ - private void handlePrevious() { - //判断是图片还是视频,第一个时,上一个不可点击 - Logger.d(TAG, " handlePrevious >> size= " + markerExploreWayList.size()); - EventBus.getDefault().post(new ControlClickUpInfo("1")); - } - - /** - * 下一条逻辑 - */ - private void handleNext() { - //判断是图片还是视频,最后一个时,下一个不可点击 - Logger.d(TAG, " handleNext >> size= " + markerExploreWayList.size()); - EventBus.getDefault().post(new ControlClickUpInfo("2")); - } - - /** - * @param event - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onPushInfo(final VoiceControlUpInfo event) { - Logger.d(TAG, "TanluSlideAdapter onPushInfo -----type = " + event.type); - if (event.type.equals("1")) { //上一条 - handlePrevious(); - } else if (event.type.equals("2")) { //下一条 - handleNext(); - } - } - - - /** - * 开始播放 - */ - @Subscribe(threadMode = ThreadMode.MAIN) - public void onHandlePlay(final StartPlayInfo info) { -// int finalPosition = info.mPosition; -// Logger.d(TAG, "onHandlePlay size = " + list.size() + " >> info.mPosition = " + info.mPosition + " >> finalPosition = " + finalPosition); -//// if (list.size() > finalPosition) { -// SimpleCoverVideoPlayer coverVideoPlayer = list.get(finalPosition); -// coverVideoPlayer.release(); -// coverVideoPlayer.getStartButton().performClick(); -// traceVideoPlayStatusData(); -// } - } - - public void release() { -// if (list != null) { -// list.clear(); -// } - } - - private String getTypeName(String type) { - String typeName = ""; - switch (type) { - case TanluConstants.TANLU_TRAFFIC_CHECK_COMPAT: - typeName = "交通检查"; - break; - case TanluConstants.TANLU_ROAD_CLOSURE_COMPAT: - typeName = "封路"; - break; - case TanluConstants.TANLU_ROAD_CONSTRUCTION: - typeName = "施工"; - break; - case TanluConstants.TANLU_ROAD_CONGESTION_COMPAT: - typeName = "拥堵"; - break; - case TanluConstants.TANLU_ROAD_PONDING: - typeName = "道路积水"; - break; - case TanluConstants.TANLU_ROAD_ICING: - typeName = "道路结冰"; - break; - case TanluConstants.TANLU_ROAD_HEAVY_FOG: - typeName = "浓雾"; - break; - case TanluConstants.TANLU_ROAD_ACCIDENT: - typeName = "交通事故"; - break; - case TanluConstants.TANLU_ROAD_CURRENT: - typeName = "实时路况"; - break; - default: - typeName = "实时路况"; - break; - } - return typeName; - } - - @Override - public void onMapUiModeChanged(EnumMapUI mapUI) { - if ( mRoundLayout == null ) { - return; - } - switch ( mapUI ) { - case Type_Night: - mRoundLayout.setBackgroundResource(R.drawable.shape_tanlu_top_bg); - break; - - case Type_Light: - mRoundLayout.setBackgroundResource(R.drawable.shape_tanlu_top_bg_light); - break; - } - } - - @Override - public void onCarStatusChanged(boolean visible) { - - } -} - diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideViewHolderNew.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideViewHolderNew.java deleted file mode 100644 index 56f5b6bdd6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/recycler/TanluSlideViewHolderNew.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.mogo.module.tanlu.fragment.recycler; - -import android.view.View; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; - -/** - * @author lixiaopeng - * @description - * @since 2020/3/11 - */ -public class TanluSlideViewHolderNew extends RecyclerView.ViewHolder{ - - public TanluSlideViewHolderNew(@NonNull View itemView) { - super(itemView); - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/BaseDataComapt.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/BaseDataComapt.kt deleted file mode 100644 index df44cedcc7..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/BaseDataComapt.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.mogo.module.tanlu.model - -import com.mogo.commons.data.BaseData - -data class BaseDataCompat(var result:T?):BaseData() \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/CarsLive.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/CarsLive.kt deleted file mode 100644 index aeacd5025c..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/CarsLive.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model - -class CarsLive { - var sn: String - var lat: Double - var lon: Double - var direction: Int - var canLive: Int - - constructor(sn: String, lat: Double, lon: Double, direction: Int, canLive: Int) { - this.sn = sn - this.lat = lat - this.lon = lon - this.direction = direction - this.canLive = canLive - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Center.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Center.kt deleted file mode 100644 index b5c5a909c8..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Center.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.mogo.module.tanlu.model - -/** - * @description - * - * @author lixiaopeng - * @since 2019-10-24 - */ -data class Center ( - val lat: Double,//weidu - val lon: Double -) diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/End.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/End.java deleted file mode 100644 index 4e937f983a..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/End.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class End { - public Double lat; - public Double lon; - - public End(Double lat, Double lon) { - this.lat = lat; - this.lon = lon; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Information.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Information.java deleted file mode 100644 index 637a7bcf06..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Information.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.mogo.module.tanlu.model; - -import android.os.Parcel; -import android.os.Parcelable; - -import com.mogo.commons.data.BaseData; - -import java.util.ArrayList; - -/** - * @author lixiaopeng - * @description 列表数据 - * @since 2020-01-05 - */ -public class Information extends BaseData implements Parcelable { - public int type; - public Double lon; - public Double lat; - public String addr; - public Long generateTime; - public String cityName; - public ArrayList items; - public int distance; - public String nickName; - public String headImgUrl; - public String phone; - public String trafficInfoType; - - - @Override - public int describeContents() { - return 0; - } - - @Override - public void writeToParcel(Parcel dest, int flags) { - dest.writeInt(this.type); - dest.writeValue(this.lon); - dest.writeValue(this.lat); - dest.writeString(this.addr); - dest.writeValue(this.generateTime); - dest.writeString(this.cityName); - dest.writeTypedList(this.items); - dest.writeInt(this.distance); - dest.writeString(this.nickName); - dest.writeString(this.headImgUrl); - dest.writeString(this.phone); - dest.writeString(this.trafficInfoType); - } - - public Information() { - } - - protected Information(Parcel in) { - this.type = in.readInt(); - this.lon = (Double) in.readValue(Double.class.getClassLoader()); - this.lat = (Double) in.readValue(Double.class.getClassLoader()); - this.addr = in.readString(); - this.generateTime = (Long) in.readValue(Long.class.getClassLoader()); - this.cityName = in.readString(); - this.items = in.createTypedArrayList(Items.CREATOR); - this.distance = in.readInt(); - this.nickName = in.readString(); - this.headImgUrl = in.readString(); - this.phone = in.readString(); - this.trafficInfoType = in.readString(); - } - - public static final Creator CREATOR = new Creator() { - @Override - public Information createFromParcel(Parcel source) { - return new Information(source); - } - - @Override - public Information[] newArray(int size) { - return new Information[size]; - } - }; -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/InformationAndLiveCarResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/InformationAndLiveCarResult.java deleted file mode 100644 index d40d7ec8e9..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/InformationAndLiveCarResult.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class InformationAndLiveCarResult extends BaseData { - private Result onTheWayData; - private Result infoMationResult; - private Sns snResult; - - public Result getOnTheWayData() { - return onTheWayData; - } - - public void setOnTheWayData(Result onTheWayData) { - this.onTheWayData = onTheWayData; - } - - public Result getInfoMationResult() { - return infoMationResult; - } - - public void setInfoMationResult(Result infoMationResult) { - this.infoMationResult = infoMationResult; - } - - public Sns getSnResult() { - return snResult; - } - - public void setSnResult(Sns snResult) { - this.snResult = snResult; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Items.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Items.kt deleted file mode 100644 index 444c53b240..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Items.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.mogo.module.tanlu.model - -import android.os.Parcel -import android.os.Parcelable - -class Items(var url: String? = null, var thumbnail: String? = null) : Parcelable { - constructor(parcel: Parcel) : this( - parcel.readString(), - parcel.readString() - ) { - } - - override fun writeToParcel(parcel: Parcel, flags: Int) { - parcel.writeString(url) - parcel.writeString(thumbnail) - } - - override fun describeContents(): Int { - return 0 - } - - companion object CREATOR : Parcelable.Creator { - override fun createFromParcel(parcel: Parcel): Items { - return Items(parcel) - } - - override fun newArray(size: Int): Array { - return arrayOfNulls(size) - } - } - - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/LocationCarsWithRadius.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/LocationCarsWithRadius.kt deleted file mode 100644 index f853fe51bb..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/LocationCarsWithRadius.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.mogo.module.tanlu.model - -class LocationCarsWithRadius { - var coordinates: List - var radius: Int - var type: String - var keyWord: String? = null - - constructor(coordinates: List, radius: Int, type: String, keyWord: String) { - this.coordinates = coordinates - this.radius = radius - this.type = type - this.keyWord = keyWord - } - - constructor(coordinates: List, radius: Int, type: String) { - this.coordinates = coordinates - this.radius = radius - this.type = type - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLng.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLng.java deleted file mode 100644 index a24ea22360..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLng.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class NaviLatLng { - public Start start; - public End end; - - NaviLatLng(Start start, End end) { - this.start = start; - this.end = end; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.java deleted file mode 100644 index 086f98a538..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.mogo.module.tanlu.model; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class NaviLatLngInfo implements Serializable { - public String FromPoiLatitude = ""; - public String FromPoiLongitude = ""; - public String ToPoiLatitude = ""; - public String ToPoiLongitude= ""; - - public Start fromStart() { - return new Start(Double.parseDouble(FromPoiLatitude), Double.parseDouble(FromPoiLongitude)); - } - - public End toEnd() { - return new End(Double.parseDouble(ToPoiLatitude), Double.parseDouble(ToPoiLongitude)); - } - - public String getFromPoiLatitude() { - return FromPoiLatitude; - } - - public void setFromPoiLatitude(String fromPoiLatitude) { - FromPoiLatitude = fromPoiLatitude; - } - - public String getFromPoiLongitude() { - return FromPoiLongitude; - } - - public void setFromPoiLongitude(String fromPoiLongitude) { - FromPoiLongitude = fromPoiLongitude; - } - - public String getToPoiLatitude() { - return ToPoiLatitude; - } - - public void setToPoiLatitude(String toPoiLatitude) { - ToPoiLatitude = toPoiLatitude; - } - - public String getToPoiLongitude() { - return ToPoiLongitude; - } - - public void setToPoiLongitude(String toPoiLongitude) { - ToPoiLongitude = toPoiLongitude; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.kt deleted file mode 100644 index b4d7c77b88..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviLatLngInfo.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.mogo.module.tanlu.model - -import java.io.Serializable - -fun NaviLatLngInfo.fromStart(): Start { - return Start(FromPoiLatitude.toDouble(), FromPoiLongitude.toDouble()) -} - -fun NaviLatLngInfo.toEnd(): End { - return End(ToPoiLatitude.toDouble(), ToPoiLongitude.toDouble()) -} - -class NaviLatLngInfo1 : Serializable { - var FromPoiLatitude: String = "" - var FromPoiLongitude: String = "" - var ToPoiLatitude: String = "" - var ToPoiLongitude: String = "" - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviResult.java deleted file mode 100644 index 3f25edee5c..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviResult.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; - -import java.util.List; - -/** - * @author lixiaopeng - * @description 导航沿途数据 - * @since 2020-02-03 - */ -public class NaviResult extends BaseData { - - private Result result; - - public Result getResult() { - return result; - } - - public void setResult(Result result) { - this.result = result; - } - - public static class Result { - private List informations; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviRoadRequest.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviRoadRequest.java deleted file mode 100644 index f62763b6b2..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/NaviRoadRequest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.module.tanlu.model; - -import java.util.List; - -/** - * @author lixiaopeng - * @description - * @since 2020-02-03 - */ -public class NaviRoadRequest { - public List coordinates; - public int limit; - - public NaviRoadRequest(List coordinates, int limit) { - this.coordinates = coordinates; - this.limit = limit; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/PathLineResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/PathLineResult.java deleted file mode 100644 index 3cc9bceba6..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/PathLineResult.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; -import java.util.List; - -/** - * @author lixiaopeng - * @description 通勤族划线 - * @since 2020-01-08 - */ -public class PathLineResult extends BaseData { - - private PathResult result; - - public PathResult getResult() { - return result; - } - - public void setResult(PathResult result) { - this.result = result; - } - - public static class PathResult { - private List informations; - private List

pointList; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } - - public List
getPointList() { - return pointList; - } - - public void setPointList(List
pointList) { - this.pointList = pointList; - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Result.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Result.java deleted file mode 100644 index 4c3f4aeabd..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Result.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; - -import java.util.List; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-08 - */ -public class Result extends BaseData { - public List informations; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/RoadInfoRequest.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/RoadInfoRequest.kt deleted file mode 100644 index 165d9ed0b7..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/RoadInfoRequest.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.mogo.module.tanlu.model - -data class RoadInfoRequest(var location:Location,var poiTypes:Array,var onlyFocus:Boolean = false,var onlySameCity:Boolean = false) - -data class Location(var lat:Double,var lon:Double) \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/RoadInfos.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/RoadInfos.kt deleted file mode 100644 index e282ceb490..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/RoadInfos.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.mogo.module.tanlu.model - -import com.mogo.commons.data.BaseData -import com.mogo.module.common.entity.MarkerExploreWay - -data class RoadInfos(var data:List) : BaseData() diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/SearchOnlineInfo.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/SearchOnlineInfo.kt deleted file mode 100644 index bd80487735..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/SearchOnlineInfo.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.module.tanlu.model - -data class SearchOnlineInfo( - val address: String, - val cityId: String, - val size: Int, -// val radius: Int, - val center: Center, - val adcode: String -) diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Sns.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Sns.kt deleted file mode 100644 index 2ea9c8ebe7..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Sns.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model - - -class Sns { - - var sns: List - var localUserId: String - var localNickName: String - var localHeadImgUrl: String - - constructor(sns: List, localUserId: String, localNickName: String, localHeadImgUrl: String) { - this.sns = sns - this.localUserId = localUserId - this.localNickName = localNickName - this.localHeadImgUrl = localHeadImgUrl - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Start.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Start.java deleted file mode 100644 index 1e43cb6883..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Start.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-09 - */ -public class Start { - public Double lat; - public Double lon; - - public Start(Double lat, Double lon) { - this.lat = lat; - this.lon = lon; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java deleted file mode 100644 index b48668183c..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java +++ /dev/null @@ -1,559 +0,0 @@ -package com.mogo.module.tanlu.model; - -import android.content.Context; -import android.util.Log; - -import com.alibaba.android.arouter.launcher.ARouter; -import com.google.gson.Gson; -import com.mogo.commons.data.BaseData; -import com.mogo.commons.debug.DebugConfig; -import com.mogo.commons.network.ParamsProvider; -import com.mogo.commons.network.SubscribeImpl; -import com.mogo.commons.network.Utils; -import com.mogo.map.MogoLatLng; -import com.mogo.map.location.MogoLocation; -import com.mogo.map.search.geo.MogoPoiItem; -import com.mogo.map.search.poisearch.IMogoPoiSearch; -import com.mogo.map.search.poisearch.MogoPoiResult; -import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery; -import com.mogo.module.common.entity.MarkerExploreWay; -import com.mogo.module.tanlu.callback.AlongTheWayCallback; -import com.mogo.module.tanlu.callback.IThumbsUpCallback; -import com.mogo.module.tanlu.callback.NaviCallback; -import com.mogo.module.tanlu.callback.RoadInfoCallback; -import com.mogo.module.tanlu.callback.RoadLineCallback; -import com.mogo.module.tanlu.callback.UploadShareCallback; -import com.mogo.module.tanlu.callback.VoiceSearchCallback; -import com.mogo.module.tanlu.constant.HttpConst; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.module.tanlu.fragment.TanluServiceManager; -import com.mogo.module.tanlu.net.TanluApiService; -import com.mogo.service.MogoServicePaths; -import com.mogo.service.map.IMogoMapService; -import com.mogo.service.network.IMogoNetwork; -import com.mogo.utils.logger.Logger; -import com.mogo.utils.network.RequestOptions; -import com.mogo.utils.network.utils.GsonUtil; -import com.mogo.utils.storage.SharedPrefsMgr; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import io.reactivex.Observable; -import io.reactivex.ObservableEmitter; -import io.reactivex.ObservableOnSubscribe; -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.functions.Function; -import io.reactivex.schedulers.Schedulers; - -import static com.mogo.commons.network.Utils.getSn; -import static com.mogo.module.tanlu.constant.ConstKt.TYPE_NAME_BLOCK; -import static com.mogo.module.tanlu.constant.TanluConstants.TANLU_ROAD_CONGESTION_COMPAT; -import static com.mogo.module.tanlu.constant.TanluConstants.TANLU_ROAD_CURRENT; - -/** - * @author lixiaopeng - * @description 探路接口数据处理 - * @since 2020-01-09 - */ -public class TanluModelData { - - private final Context mContext; - private TanluApiService mTanluApiService; - private static final String TAG = "TanluModelData"; - - public TanluModelData(Context context) { - Logger.d(TAG, "TanluModelData ------->"); - this.mContext = context; - IMogoNetwork network = (IMogoNetwork) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_NETWORK).navigation(context); - mTanluApiService = network.create(TanluApiService.class, getBaseUrl()); - } - - private String getBaseUrl() { - if (DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE) { - return HttpConst.HOST_PRODUCT; - } else if (DebugConfig.getNetMode() == DebugConfig.NET_MODE_DEMO) { - return HttpConst.HOST_SHOW; - } else { - return HttpConst.HOST_TEST; - } - } - - /** - * 声音控制道理数据 - */ - public void getVoiceControlRoadData(String keywords, String cityId, Double lon, Double lat, - String adCode, final VoiceSearchCallback callback) { - Gson gson = new Gson(); - SearchOnlineInfo searchOnlineInfo = new SearchOnlineInfo(keywords, cityId, 50, new Center(lat, lon), adCode); - String searchInformationStr = gson.toJson(searchOnlineInfo); - - List list = new ArrayList<>(); - list.add(lon); - list.add(lat); - LocationCarsWithRadius locCarsWithRadius = new LocationCarsWithRadius(list, 20000, "circle"); - String locCarsWithRadiusStr = gson.toJson(locCarsWithRadius); - Logger.d(TAG, "getVoiceControlRoadData -------> " + getSn()); - - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", searchInformationStr) - .append("getSnData", locCarsWithRadiusStr) - .build(); - mTanluApiService.searchOnLineInformation(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(VoiceSearchResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getVoiceControlRoadData onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getVoiceControlRoadData onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - Logger.d(TAG, "getVoiceControlRoadData onError ------> e= " + e.getMessage()); - } - }); - } - - - /** - * 通勤族 事件,监听消息自己请求路线数据 ZD821C1933L00974 query.get("sn") - */ - public void getRoadLineData(final RoadLineCallback callback) { - Logger.d(TAG, "getRoadLineData -------> =" + Utils.getSn()); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .build(); - - mTanluApiService.getRoadLineInfo(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(PathLineResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getRoadLineData onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getRoadLineData onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "getRoadLineData onError ------> e= " + e.getMessage()); - } - }); - - } - - /** - * 导航路径,监听消息自己请求路线数据 ZD821C1933L00974 - */ - public void getNaviRoadLineInfo(final RoadLineCallback callback) { - Logger.d(TAG, "getNaviRoadLineInfo -------> =" + Utils.getSn()); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .build(); - - mTanluApiService.getNaviRoadLineInfo(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(PathLineResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getNaviRoadLineInfo onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getNaviRoadLineInfo onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "getNaviRoadLineInfo onError ------> e= " + e.getMessage()); - } - }); - - } - - - /** - * 导航路线数据事件 TODO - */ - public void getNavigationLineData(Double lon, Double lat, final AlongTheWayCallback callback) { - Gson gson = new Gson(); - NaviLatLng coordinates = new NaviLatLng(getNaviInfo(lon, lat).fromStart(), getNaviInfo(lon, lat).toEnd()); - Logger.d(TAG, "getNavigationLineData -------> " + getSn()); - - List list = new ArrayList<>(); - list.add(lon); - list.add(lat); - LocationCarsWithRadius locCarsWithRadius = new LocationCarsWithRadius(list, 20000, "circle"); - String locCarsWithRadiusStr = gson.toJson(locCarsWithRadius); - - final Map params = new ParamsProvider.Builder(mContext) - .append("onTheWayData", gson.toJson(coordinates)) - .append("getSnData", locCarsWithRadiusStr) - .build(); - - mTanluApiService.requestInformationAlongTheWay(Utils.getSn(), params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(InformationAndLiveCarResult data) { - super.onSuccess(data); - callback.onSuccess(data); - Logger.d(TAG, "getNavigationLineData onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getNavigationLineData onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - Logger.d(TAG, "getNavigationLineData onError ------> e= " + e.getMessage()); - } - - }); - } - - - /** - * 获取Location,如果没有location数据为空,则使用首次或者上次定位点,并且更新SP,需要抽取公共方法 - */ - public NaviLatLngInfo getNaviInfo(Double lon, Double lat) { - String naviInfo = SharedPrefsMgr.getInstance(mContext).getString(TanluConstants.NAVI_INFO); - Logger.d(TAG, " getNaviInfo naviInfo =" + naviInfo); - NaviLatLngInfo naviLatLngInfo = new Gson().fromJson(naviInfo, NaviLatLngInfo.class); - Logger.d(TAG, "getLocNaviInfo lat = $lat -----> lon = $lon"); - if (naviLatLngInfo != null) { - if (lon == 0.0 || lat == 0.0) { - return naviLatLngInfo; - } else { - naviLatLngInfo.setFromPoiLatitude(lat + ""); - naviLatLngInfo.setFromPoiLongitude(lon + ""); - SharedPrefsMgr.getInstance(mContext).putString(TanluConstants.NAVI_INFO, new Gson().toJson(naviLatLngInfo)); - return naviLatLngInfo; - } - } else { - return null; - } - } - - - /** - * 上报交通检查和封路 - */ - public void addTrafficCheckInfo(String poiType, String poiImgUrl, String nickname, String headImgUrl, - double lat, double lon, String address, float direction, final UploadShareCallback callback) { - Gson gson = new Gson(); - UploadShareRoadInfo uploadShareRoadInfo = new UploadShareRoadInfo(poiType, poiImgUrl, nickname, headImgUrl, new Center(lat, lon), address, direction); - String uploadShareStr = gson.toJson(uploadShareRoadInfo); - Logger.d(TAG, "addTrafficCheckInfo sn= " + getSn() + ">> uploadShareStr =" + uploadShareStr); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", uploadShareStr) - .build(); - mTanluApiService.uploadCheckTrafficInfor(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(BaseData o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "addTrafficCheckInfo onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "addTrafficCheckInfo onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "addTrafficCheckInfo onError ------> e= " + e.getMessage()); - } - }); - - } - - - /** - * 上报可能错误的数据,server删除 - */ - public void uploadDeleteErrorDataInfo(String id, String poiType, String updateType, final UploadShareCallback callback) { - Gson gson = new Gson(); - UploadErrorDataInfo uploadErrorDataInfo = new UploadErrorDataInfo(id, poiType, updateType); - String uploadShareStr = gson.toJson(uploadErrorDataInfo); - - Logger.d(TAG, "uploadDeleteErrorDataInfo sn= " + getSn() + ">> uploadShareStr =" + uploadShareStr); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", uploadShareStr) - .build(); - - mTanluApiService.uploadDeleteErrorData(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(BaseData o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "uploadDeleteErrorDataInfo onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "uploadDeleteErrorDataInfo onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "uploadDeleteErrorDataInfo onError ------> e= " + e.getMessage()); - } - }); - - } - - /** - * 组装需要的请求list - * - * @return - */ - private List getLatLngRequest(List latLnglist) { - List resultList = new ArrayList<>(); - for (int i = 0; i < latLnglist.size(); i++) { - resultList.add(latLnglist.get(i).lng + "," + latLnglist.get(i).lat); - } - - return resultList; - } - - /** - * 获取导航沿途情报 - */ - public void getNaviInformation(List mogoLatLnglist, final NaviCallback callback) { - Gson gson = new Gson(); - if (mogoLatLnglist == null) { - return; - } - - NaviRoadRequest naviRoadRequest = new NaviRoadRequest(getLatLngRequest(mogoLatLnglist), 10); - String naviStr = gson.toJson(naviRoadRequest); - Logger.d(TAG, "getNaviInformation naviStr = " + naviStr); - final Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", naviStr) - .build(); - - mTanluApiService.getNaviInformation(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl(RequestOptions.create(mContext)) { - @Override - public void onSuccess(NaviResult o) { - super.onSuccess(o); - callback.onSuccess(o); - Logger.d(TAG, "getNaviInformation onSuccess ------>"); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onFail(message, code); - Logger.e(TAG, "getNaviInformation onError message= " + message + ">>code =" + code); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - e.printStackTrace(); - Logger.d(TAG, "getNaviInformation onError ------> e= " + e.getMessage()); - } - }); - } - - /** - * 查询周边道路事件,是通过语音搜索,然后根据语音提供的语义,从服务端查询道路事件 - * - * @param voiceCmdData 语音提供的语义封装 - */ - public void queryRodeInfo(final VoiceCmdData voiceCmdData, final RoadInfoCallback callback) { - Logger.d(TAG, "queryRodeInfo: " + voiceCmdData); - if (voiceCmdData.isHere()) { - // 搜索附近路况,只需要拿到当前位置信息,就可以请求服务端 - MogoLocation l = TanluServiceManager.getServiceApis().getMapServiceApi().getSingletonLocationClient(mContext).getLastKnowLocation(); - Location location = new Location(l.getLatitude(), l.getLongitude()); - callback.onLocatSuccess(l.getLatitude(), l.getLongitude()); - RoadInfoRequest request; - if (voiceCmdData.getObj().equals(TYPE_NAME_BLOCK)) { - // 拥堵和路况同时查 - request = new RoadInfoRequest(location, new String[]{TANLU_ROAD_CONGESTION_COMPAT, TANLU_ROAD_CURRENT}, false, false); - }else{ - request = new RoadInfoRequest(location, new String[]{voiceCmdData.getType()}, false, false); - } - - Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", GsonUtil.jsonFromObject(request)) - .build(); - - mTanluApiService.queryRoadInfos(params) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl>(RequestOptions.create(mContext)) { - @Override - public void onError(Throwable e) { - super.onError(e); - } - - @Override - public void onSuccess(BaseDataCompat o) { - super.onSuccess(o); - Logger.d(TAG, "搜索附近路况信息成功: " + o); - callback.onQueryRoadInfoSuccess(o.getResult().getData()); - Logger.d(TAG, "搜索附近路况信息成功2: " + o); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onQueryRoadInfoFail(message, code); - } - }); - } else { - // 查询的不是附近的信息,所以需要查询一下目标地址的经纬度,然后再请求服务端 - Observable.create(new ObservableOnSubscribe() { - @Override - public void subscribe(ObservableEmitter emitter) throws Exception { - // 根据传入的地址,转成经纬度 - IMogoMapService mapService = TanluServiceManager.getServiceApis().getMapServiceApi(); - String cityCode = mapService.getSingletonLocationClient(mContext).getLastKnowLocation().getCityCode(); - MogoPoiSearchQuery poiSearchQuery = new MogoPoiSearchQuery(voiceCmdData.getLocation(), "", cityCode); - IMogoPoiSearch poiSearch = mapService.getPoiSearch(mContext, poiSearchQuery); - MogoPoiResult result = poiSearch.searchPOI(); - if (result != null && result.getPois() != null && result.getPois().size() > 0) { - emitter.onNext(result); - } else { - emitter.onError(new IllegalArgumentException("没有根据地址查询到对应的经纬度")); - } - } - }).subscribeOn(Schedulers.io()).observeOn(Schedulers.io()) - .flatMap(new Function>>() { - @Override - public Observable> apply(MogoPoiResult mogoPoiResult) throws Exception { - // 转成经纬度后,整理参数,进行接口请求 - Logger.d(TAG, "查询目标地址经纬度成功===" + Thread.currentThread().getName()); - MogoPoiItem poiItem = mogoPoiResult.getPois().get(0); - Location location = new Location(poiItem.getPoint().lat, poiItem.getPoint().lon); - callback.onLocatSuccess(location.getLat(), location.getLon()); - RoadInfoRequest request; - if (voiceCmdData.getObj().equals(TYPE_NAME_BLOCK)) { - // 拥堵和路况同时查 - request = new RoadInfoRequest(location, new String[]{TANLU_ROAD_CONGESTION_COMPAT, TANLU_ROAD_CURRENT}, false, false); - }else{ - request = new RoadInfoRequest(location, new String[]{voiceCmdData.getType()}, false, false); - } - - Map params = new ParamsProvider.Builder(mContext) - .append("sn", Utils.getSn()) - .append("data", GsonUtil.jsonFromObject(request)) - .build(); - return mTanluApiService.queryRoadInfos(params); - } - }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) - .subscribe(new SubscribeImpl>(RequestOptions.create(mContext)) { - @Override - public void onError(Throwable e) { - super.onError(e); - callback.onQueryRoadInfoFail(e.getMessage(), -1); - } - - @Override - public void onSuccess(BaseDataCompat o) { - super.onSuccess(o); - Logger.d(TAG, "当前线程为"+Thread.currentThread().getName()+" 搜索目标地址路况信息成功: " + o); - callback.onQueryRoadInfoSuccess(o.getResult().getData()); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onQueryRoadInfoFail(message, code); - } - }); - } - } - - /** - * 点赞接口 - */ - public void thumbsUp(MarkerExploreWay marker, final IThumbsUpCallback callback) { - ThumbsUpRequest request = new ThumbsUpRequest(Utils.getSn(), null, marker.getPoiType(), marker.getInfoId()); - Map params = new HashMap<>(); - - params.put("data", GsonUtil.jsonFromObject(request)); - mTanluApiService.addLikes(params).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new SubscribeImpl>(RequestOptions.create(mContext)) { - @Override - public void onSuccess(BaseDataCompat o) { - super.onSuccess(o); - callback.onThumbsUpSuccess(); - } - - @Override - public void onError(Throwable e) { - super.onError(e); - callback.onThumbsUpFail(); - } - - @Override - public void onError(String message, int code) { - super.onError(message, code); - callback.onThumbsUpFail(); - } - }); - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Test.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Test.java deleted file mode 100644 index 6756c3290a..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/Test.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description - * @since 2020/7/29 - */ -public class Test { -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/ThumbsUpRequest.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/ThumbsUpRequest.kt deleted file mode 100644 index dbbb52b487..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/ThumbsUpRequest.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.mogo.module.tanlu.model - -data class ThumbsUpRequest( - var sn: String, - var userId: String?, - var poiType: String, - var infoId: String -) \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadErrorDataInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadErrorDataInfo.java deleted file mode 100644 index 2b6458b04e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadErrorDataInfo.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description 分享上报错误信息参数 - * @since 2020-01-16 - */ -public class UploadErrorDataInfo { - public String id; - public String poiType; - public String updateType; - - public UploadErrorDataInfo(String id, String poiType, String updateType) { - this.id = id; - this.poiType = poiType; - this.updateType = updateType; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadShareRoadInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadShareRoadInfo.java deleted file mode 100644 index dcebdccdcf..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/UploadShareRoadInfo.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.mogo.module.tanlu.model; - -/** - * @author lixiaopeng - * @description 分享上报信息参数 - * @since 2020-01-16 - */ -public class UploadShareRoadInfo { - - public String poiType; - public String poiImgUrl; - public String nickname; - public String headImgUrl; - public float direction; - private Center location; - private String address; - - public UploadShareRoadInfo(String poiType, String poiImgUrl, String nickname, - String headImgUrl, Center location, String address, float direction) { - this.poiType = poiType; - this.poiImgUrl = poiImgUrl; - this.nickname = nickname; - this.headImgUrl = headImgUrl; - this.location = location; - this.address = address; - this.direction = direction; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceCmdData.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceCmdData.kt deleted file mode 100644 index b66c24454e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceCmdData.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.mogo.module.tanlu.model - -import com.mogo.module.tanlu.constant.* -import com.mogo.module.tanlu.constant.TanluConstants.* - -/** - * 语音指令附带数据,目前只针对道路事件查询 */ -class VoiceCmdData(var op: String, var location: String, var obj: String) { - - /** - * 将obj转成服务端可识别的道路事件类型 - */ - val type: String - get() { - return when (obj) { - TYPE_NAME_BLOCK -> TANLU_ROAD_CONGESTION_COMPAT - TYPE_NAME_TRAFFIC_CHECK -> TANLU_TRAFFIC_CHECK_COMPAT - TYPE_NAME_CLOSURE -> TANLU_ROAD_CLOSURE_COMPAT - TYPE_NAME_ACCIDENT -> TANLU_ROAD_ACCIDENT - TYPE_NAME_REAL_TIME_TRAFFIC -> TANLU_ROAD_CURRENT - TYPE_NAME_STAGNANT_WATER -> TANLU_ROAD_PONDING - TYPE_NAME_ROAD_ICY -> TANLU_ROAD_ICING - TYPE_NAME_DENSE_FOG -> TANLU_ROAD_HEAVY_FOG - TYPE_NAME_ROAD_CONSTRUCTION -> TANLU_ROAD_CONSTRUCTION - else -> "" - } - } - - fun isHere(): Boolean { - return "附近" == location - } - - override fun toString(): String { - return "VoiceCmdData(op='$op', location='$location', obj='$obj', type='$type')" - } - - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceSearchResult.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceSearchResult.java deleted file mode 100644 index 086957fc6b..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/VoiceSearchResult.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.mogo.module.tanlu.model; - -import com.mogo.commons.data.BaseData; -import java.util.List; - -/** - * @author lixiaopeng - * @description 声音控制接口 - * @since 2020-01-08 - */ -public class VoiceSearchResult extends BaseData { - - private Result result; - - public Result getResult() { - return result; - } - - public void setResult(Result result) { - this.result = result; - } - - public static class Result { - private List informations; - private String description; - private Sns snResult; - - public List getInformations() { - return informations; - } - - public void setInformations(List informations) { - this.informations = informations; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Sns getSnResult() { - return snResult; - } - - public void setSnResult(Sns snResult) { - this.snResult = snResult; - } - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/CloseWindowInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/CloseWindowInfo.java deleted file mode 100644 index 9c036f8cf5..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/CloseWindowInfo.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description push区分类别 - * @since 2020-01-08 - */ -public class CloseWindowInfo implements Serializable { - - public CloseWindowInfo() { - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/ControlClickUpInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/ControlClickUpInfo.java deleted file mode 100644 index a404751bc4..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/ControlClickUpInfo.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model.event; - - -/** - * @author lixiaopeng - * @description 上下按钮事件 - * @since 2020-01-08 - */ -public class ControlClickUpInfo { - public String type; - - public ControlClickUpInfo(String type) { - this.type = type; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/DataErrorInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/DataErrorInfo.java deleted file mode 100644 index 84ade6c8a2..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/DataErrorInfo.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description 错误数据id和type - * @since 2020-01-08 - */ -public class DataErrorInfo implements Serializable { - public String id; //封路,还是上报 - public String poiType; - public String updateType; - - public DataErrorInfo(String id, String poiType, String updateType) { - this.id = id; - this.poiType = poiType; - this.updateType = updateType; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/EmptyData.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/EmptyData.java deleted file mode 100644 index ab8cd2788e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/EmptyData.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.mogo.module.tanlu.model.event; - - -/** - * @author lixiaopeng - * @description 空数据 - * @since 2020-03-12 - */ -public class EmptyData { - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/GetInfoError.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/GetInfoError.java deleted file mode 100644 index fd6eaa07aa..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/GetInfoError.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.module.tanlu.model.event; - - -/** - * @author lixiaopeng - * @description 获取数据失败 - * @since 2020-01-08 - */ -public class GetInfoError { - public String type; - - public GetInfoError(String type) { - this.type = type; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/MarkerInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/MarkerInfo.java deleted file mode 100644 index afdf58cade..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/MarkerInfo.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description marker数据 - * @since 2020-01-08 - */ -public class MarkerInfo implements Serializable { - public String type; //封路,还是上报 - public String fromType; //来源 主动,被动,策略。 - public String imageUrl; //上传完cos图片 - public double lon; //经度 - public double lat; //纬度 - public boolean isCumtom; //是否主动上报 - - public MarkerInfo(String type, String imageUrl, double lon, double lat, boolean isCumtom, String fromType) { - this.type = type; - this.imageUrl = imageUrl; - this.lon = lon; - this.lat = lat; - this.isCumtom = isCumtom; - this.fromType = fromType; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/PushTypeInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/PushTypeInfo.java deleted file mode 100644 index 52c23ebdda..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/PushTypeInfo.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import java.io.Serializable; - -/** - * @author lixiaopeng - * @description push区分类别 - * @since 2020-01-08 - */ -public class PushTypeInfo implements Serializable { - public String type; - - public PushTypeInfo(String type) { - this.type = type; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/SharedialogEvent.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/SharedialogEvent.java deleted file mode 100644 index 3911fd8ea1..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/SharedialogEvent.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -/** - * @author lixiaopeng - * @description 分享弹框事件 - * @since 2020-01-08 - */ -public class SharedialogEvent { - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/StartPlayInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/StartPlayInfo.java deleted file mode 100644 index 03ee5e3754..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/StartPlayInfo.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model.event; - - -/** - * @author lixiaopeng - * @description 开始播放 - * @since 2020-03-11 - */ -public class StartPlayInfo { - public int mPosition; - - public StartPlayInfo(int position) { - this.mPosition = position; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/TanluMarkerEvent.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/TanluMarkerEvent.java deleted file mode 100644 index 8c9ea9cdf2..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/TanluMarkerEvent.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model.event; - -import com.mogo.module.common.entity.MarkerExploreWay; - -/** - * @author lixiaopeng - * @description - * @since 2020/3/11 - */ -public class TanluMarkerEvent { - public MarkerExploreWay markerExploreWay; - - public TanluMarkerEvent(MarkerExploreWay exploreWay) { - this.markerExploreWay = exploreWay; - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/VoiceControlUpInfo.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/VoiceControlUpInfo.java deleted file mode 100644 index 06f9d742fc..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/event/VoiceControlUpInfo.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.mogo.module.tanlu.model.event; - - -/** - * @author lixiaopeng - * @description marker数据 - * @since 2020-01-08 - */ -public class VoiceControlUpInfo { - public String type; - - public VoiceControlUpInfo(String type) { - this.type = type; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/global/GlobalSharedInformation.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/global/GlobalSharedInformation.kt deleted file mode 100644 index 280a81b536..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/global/GlobalSharedInformation.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.mogo.module.tanlu.model.global - -import com.mogo.module.tanlu.model.Information -import java.util.ArrayList - -/** - * @author congtaowang - * @since 2019-12-02 - * - * 共享的情报列表,避免在点击大屏查看视频时intent序列化造成的开销 - */ -object GlobalSharedInformation { - - var informationList: ArrayList? = null -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/net/TanluApiService.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/net/TanluApiService.java deleted file mode 100644 index 190fe47ca0..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/net/TanluApiService.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.mogo.module.tanlu.net; - -import com.mogo.commons.data.BaseData; -import com.mogo.module.tanlu.model.BaseDataCompat; -import com.mogo.module.tanlu.model.InformationAndLiveCarResult; -import com.mogo.module.tanlu.model.NaviResult; -import com.mogo.module.tanlu.model.PathLineResult; -import com.mogo.module.tanlu.model.RoadInfos; -import com.mogo.module.tanlu.model.VoiceSearchResult; - -import java.util.Map; - -import io.reactivex.Observable; -import io.reactivex.Single; -import retrofit2.http.Field; -import retrofit2.http.FieldMap; -import retrofit2.http.FormUrlEncoded; -import retrofit2.http.POST; -import retrofit2.http.Query; - -/** - * @author lixiaopeng - * @description 探路相关接口定义 - * @since 2020-01-07 - */ -public interface TanluApiService { - - /** - * 探路沿途数据,只是为了通知server下发push - */ - @FormUrlEncoded - @POST("deva/car/path/no/getOnTheWayDataAndSn/v1") - Observable requestInformationAlongTheWay(@Query("sn") String sn, @FieldMap Map parameters); - - /** - * 获取上班族路线的坐标集 - */ - @FormUrlEncoded - @POST("yycp-travel-condition/travelDetail/info/no/commuter/v1") - Observable getRoadLineInfo(@FieldMap Map infoBody); - - /** - * 获取导航路线的坐标集 - */ - @FormUrlEncoded - @POST("deva/car/path/no/getOnWayPushData/v1") - Observable getNaviRoadLineInfo(@FieldMap Map infoBody); - - /** - * 基于地理信息词缀的空间情报检索 - */ - @FormUrlEncoded - @POST("deva/car/search/no/searchInforationByAddress/v1") - Observable searchOnLineInformation(@FieldMap Map infoBody); - - /** - * 上报交通检查,封路 - */ - @FormUrlEncoded - @POST("deva/car/poi/no/addNovelty/v1") - Observable uploadCheckTrafficInfor(@FieldMap Map infoBody); - - /** - * 导航沿途情报 - */ - @FormUrlEncoded - @POST("deva/car/search/no/searchInforationByCoordinates/v1") - Observable getNaviInformation(@FieldMap Map infoBody); - - /** - * 纠错 - * 交通检查 10002 - * 封路 10003 - * 拥堵 10007 - */ - @FormUrlEncoded - @POST("deva/car/poi/no/carPoiErrorRecovery/v1") - Observable uploadDeleteErrorData(@FieldMap Map infoBody); - - /** - * 查询(搜索)道路事件信息 - * 接口文档:http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42305842 - * 文档中有些参数暂时没有用到,包括radius,limit - * @return - */ - @FormUrlEncoded - @POST("/yycp-launcherSnapshot/launcherSnapshot/searchRoadEventsSync") - Observable> queryRoadInfos(@FieldMap Map params); - - /** - * 点赞接口 - */ - @FormUrlEncoded - @POST("/deva/poiInfoFabulous/car/poi/no/addPoiInfoFabulous/v1") - Observable> addLikes(@FieldMap Map params); -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/DataErrorReceiver.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/DataErrorReceiver.java deleted file mode 100644 index e4a4ae8d1a..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/DataErrorReceiver.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.mogo.module.tanlu.receiver; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.util.Log; - -import com.mogo.module.tanlu.model.event.DataErrorInfo; -import com.mogo.module.tanlu.model.event.SharedialogEvent; - -import org.greenrobot.eventbus.EventBus; - -/** - * @author lixiaopeng - * @description 数据失效后收到的广播 - * @since 2020-02-09 - */ -public class DataErrorReceiver extends BroadcastReceiver { - @Override - public void onReceive(Context context, Intent intent) { - Log.d("DataErrorReceiver", "intent.getAction() = " + intent.getAction()); - if (intent.getAction() == "com.zhidao.tanlu.dataerror") { - String id = intent.getStringExtra("id"); - String poiType = intent.getStringExtra("type"); - String updateType = intent.getStringExtra("updateType"); - Log.d("DataErrorReceiver", "id = " + id + " >>> poiType = " + poiType + " >>updateType = " + updateType); - EventBus.getDefault().post(new DataErrorInfo(id, poiType, updateType)); - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/GetInfoFailedReceiver.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/GetInfoFailedReceiver.kt deleted file mode 100644 index 4c086f3caa..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/GetInfoFailedReceiver.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.mogo.module.tanlu.receiver - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.util.Log -import com.mogo.module.tanlu.model.event.GetInfoError -import com.mogo.module.tanlu.model.event.MarkerInfo -import com.mogo.module.tanlu.model.event.PushTypeInfo -import org.greenrobot.eventbus.EventBus - -/** - * 摄像头获取数据失败 - */ -class GetInfoFailedReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - Log.d("GetInfoFailedReceiver", "-----1-------"); - if (intent.action == "com.zhidao.roadcondition.getinfo.failed"){ - var type = intent.getStringExtra("type") - Log.d("GetInfoFailedReceiver", " ---2---- type = $type") - EventBus.getDefault().post(GetInfoError(type)) - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/MarkerInfoReceiver.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/MarkerInfoReceiver.kt deleted file mode 100644 index 563301e998..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/MarkerInfoReceiver.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.mogo.module.tanlu.receiver - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.util.Log -import com.mogo.commons.debug.DebugConfig -import com.mogo.module.tanlu.model.event.MarkerInfo -import org.greenrobot.eventbus.EventBus - -/** - * marker数据接收 - */ -class MarkerInfoReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { -// if (intent.action == "com.zhidao.roadcondition.marker.info"){ -// var type = intent.getStringExtra("type") -// var fromType = intent.getStringExtra("fromType") -// var imageUrl = intent.getStringExtra("imageUrl") -// var lat = intent.getDoubleExtra("lat",0.0) -// var lon = intent.getDoubleExtra("lon",0.0) //经度 -// var custom = intent.getBooleanExtra("custom", false) -// Log.d("MarkerInfoReceiver", "type =" + type + "---->lat =" + lat + "----lon =" + lon + " --custom = " + custom + "---imageUrl =" + imageUrl) -// EventBus.getDefault().post(MarkerInfo(type, imageUrl, lon, lat, custom, fromType)) -// } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/PushReceiver.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/PushReceiver.kt deleted file mode 100644 index 88842f1190..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/PushReceiver.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.mogo.module.tanlu.receiver - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import android.net.Uri -import android.util.Log -import com.mogo.module.tanlu.model.event.PushTypeInfo -import org.greenrobot.eventbus.EventBus - -/** - * 导航和通勤族 push的action - */ -class PushReceiver : BroadcastReceiver() { - override fun onReceive(context: Context, intent: Intent) { - if (intent.action == "com.zhidao.roadcondition.split"){ - var uri = Uri.parse(intent.getStringExtra("uri")) - Log.d("PushReceiver", "uri = $uri") - EventBus.getDefault().post(PushTypeInfo(uri.getQueryParameter("type"))) - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/SearchTrafficInfoReceiver.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/SearchTrafficInfoReceiver.kt deleted file mode 100644 index b317748183..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/SearchTrafficInfoReceiver.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.mogo.module.tanlu.receiver - -import android.content.BroadcastReceiver -import android.content.Context -import android.content.Intent -import com.mogo.module.tanlu.constant.* -import com.mogo.module.tanlu.constant.TanluConstants.SPECIFIEDROAD_SEARCH -import com.mogo.module.tanlu.model.VoiceCmdData -import com.mogo.module.tanlu.util.Utils -import com.mogo.utils.logger.Logger - -class SearchTrafficInfoReceiver : BroadcastReceiver() { - private val TAG = "SearchTrafficInfoReceiver" - override fun onReceive(context: Context?, intent: Intent?) { - // 目前只接com.zhidao.speech.awake.notify这一个广播,所以暂不区分action - Logger.d(TAG,"收到搜索事件广播====") - val data = intent?.getStringExtra("data") ?: "" - var voiceData: VoiceCmdData? = null - when (intent?.getStringExtra("command") ?: "") { - VOICE_COMMAND_QUERY_TRAFFIC_CHECK -> { - // 搜索交通检查 - voiceData = Utils.parseTOVoiceCmdData(data) - voiceData.obj = TYPE_NAME_TRAFFIC_CHECK - } - VOICE_COMMAND_QUERY_ROAD_CLOSED -> { - // 搜索封路 - Logger.d(TAG, "封路: $data") - voiceData = Utils.parseTOVoiceCmdData(data) - voiceData.location = voiceData.obj - voiceData.obj = TYPE_NAME_CLOSURE - } - SPECIFIEDROAD_SEARCH->{ - // 拥堵和路况 - Logger.d(TAG,"拥堵和路况:$data") - voiceData = Utils.parseTOVoiceCmdData(data) - voiceData.obj = TYPE_NAME_BLOCK - } - // 其他道路事件 - VOICE_COMMAND_NOVELTY_QUERY -> voiceData = Utils.parseTOVoiceCmdData(data) - else->{ - Logger.d(TAG, "未收录广播===${intent?.getStringExtra("command")}") - } - } - - voiceData?.let { - Logger.d(TAG, "准备开始网络请求,搜索附近道路事件: $it") - } - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/ShareDialogReceiver.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/ShareDialogReceiver.java deleted file mode 100644 index 89680cb0c2..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/receiver/ShareDialogReceiver.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.mogo.module.tanlu.receiver; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.util.Log; - -import com.mogo.module.tanlu.model.event.SharedialogEvent; - -import org.greenrobot.eventbus.EventBus; - -/** - * @author lixiaopeng - * @description - * @since 2020-02-09 - */ -public class ShareDialogReceiver extends BroadcastReceiver { - @Override - public void onReceive(Context context, Intent intent) { - if (intent.getAction() == "com.zhidao.sharedialog") { - EventBus.getDefault().post(new SharedialogEvent()); - } - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ActivityStatusUtil.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ActivityStatusUtil.java deleted file mode 100644 index fa9bb7614b..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ActivityStatusUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.mogo.module.tanlu.util; - -import android.app.ActivityManager; -import android.content.ComponentName; -import android.content.Context; -import android.text.TextUtils; - -import java.util.List; - -import static android.content.Context.ACTIVITY_SERVICE; - -/** - * @author lixiaopeng - * @description - * @since 2019-09-26 - */ -public class ActivityStatusUtil { - /** - * 判断某个activity是否在前台显示 - */ - public static boolean isForeground(Context activity) { - return isForeground(activity, "com.zhidao.roadcondition.main_module.MainActivity"); - } - - /** - * 判断某个界面是否在前台,返回true,为显示,否则不是 - */ - public static boolean isForeground(Context context, String className) { - if (context == null || TextUtils.isEmpty(className)) { - return false; - } - ActivityManager am = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE); - List list = am.getRunningTasks(1); - if (list != null && list.size() > 0) { - ComponentName cpn = list.get(0).topActivity; - if (className.equals(cpn.getClassName())) { - return true; - } else { - - } - } - - return false; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ChartUtil.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ChartUtil.java deleted file mode 100644 index 0d1aad44ba..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/ChartUtil.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.mogo.module.tanlu.util; - -import android.content.Context; - -import com.mogo.module.common.entity.MarkerLocation; -import com.mogo.module.common.entity.MarkerUserInfo; -import com.mogo.module.tanlu.constant.TanluConstants; -import com.mogo.module.tanlu.fragment.TanluServiceManager; -import com.mogo.utils.logger.Logger; -import com.zhidao.carchattingprovider.CallChattingProviderConstant; -import com.zhidao.carchattingprovider.ICallChatResponse; -import org.jetbrains.annotations.Nullable; - -import java.util.HashMap; -import java.util.Map; - -/** - * 调用车聊聊的工具类 - */ -public class ChartUtil { - private static final String TAG = "ChartUtil"; - - public interface ChartStatusListener { - void canCall(boolean b); - } - - /** - * 调用车聊聊拨打电话 - * - * @param userInfo 用户数据 - * @param location 位置信息 - */ - public static void callChatting(MarkerUserInfo userInfo, MarkerLocation location) { - try { - Map params = new HashMap<>(); - params.put(CallChattingProviderConstant.CCPROVIDER_SN, userInfo.getSn()); - params.put(CallChattingProviderConstant.CCPROVIDER_USER_IMG, userInfo.getUserHead()); - params.put(CallChattingProviderConstant.CCPROVIDER_USER_AGE, userInfo.getAgeNumber() + ""); - params.put(CallChattingProviderConstant.CCPROVIDER_NICK_NAME, userInfo.getUserName()); - params.put(CallChattingProviderConstant.CCPROVIDER_USER_SEX, userInfo.getGender() + ""); - - if (location != null) { - params.put(CallChattingProviderConstant.CCPROVIDER_ADDRESS, location.getAddress()); - params.put(CallChattingProviderConstant.CCPROVIDER_LAT, location.getLat() + ""); - params.put(CallChattingProviderConstant.CCPROVIDER_LON, location.getLon() + ""); - } - - Logger.d(TAG, "调用车聊聊传入参数:\n" + params); - TanluServiceManager.getCarsChattingProvider().call(params); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * 判断是否可以拨打电话 - * - * @param chartStatusListener 车聊聊状态监听 - */ - public static void isOnLine(String sn, Context context, ChartStatusListener chartStatusListener) { - TanluServiceManager.getCarsChattingProvider().isOnLine( - "CAR_CALL_TO_" + TanluConstants.MODEL_NAME, - context, - sn, - new ICallChatResponse() { - @Override - public void isOnLine(boolean onLine, @Nullable String errorMsg) { - Logger.e(TAG, "isOnLine:" + onLine + " errorMsg:" + errorMsg); - if (chartStatusListener != null) { - chartStatusListener.canCall(onLine); - } - } - }); - - } - - /** - * 判断是否可以拨打电话 - * - * @param chartStatusListener 车聊聊状态监听 - */ - public static void isCanCall(Context context, ChartStatusListener chartStatusListener) { - TanluServiceManager.getCarsChattingProvider().canCall( - "CAR_CALL_TO_" + TanluConstants.MODEL_NAME, - context, - new ICallChatResponse() { - @Override - public void canCall(boolean onLine) { - Logger.e(TAG, "isOnLine:" + onLine); - if (chartStatusListener != null) { - chartStatusListener.canCall(onLine); - } - } - }); - - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/DoubleCheckUtil.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/DoubleCheckUtil.kt deleted file mode 100644 index a3a1bf645e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/DoubleCheckUtil.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.mogo.module.tanlu.util - - -const val SPACE_TIME = 1000 -var lastClickTime = 0L -var viewId: Int = 0 - -fun isDoubleClick(view: Int): Boolean { - val time = System.currentTimeMillis() - val timeD = time - lastClickTime - if (timeD < SPACE_TIME && viewId == view) { - return true - } - lastClickTime = time - viewId = view - return false -} - - -fun isDoubleClickTime(view: Int,spaceTime:Int): Boolean { - val time = System.currentTimeMillis() - val timeD = time - lastClickTime - if (timeD < spaceTime && viewId == view) { - return true - } - lastClickTime = time - viewId = view - return false -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/GlideRoundTransform.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/GlideRoundTransform.java deleted file mode 100644 index 61a79e2d54..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/GlideRoundTransform.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.mogo.module.tanlu.util; - -import android.content.Context; -import android.content.res.Resources; -import android.graphics.Bitmap; -import android.graphics.BitmapShader; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.RectF; - -import androidx.annotation.NonNull; - -import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; -import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; - -import java.security.MessageDigest; - -/** - * @author lixiaopeng - * @description - * @since 2020/6/3 - */ -public class GlideRoundTransform extends BitmapTransformation { - private static float radius = 0f; - - /** - * 构造函数 默认圆角半径 4dp - * - * @param context Context - */ - public GlideRoundTransform(Context context) { - this(context, 4); - } - - /** - * 构造函数 - * - * @param context Context - * @param dp 圆角半径 - */ - public GlideRoundTransform(Context context, int dp) { -// super(context); - radius = Resources.getSystem().getDisplayMetrics().density * dp; - } - - @Override - protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { - return roundCrop(pool, toTransform); - } - - private static Bitmap roundCrop(BitmapPool pool, Bitmap source) { - if (source == null) return null; - - Bitmap result = pool.get(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); - if (result == null) { - result = Bitmap.createBitmap(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); - } - - Canvas canvas = new Canvas(result); - Paint paint = new Paint(); - paint.setShader(new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP)); - paint.setAntiAlias(true); - RectF rectF = new RectF(0f, 0f, source.getWidth(), source.getHeight()); - canvas.drawRoundRect(rectF, radius, radius, paint); - return result; - } - - @Override - public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) { - - } -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/HideControl.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/HideControl.kt deleted file mode 100644 index d11c954451..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/HideControl.kt +++ /dev/null @@ -1,71 +0,0 @@ -package com.mogo.module.tanlu.util - -import android.os.Message -import android.view.View -import androidx.constraintlayout.widget.Group - -class HideControl { - - companion object { - const val MSG_HIDE = 0x01 - } - - private var mHideHandler: HideHandler = HideHandler() - var view1: Group? = null - var view2: Group? = null - - val hideRunable = Runnable { - mHideHandler.obtainMessage(MSG_HIDE).sendToTarget() - } - - private inner class HideHandler : android.os.Handler() { - override fun handleMessage(msg: Message) { - super.handleMessage(msg) - when (msg.what) { - MSG_HIDE -> { - view1?.let { - it.visibility = View.GONE - } - view2?.let { - it.visibility = View.GONE - } - } - } - } - - } - - fun startHideTimer(view1: Group,view2: Group? = null) { - this.view1 = view1 - this.view2 = view2 - mHideHandler.removeCallbacks(hideRunable) - if (view1.visibility == View.GONE) { - view1.visibility = View.VISIBLE - } - if (view2?.visibility == View.GONE) { - view2.visibility = View.VISIBLE - } - mHideHandler.postDelayed(hideRunable, 3000) - } - - fun resetHideTimer() { - if(view1 != null){ - view1!!.visibility = View.VISIBLE - } - if(view2 != null){ - view2!!.visibility = View.VISIBLE - } - mHideHandler.removeCallbacks(hideRunable) - mHideHandler.postDelayed(hideRunable, 3000) - } - - fun endHideTime() { - mHideHandler.removeCallbacks(hideRunable) - if (view1 != null) { - view1 = null - } - if (view2 != null) { - view2 = null - } - } -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/LocationUtils.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/LocationUtils.java deleted file mode 100644 index f97102c998..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/LocationUtils.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.mogo.module.tanlu.util; - -/** - * @author lixiaopeng - * @description - * @since 2020/3/18 - */ -public class LocationUtils { - /** - * 地球半径 - */ - private static double EARTH_RADIUS = 6378.137; - - private static double rad(double d) { - return d * Math.PI / 180.0; - } - - /** - * 通过经纬度获取距离(单位:米) - * @param lat1 - * @param lng1 - * @param lat2 - * @param lng2 - * @return - */ - public static double getDistance(double lat1, double lng1, double lat2, - double lng2) { - double radLat1 = rad(lat1); - double radLat2 = rad(lat2); - double a = radLat1 - radLat2; - double b = rad(lng1) - rad(lng2); - double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) - + Math.cos(radLat1) * Math.cos(radLat2) - * Math.pow(Math.sin(b / 2), 2))); - s = s * EARTH_RADIUS; - s = Math.round(s * 10000d) / 10000d; - s = s * 1000; - return s; - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/NetworkUtil.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/NetworkUtil.java deleted file mode 100644 index 86a80f7584..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/NetworkUtil.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.mogo.module.tanlu.util; - -import android.Manifest; -import android.annotation.TargetApi; -import android.content.Context; -import android.net.ConnectivityManager; -import android.net.Network; -import android.net.NetworkInfo; -import android.os.Build; - -import androidx.annotation.Nullable; -import androidx.annotation.RequiresPermission; - - -public class NetworkUtil { - /** - * Returns true if device is connected to wifi or mobile network, false - * otherwise. - * - * @param context - * @return - */ - public static boolean isConnected(Context context) { - ConnectivityManager conMan = (ConnectivityManager) context - .getSystemService(Context.CONNECTIVITY_SERVICE); - if (conMan != null){ - NetworkInfo infoWifi = conMan.getNetworkInfo(ConnectivityManager.TYPE_WIFI); - - if (infoWifi != null) { - NetworkInfo.State wifi = infoWifi.getState(); - if (wifi == NetworkInfo.State.CONNECTED) { - return true; - } - } - - NetworkInfo infoMobile = conMan.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); - if (infoMobile != null) { - NetworkInfo.State mobile = infoMobile.getState(); - if (mobile == NetworkInfo.State.CONNECTED) { - return true; - } - } - } - - return false; - } - - /** - * Check if there is any connectivity to a Wifi network - * - * @param context - * @return - */ - public static boolean isConnectedWifi(Context context) { - NetworkInfo info = getNetworkInfo(context); - return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_WIFI); - } - - /** - * Check if there is any connectivity to a mobile network - * - * @param context - * @return - */ - public static boolean isConnectedMobile(Context context) { - NetworkInfo info = getNetworkInfo(context); - return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE); - } - - /** - * Get the network info - * - * @param context - * @return - */ - @Nullable - public static NetworkInfo getNetworkInfo(Context context) { - ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); - if (cm != null){ - return cm.getActiveNetworkInfo(); - }else{ - return null; - } - } - - - @TargetApi( Build.VERSION_CODES.LOLLIPOP ) - @RequiresPermission(allOf = {Manifest.permission.ACCESS_NETWORK_STATE}) - public static boolean isConnectedV21(Context context){ - - boolean isConnect = false; - ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); - - Network[] networks = connMgr.getAllNetworks(); - if (networks.length == 0) { - isConnect = false; - } else if (networks.length == 1) { - NetworkInfo networkInfo = connMgr.getNetworkInfo(networks[0]); - if (networkInfo != null) { - if (networkInfo.isConnected()) { - isConnect = true; - } else { - isConnect = false; - } - } else { - return false; - } - } else if (networks.length == 2) { - //两个同时存在 - NetworkInfo networkInfoOne = connMgr.getNetworkInfo(networks[0]); - NetworkInfo networkInfoTwo = connMgr.getNetworkInfo(networks[1]); - if (networkInfoOne == null || networkInfoTwo == null) { - return false; - } - if (networkInfoOne.isConnected() && networkInfoTwo.isConnected()) { - isConnect = true; - } else if (networkInfoOne.isConnected() && !networkInfoTwo.isConnected()) { - isConnect = true; - } else if (!networkInfoOne.isConnected() && networkInfoTwo.isConnected()) { - isConnect = true; - } else { - isConnect = false; - } - } - return isConnect; - } -} - diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/StringUitl.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/StringUitl.kt deleted file mode 100644 index d216039034..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/StringUitl.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.module.tanlu.util - -import android.text.format.DateFormat -import com.google.gson.Gson -import java.text.DecimalFormat - -const val format = "yyyy/MM/dd HH:mm" - -fun formatDate(time: Long): String { - return DateFormat.format(format, time).toString() -} - -fun convertVar(param: Any?): Any? { - return if (param is String) { - "\"$param\"" - } else { - param - } -} - -//处理距离,大于1000时,四舍五入保留一位小数 -fun handleDistances(distance: Int): String { - if (distance < 1000) { - return distance.toString() + "M" - } else { - var floatDistance = distance.toFloat() - val df = DecimalFormat("0.0") - val transformDistance = floatDistance / 1000 - return (df.format(transformDistance)).toString() + "KM" - } - -} - - - - diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java deleted file mode 100644 index 63e806d2d4..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/util/Utils.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.mogo.module.tanlu.util; - -import com.google.gson.Gson; -import com.mogo.module.tanlu.model.VoiceCmdData; - -import java.text.DecimalFormat; - -/** - * @author lixiaopeng - * @description - * @since 2020-01-08 - */ -public class Utils { - - //处理距离,大于1000时,四舍五入保留一位小数 - public static String handleDistance(double distance) { - if (distance < 1000) { - return distance + "M"; - } else { - DecimalFormat df = new DecimalFormat("0.0"); - double transformDistance = distance / 1000; - return (df.format(transformDistance)) + "KM"; - } - } - - //保留整数,四舍五入 - public static int getIntervalValue(int listSize){ -// var floatSize = listSize.toFloat(); - int transformSize = listSize / 15; - DecimalFormat df = new DecimalFormat("0"); - return Integer.parseInt((df.format(transformSize))); - } - - /** - * 解析json串为 VoiceCmdData 对象 - * - * @param dataJsonStr - * @return - */ - public static VoiceCmdData parseTOVoiceCmdData(String dataJsonStr) { - Gson gson = new Gson(); - return gson.fromJson(dataJsonStr, VoiceCmdData.class); - } - -} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/FullMediaActivity.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/FullMediaActivity.kt deleted file mode 100644 index 8ae52fca65..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/FullMediaActivity.kt +++ /dev/null @@ -1,146 +0,0 @@ -//package com.mogo.module.tanlu.video -// -//import android.app.Activity -//import android.content.Intent -//import android.os.Bundle -//import android.util.Log -//import android.view.View -//import androidx.appcompat.app.AppCompatActivity -//import com.mogo.module.tanlu.R -//import com.mogo.module.tanlu.util.HideControl -//import com.mogo.module.tanlu.util.formatDate -//import com.mogo.utils.logger.Logger -//import com.shuyu.gsyvideoplayer.GSYVideoManager -//import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder -//import kotlinx.android.synthetic.main.tanlu_activity_media_full.* -//import java.util.* -// -///** -// * 全屏显示适配 -// */ -// -//class FullMediaActivity : AppCompatActivity(), View.OnClickListener { -// companion object { -// const val TAG = "FullMediaActivity" -// -// const val PARAM_VIDEO_URL = "param_video_url" -// const val PARAM_THUMB_URL = "param_thumb_url" -// const val PARAM_ADDRESS = "param_address" -// const val PARAM_TIME = "generate_time" -// -// -//// fun launch(context: Activity, strategyInfo: List, position: Int) { -//// val intent = Intent(context, FullMediaActivity::class.java) -//// intent.putExtra(PARAM_MEDIA_POSITION, position) -//// // 使用全局静态对象代替,避免序列化开销 -//// GlobalSharedInformation.informationList = strategyInfo as ArrayList -//// context.startActivityForResult(intent, REQUESTCODE_MAINACTIVITY) -//// context.overridePendingTransition(0, 0) -//// } -// -// fun launch(context: Activity, videoUrl: String, thumbnail: String, address: String, generateTime: Long) { -// val intent = Intent(context, FullMediaActivity::class.java) -// intent.putExtra(PARAM_VIDEO_URL, videoUrl) -// intent.putExtra(PARAM_THUMB_URL, thumbnail) -// intent.putExtra(PARAM_ADDRESS, address) -// intent.putExtra(PARAM_TIME, generateTime) -// context.startActivity(intent) -// context.overridePendingTransition(0, 0) -// } -// } -// -// private var control = HideControl() -// private var gsyVideoOptionBuilder = GSYVideoOptionBuilder() -// private var videoUrl: String? = null -// private var thumbUrl: String? = null -// private var address: String? = null -// private var generateTime: Long = 0 -// -// -// -// override fun onCreate(savedInstanceState: Bundle?) { -// super.onCreate(savedInstanceState) -// setContentView(R.layout.tanlu_activity_media_full) -// handleIntent() -// setListener() -// } -// -// private fun handleIntent() { -// var intent = intent -// -// videoUrl = intent.getStringExtra(PARAM_VIDEO_URL) -// thumbUrl = intent.getStringExtra(PARAM_THUMB_URL) -// address = intent.getStringExtra(PARAM_ADDRESS) -// generateTime = intent.getLongExtra(PARAM_TIME, 0) -// } -// -// override fun onResume() { -// super.onResume() -// updateInformation() -// GSYVideoManager.onResume() -// } -// -// override fun onPause() { -// super.onPause() -// GSYVideoManager.onPause() -// } -// -// //需要监听完成事件 -// private fun setListener() { -// iv_media_back.setOnClickListener(this) -// //重置timer -// video_view.addSingleClickListener(object : -// MediaCoverVideoPlayer.SingleClickListener { -// override fun onClick() { -// control.resetHideTimer() -// } -// }) -// -// //视频播放完成 -// video_view.onCompletionListener(object : -// MediaCoverVideoPlayer.CompletionListener { -// override fun onCompletion() { -// finish() -// } -// }) -// -// video_view -// video_view.loadCoverImage(thumbUrl!!) -// //设置url,点击播放 -// gsyVideoOptionBuilder.setUrl(videoUrl).setCacheWithPlay(true) -// .setPlayTag(TAG).build(video_view) -// video_view.startButton.performClick() -// } -// -// -// private fun updateInformation() { -// tv_media_title_content.text = address -// tv_media_title_time.text = formatDate(generateTime) -// } -// -// -// override fun onClick(view: View) { -// view?.let { -// when (view) { -// iv_media_back -> { -// handleBack() -// } -// } -// } -// } -// -// override fun onDestroy() { -// super.onDestroy() -// GSYVideoManager.releaseAllVideos() -// overridePendingTransition(0, 0) -// } -// -// private fun handleBack() { -// finish() -// } -// -// override fun onBackPressed() { -// super.onBackPressed() -// handleBack() -// } -//} 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 deleted file mode 100644 index d55a6345cb..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/MediaCoverVideoPlayer.kt +++ /dev/null @@ -1,162 +0,0 @@ -package com.mogo.module.tanlu.video - -//package com.mogo.module.tanlu.video -// -//import android.content.Context -//import android.util.AttributeSet -//import android.util.Log -//import android.view.View -//import android.widget.ImageView -//import android.widget.SeekBar -//import com.bumptech.glide.Glide -//import com.mogo.module.tanlu.R -//import com.shuyu.gsyvideoplayer.GSYVideoManager -//import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer -//import com.shuyu.gsyvideoplayer.video.base.GSYVideoView -//import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge -// -// -///** -// * 全屏播放 -// */ -//class MediaCoverVideoPlayer : StandardGSYVideoPlayer { -// -// private lateinit var coverImage: ImageView -// private lateinit var start: ImageView -// private lateinit var fullscreen: ImageView -// private lateinit var singleClickListener: SingleClickListener -// private lateinit var completionListener: CompletionListener -// -// constructor(context: Context?) : super(context) -// constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) -// constructor(context: Context?, fullFlag: Boolean?) : super(context, fullFlag) -// -// interface SingleClickListener { -// fun onClick() -// } -// -// interface CompletionListener { -// fun onCompletion() -// } -// -// override fun init(context: Context) { -// super.init(context) -// coverImage = findViewById(R.id.thumbImage) -// start = findViewById(R.id.start) -// fullscreen = findViewById(R.id.fullscreen) -// if (mThumbImageViewLayout != null -// && (mCurrentState == -1 || mCurrentState == GSYVideoView.CURRENT_STATE_NORMAL || mCurrentState == GSYVideoView.CURRENT_STATE_ERROR) -// ) { -// mThumbImageViewLayout.visibility = View.VISIBLE -// } -// } -// -// fun addSingleClickListener(singleClickListener: SingleClickListener) { -// this.singleClickListener = singleClickListener -// } -// -// fun onCompletionListener(completionListener: CompletionListener) { -// this.completionListener = completionListener -// } -// -// override fun getLayoutId(): Int { -// return R.layout.tanlu_item_video_cover_media -// } -// -// override fun getGSYVideoManager(): GSYVideoViewBridge { -// GSYVideoManager.instance().initContext(context.applicationContext) -// return GSYVideoManager.instance() -// } -// -// override fun setProgressAndTime(progress: Int, secProgress: Int, currentTime: Int, totalTime: Int, forceChange: Boolean) { -// super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange) -// if (progress != 0) { -// mProgressBar.progress = progress -// } -// } -// -// fun loadCoverImage(url: String) { -// Glide.with(context) -// .load(url) -// .into(coverImage) -// } -// -// override fun updateStartImage() { -// when (mCurrentState) { -// GSYVideoView.CURRENT_STATE_PLAYING -> start.setImageResource(R.drawable.selector_bg_btn_pause) -// GSYVideoView.CURRENT_STATE_ERROR -> start.setImageResource(R.drawable.main_video_refresh_btn) -// else -> start.setImageResource(R.drawable.selector_bg_btn_play) -// } -// } -// -// fun setFullClickListener(listener: OnClickListener) { -// fullscreen.setOnClickListener(listener) -// } -// -// override fun onClickUiToggle() { -// super.onClickUiToggle() -// singleClickListener.let { -// it.onClick() -// } -// } -// -// override fun changeUiToCompleteShow() { -// super.changeUiToCompleteShow() -//// setViewShowState(mBottomContainer, View.INVISIBLE) -// } -// -// override fun onAutoCompletion() { -// super.onAutoCompletion() -// mProgressBar.progress = 0 -// -// completionListener.let { -// it.onCompletion() -// } -// } -// -// override fun showWifiDialog() { -// //直接播放,不显示WIFI对话框 -// startPlayLogic() -// } -// -// override fun onClick(v: View?) { -// super.onClick(v) -// v?.let { -// when (v) { -// start -> { -// -// } -// else -> { -// -// } -// } -// } -// } -// -// override fun onPrepared() { -// super.onPrepared() -// } -// -// /** -// * 多次回调 -// */ -// override fun onCompletion() { -// super.onCompletion() -// } -// -// -// override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) { -// super.onProgressChanged(seekBar, progress, fromUser) -// } -// -// override fun onDetachedFromWindow() { -// super.onDetachedFromWindow() -// mFullPauseBitmap?.let { -// if (!it.isRecycled) { -// it.recycle() -// } -// } -// mFullPauseBitmap = null -// } -// -//} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt deleted file mode 100644 index d7819f79bb..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/SimpleCoverVideoPlayer.kt +++ /dev/null @@ -1,194 +0,0 @@ -//package com.mogo.module.tanlu.video -// -//import android.content.Context -//import android.util.AttributeSet -//import android.util.Log -//import android.view.Surface -//import android.view.View -//import android.widget.ImageView -//import com.bumptech.glide.Glide -//import com.bumptech.glide.request.RequestOptions -//import com.mogo.module.common.glide.SkinAbleBitmapTarget -//import com.mogo.module.tanlu.R -//import com.mogo.utils.logger.Logger -//import com.shuyu.gsyvideoplayer.GSYVideoManager -//import com.shuyu.gsyvideoplayer.utils.GSYVideoType -//import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer -//import com.shuyu.gsyvideoplayer.video.base.GSYVideoView -//import com.shuyu.gsyvideoplayer.video.base.GSYVideoViewBridge -// -// -//class SimpleCoverVideoPlayer : StandardGSYVideoPlayer { -// private lateinit var coverImage: ImageView -// private lateinit var start: ImageView -// private lateinit var fullscreen: ImageView -// -// companion object { -// @JvmField -// val TAG: String = "SimpleCoverVideoPlayer.kt" -// } -// -// constructor(context: Context?) : super(context) -// constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) -// constructor(context: Context?, fullFlag: Boolean?) : super(context, fullFlag) -// -// override fun init(context: Context) { -// super.init(context) -// coverImage = findViewById(R.id.thumbImage) -// start = findViewById(R.id.start) -// fullscreen = findViewById(R.id.fullscreen) -// if (mThumbImageViewLayout != null -// && (mCurrentState == -1 || mCurrentState == GSYVideoView.CURRENT_STATE_NORMAL || mCurrentState == GSYVideoView.CURRENT_STATE_ERROR) -// ) { -// mThumbImageViewLayout.visibility = View.VISIBLE -// } -// } -// -// override fun getLayoutId(): Int { -// return R.layout.tanlu_item_video_cover -// } -// -// override fun getGSYVideoManager(): GSYVideoViewBridge { -// GSYVideoManager.instance().initContext(context.applicationContext) -// return GSYVideoManager.instance() -// } -// -// override fun setProgressAndTime(progress: Int, secProgress: Int, currentTime: Int, totalTime: Int, forceChange: Boolean) { -// super.setProgressAndTime(progress, secProgress, currentTime, totalTime, forceChange) -// if (progress != 0) { -//// Log.d("liyz", "SimpleCoverVideoPlayer setProgressAndTime -----2---- $progress"); -// mProgressBar.progress = progress -// } -// } -// -// fun loadCoverImage(url: String, mContext: Context) { -// //加载图片 -// val requestOptions = RequestOptions() -//// .placeholder(R.drawable.tanlu_normal_image) -// .error(R.drawable.tanlu_normal_image) -// Glide.with(mContext).asBitmap() -// .load(url) -// .apply(requestOptions) -// .into(SkinAbleBitmapTarget(coverImage, requestOptions)) -// -// } -// -// override fun updateStartImage() { -// when (mCurrentState) { -//// GSYVideoView.CURRENT_STATE_PLAYING -> start.setImageResource(R.drawable.selector_bg_btn_pause) -//// GSYVideoView.CURRENT_STATE_ERROR -> start.setImageResource(R.drawable.main_video_refresh_btn) -//// else -> start.setImageResource(R.drawable.selector_bg_btn_play) -// } -// } -// -// fun setFullClickListener(listener: OnClickListener) { -// fullscreen.setOnClickListener(listener) -// } -// -// override fun changeUiToCompleteShow() { -// super.changeUiToCompleteShow() -//// setViewShowState(mBottomContainer, View.INVISIBLE) -// mBottomContainer.visibility = View.INVISIBLE -// mProgressBar.visibility = View.GONE -// } -// -// override fun hideAllWidget() { -// super.hideAllWidget() -// mBottomContainer.visibility = View.INVISIBLE -// mProgressBar.visibility = View.GONE -// } -// -// override fun changeUiToPrepareingClear() { -// super.changeUiToPrepareingClear() -// mBottomContainer.visibility = View.INVISIBLE -// mProgressBar.visibility = View.GONE -// } -// -// override fun changeUiToPlayingBufferingClear() { -// super.changeUiToPlayingBufferingClear() -// mBottomContainer.visibility = View.INVISIBLE -// mProgressBar.visibility = View.GONE -// -// } -// -// override fun changeUiToClear() { -// super.changeUiToClear() -// mBottomContainer.visibility = View.INVISIBLE -// mProgressBar.visibility = View.GONE -// } -// -// override fun changeUiToCompleteClear() { -// super.changeUiToCompleteClear() -// mBottomContainer.visibility = View.INVISIBLE -// mProgressBar.visibility = View.GONE -// } -// -// override fun onAutoCompletion() { -// super.onAutoCompletion() -// mProgressBar.progress = 0 -// } -// -// override fun showWifiDialog() { -// //直接播放,不显示WIFI对话框 -// startPlayLogic() -// } -// -// override fun onDetachedFromWindow() { -// super.onDetachedFromWindow() -// mProgressBar.progress = 0 -// mFullPauseBitmap = null -// if (mAudioManager != null) { -// try { -// mAudioManager.abandonAudioFocus(onAudioFocusChangeListener) -// } catch (e: Exception) { -// Logger.e(TAG, e, "onDetachedFromWindow - abandonAudioFocus") -// } -// } -// } -// -// override fun onClick(v: View?) { -// super.onClick(v) -// v?.let { -// when (v) { -// start -> { -// -// } -// else -> { -// -// } -// } -// } -// } -// -// override fun onPrepared() { -// super.onPrepared() -// } -// -// override fun onCompletion() { -// -// } -// -// override fun onSurfaceUpdated(surface: Surface) { -// super.onSurfaceUpdated(surface) -// if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) { -// mThumbImageViewLayout.visibility = View.INVISIBLE -// } -// } -// -// override fun setViewShowState(view: View?, visibility: Int) { -// if (view === mThumbImageViewLayout && visibility != View.VISIBLE) { -// return -// } -// super.setViewShowState(view, visibility) -// } -// -// override fun onSurfaceAvailable(surface: Surface) { -// super.onSurfaceAvailable(surface) -// mProgressBar.visibility = View.GONE -// if (GSYVideoType.getRenderType() != GSYVideoType.TEXTURE) { -// if (mThumbImageViewLayout != null && mThumbImageViewLayout.visibility == View.VISIBLE) { -// mThumbImageViewLayout.visibility = View.INVISIBLE -// } -// } -// } -//} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/VideoInit.kt b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/VideoInit.kt deleted file mode 100644 index 74748e897e..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/video/VideoInit.kt +++ /dev/null @@ -1,23 +0,0 @@ -//package com.mogo.module.tanlu.video -// -//import com.shuyu.gsyvideoplayer.GSYVideoManager -//import com.shuyu.gsyvideoplayer.cache.CacheFactory -//import com.shuyu.gsyvideoplayer.cache.ProxyCacheManager -//import com.shuyu.gsyvideoplayer.model.VideoOptionModel -//import com.shuyu.gsyvideoplayer.player.IjkPlayerManager -//import com.shuyu.gsyvideoplayer.player.PlayerFactory -//import com.shuyu.gsyvideoplayer.utils.GSYVideoType -//import tv.danmaku.ijk.media.player.IjkMediaPlayer -// -// -//fun initVideo() { -// PlayerFactory.setPlayManager(IjkPlayerManager::class.java) -// CacheFactory.setCacheManager(ProxyCacheManager::class.java) -// var list = mutableListOf() -// list.add(VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-accurate-seek", 1)) -// list.add(VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "videotoolbox", 0)) -//// list.add(VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "dns_cache_clear", 1)) -// GSYVideoManager.instance().optionModelList = list -// GSYVideoType.enableMediaCodec() -// GSYVideoType.enableMediaCodecTexture() -//} \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/AutoZoomInImageView.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/AutoZoomInImageView.java deleted file mode 100644 index cd34a35832..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/AutoZoomInImageView.java +++ /dev/null @@ -1,274 +0,0 @@ -package com.mogo.module.tanlu.view; - -import com.mogo.service.imageloader.MogoImageView; - -import android.animation.Animator; -import android.animation.ValueAnimator; -import android.content.Context; -import android.graphics.Matrix; -import android.graphics.drawable.Drawable; -import android.util.AttributeSet; -import android.view.View; - - -/** - * @author lixiaopeng - * @description - * @since 2020-01-06 - */ -public class AutoZoomInImageView extends MogoImageView { - private int mDrawableW; - private int mDrawableH; - private int mImageViewW; - private int mImageViewH; - private long mDurationMillis = 700; - - private float[] mValues = new float[9]; - private float mScaleDelta = 0.2f; - - private Drawable mDrawable; - private Matrix mMatrix; - - public AutoZoomInImageView(Context context) { - super(context); - this.setScaleType(ScaleType.MATRIX); - } - - public AutoZoomInImageView(Context context, AttributeSet attrs) { - super(context, attrs); - this.setScaleType(ScaleType.MATRIX); - } - - public AutoZoomInImageView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - this.setScaleType(ScaleType.MATRIX); - } - - public AutoZoomInImageView init() { - initInternalValues(); - initPicturePosition(); - return this; - } - - public void init(Drawable drawable) { - initInternalValues(drawable); - initPicturePosition(); - } - - private void initInternalValues() { - mDrawable = getDrawable(); - - if (mDrawable == null) { - throw new IllegalArgumentException("please set the source of AutoZoomInImageView"); - } - - mDrawableW = mDrawable.getIntrinsicWidth(); - mDrawableH = mDrawable.getIntrinsicHeight(); - - mImageViewW = getMeasuredWidth(); - mImageViewH = getMeasuredHeight(); - - mMatrix = getImageMatrix(); - mMatrix.getValues(mValues); - } - - private void initInternalValues(Drawable drawable) { - mDrawable = drawable; - - if (mDrawable == null) { - throw new IllegalArgumentException("please set the source of AutoZoomInImageView"); - } - - mDrawableW = mDrawable.getIntrinsicWidth(); - mDrawableH = mDrawable.getIntrinsicHeight(); - - mImageViewW = getMeasuredWidth(); - mImageViewH = getMeasuredHeight(); - - mMatrix = getImageMatrix(); - mMatrix.getValues(mValues); - } - - private void initPicturePosition() { - updateMatrixValuesOrigin(mMatrix, mValues, mDrawableW, mDrawableH, mImageViewW, mImageViewH); - setImageMatrix(mMatrix); - } - - private ValueAnimator mCurrentAnimator; - - private void startZoomInByScaleDelta(final float scaleDelta, long duration) { - - final float oriScaleX = mValues[0]; - final float oriScaleY = mValues[4]; - - mCurrentAnimator = ValueAnimator.ofFloat(0, scaleDelta); - mCurrentAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { - - @Override - public void onAnimationUpdate(ValueAnimator animation) { - float value = (Float) animation.getAnimatedValue(); - if (mOnZoomListener != null) - mOnZoomListener.onUpdate(AutoZoomInImageView.this, value / scaleDelta); - updateMatrixValuesSpan(mValues, mDrawableW, mDrawableH, mImageViewW, mImageViewH, - oriScaleX, oriScaleY, value); - mMatrix.setValues(mValues); - setImageMatrix(mMatrix); - } - }); - mCurrentAnimator.addListener(new Animator.AnimatorListener() { - @Override - public void onAnimationStart(Animator animation) { - if (mOnZoomListener != null) mOnZoomListener.onStart(AutoZoomInImageView.this); - } - - @Override - public void onAnimationEnd(Animator animation) { - if (mOnZoomListener != null) mOnZoomListener.onEnd(AutoZoomInImageView.this); - mCurrentAnimator = null; - } - - @Override - public void onAnimationCancel(Animator animation) { - mCurrentAnimator = null; - } - - @Override - public void onAnimationRepeat(Animator animation) { - } - }); - mCurrentAnimator.setDuration(duration); - mCurrentAnimator.start(); - } - - /** - * 停止动画 - */ - public void stopCurrentAnimator(){ - if ( mCurrentAnimator != null ) { - if ( mCurrentAnimator.isRunning() ) { - mCurrentAnimator.cancel(); - } - } - } - - /** - * start zooming in - * - * @param scaleDelta the scale that the image will add to original scale - * @param durationMillis the duration of zoomin animation, in millisecond. - * @param delayMillis the delayed time of starting zoomin animation, in millisecond. - */ - public void startZoomInByScaleDeltaAndDuration(final float scaleDelta, final long durationMillis, long delayMillis) { - if (scaleDelta < 0) { - throw new IllegalArgumentException("scaleDelta should be larger than 0, now scaleDelta is " + scaleDelta); - } - if (durationMillis < 0) { - throw new IllegalArgumentException("durationMillis should not be less than 0, now durationMillis is " + durationMillis); - } - if (delayMillis < 0) { - throw new IllegalArgumentException("delayMillis should not be less than 0, now delayMillis is " + delayMillis); - } - postDelayed(new Runnable() { - @Override - public void run() { - startZoomInByScaleDelta(scaleDelta, durationMillis); - } - }, delayMillis); - } - - /** - * the scale that the image will add to original scale - * - * @param scaleDelta - * @return - */ - public AutoZoomInImageView setScaleDelta(float scaleDelta) { - mScaleDelta = scaleDelta; - return this; - } - - /** - * the duration of zoomin animation, in millisecond. - * - * @param durationMillis - * @return - */ - public AutoZoomInImageView setDurationMillis(long durationMillis) { - mDurationMillis = durationMillis; - return this; - } - - /** - * callback when zoomin animation finished - * - * @param onZoomListener - * @return - */ - public AutoZoomInImageView setOnZoomListener(OnZoomListener onZoomListener) { - mOnZoomListener = onZoomListener; - return this; - } - - /** - * start animation of zoomin - * - * @param delayMillis the delayed time of starting zoomin animation, in millisecond. - */ - public void start(long delayMillis) { - postDelayed(new Runnable() { - @Override - public void run() { - startZoomInByScaleDelta(mScaleDelta, mDurationMillis); - } - }, delayMillis); - } - - private void updateMatrixValuesOrigin(Matrix outMatrix, float[] outValues, float drawW, float drawH, float imageW, float imageH) { - if (outMatrix == null || outValues == null) { - throw new IllegalArgumentException("please set the source of AutoZoomInImageView's matrix and values"); - } - outMatrix.reset(); - if ((imageH * drawW > drawH * imageW)) { - float scale1 = (imageH) / (drawH); - float offset1 = (drawW * scale1 - imageW) / 2; - outMatrix.postScale(scale1, scale1); - outMatrix.postTranslate(-offset1, 0); - } else { - float scale2 = (imageW) / (drawW); - float offset2 = (drawH * scale2 - imageH) / 2; - outMatrix.postScale(scale2, scale2); - outMatrix.postTranslate(0, -offset2); - } - outMatrix.getValues(outValues); - } - - private void updateMatrixValuesSpan(float[] outValues, - float drawW, float drawH, - float imageW, float imageH, - float oriScaleX, float oriScaleY, - float scaleDelta) { - outValues[0] = oriScaleX * (1 + scaleDelta); - outValues[4] = oriScaleY * (1 + scaleDelta); - float offsetwidth = (drawW * outValues[0] - imageW) / 2; - outValues[2] = -offsetwidth; - float offsetHeight = (drawH * outValues[4] - imageH) / 2; - outValues[5] = -offsetHeight; - } - - private OnZoomListener mOnZoomListener; - - public interface OnZoomListener { - /** - * callback when zoom in animation is updating - * - * @param view AutoZoomInImageView - * @param progress return the progress of animation, scope is [0,1] - */ - void onUpdate(View view, float progress); - - void onEnd(View view); - - void onStart(View view); - } - -} diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/NetErrorDialog.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/NetErrorDialog.java deleted file mode 100644 index c303056633..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/NetErrorDialog.java +++ /dev/null @@ -1,169 +0,0 @@ -package com.mogo.module.tanlu.view; - -import android.app.Dialog; -import android.content.Context; -import android.os.Bundle; -import android.text.TextUtils; -import android.text.method.LinkMovementMethod; -import android.util.TypedValue; -import android.view.Gravity; -import android.view.View; -import android.widget.TextView; - -import androidx.annotation.NonNull; - -import com.mogo.module.tanlu.R; - - -public class NetErrorDialog extends Dialog { - TextView txtOk; - TextView txtCancel; - TextView txtContent; - TextView txtSubContent; - - private int mContentSize = 0; - private int mContentColor = 0; - private int mBtnSize = 0; - - private View.OnClickListener onOkListener, onCancelListener; - - private String title, subContent, okText, cancelText; - private CharSequence content; - private boolean isAutoDismissDialog = true; - - private int contentGravity = Gravity.CENTER; - - private boolean isContentClickSpanEnable = false; - - public NetErrorDialog(@NonNull Context context) { - super(context, R.style.Theme_AppCompat_Dialog); - getWindow().setBackgroundDrawableResource(android.R.color.transparent); - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.tanlu_dialog_neterror_layout); - - initView(); - - if (mContentSize > 0){ - txtContent.setTextSize(TypedValue.COMPLEX_UNIT_PX,mContentSize); - } - - if (mContentColor > 0){ - txtContent.setTextColor(mContentColor); - } - - if ( content instanceof String ) { - content = ( ( String ) content ).replace( "\\n", "\n" ); - } - - txtContent.setText(content); - if (TextUtils.isEmpty(subContent)) { - txtSubContent.setVisibility(View.GONE); - } else { - txtSubContent.setVisibility(View.VISIBLE); - txtSubContent.setText(subContent); - } - - if (mBtnSize > 0){ - txtOk.setTextSize(TypedValue.COMPLEX_UNIT_PX,mBtnSize); - txtCancel.setTextSize(TypedValue.COMPLEX_UNIT_PX,mBtnSize); - } - - if (!TextUtils.isEmpty(okText)) { - txtOk.setVisibility(View.VISIBLE); - txtOk.setText(okText); - } else { - txtOk.setVisibility(View.GONE); - } - if (!TextUtils.isEmpty(cancelText)) { - txtCancel.setVisibility(View.VISIBLE); - txtCancel.setText(cancelText); - } else { - txtCancel.setVisibility(View.GONE); - } - - txtOk.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (isAutoDismissDialog) { - dismiss(); - } - if (onOkListener != null) { - onOkListener.onClick(v); - } - } - }); - - txtCancel.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (isAutoDismissDialog) { - dismiss(); - } - if (onCancelListener != null) { - onCancelListener.onClick(v); - } - } - }); - - txtContent.setGravity( contentGravity ); - - if ( isContentClickSpanEnable ) { - txtContent.setMovementMethod( LinkMovementMethod.getInstance() ); - } - - } - - private void initView() { - txtOk = findViewById(R.id.txt_ok); - txtCancel = findViewById(R.id.txt_cancel); - txtContent = findViewById(R.id.txt_content); - txtSubContent = findViewById(R.id.txt_sub_content); - } - - public void setContent(CharSequence content) { - this.content = content; - } - - public void setSubContent(String subContent) { - this.subContent = subContent; - } - - public TextView getTxtCancel() { - return txtCancel; - } - - public void setOnOkClickListener(String okText, View.OnClickListener onOkClickListener) { - this.okText = okText; - this.onOkListener = onOkClickListener; - } - - public void setOnOkClickListener(View.OnClickListener onOkClickListener) { - setOnOkClickListener("确定", onOkClickListener); - } - - public void setOnCancelListener(String cancelText, View.OnClickListener onCancelListener) { - this.cancelText = cancelText; - this.onCancelListener = onCancelListener; - } - - public void setOnCancelListener(View.OnClickListener onCancelListener) { - setOnCancelListener("取消", onCancelListener); - } - - public void setAutoDismissDialog(boolean autoDismissDialog) { - isAutoDismissDialog = autoDismissDialog; - } - - public int getContentGravity() { - return contentGravity; - } - - public void setContentClickSpanEnable( boolean contentClickSpanEnable ) { - isContentClickSpanEnable = contentClickSpanEnable; - } -} - diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/RoundLayout.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/RoundLayout.java deleted file mode 100644 index 5912f8c56a..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/RoundLayout.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.mogo.module.tanlu.view; - -import android.content.Context; -import android.content.res.TypedArray; -import android.graphics.Canvas; -import android.graphics.Path; -import android.graphics.RectF; -import android.util.AttributeSet; -import android.widget.RelativeLayout; - -import androidx.annotation.DrawableRes; - -import com.mogo.module.tanlu.R; -import com.mogo.skin.support.IMogoSkinCompatSupportable; -import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate; - -/** - * author : donghongyu - * e-mail : 1358506549@qq.com - * date : 2020/3/25 11:39 AM - * desc : - * version: 1.0 - */ -public class RoundLayout extends RelativeLayout implements IMogoSkinCompatSupportable { - private float roundLayoutRadius = 14f; - private Path roundPath; - private RectF rectF; - private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper; - - public RoundLayout(Context context) { - this(context, null); - } - - public RoundLayout(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public RoundLayout(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - - TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoundLayout); - roundLayoutRadius = typedArray.getDimensionPixelSize(R.styleable.RoundLayout_roundLayoutRadius, (int) roundLayoutRadius); - typedArray.recycle(); - - init(); - - mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this); - mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr); - } - - - private void init() { - setWillNotDraw(false);//如果你继承的是ViewGroup,注意此行,否则draw方法是不会回调的; - roundPath = new Path(); - rectF = new RectF(); - } - - private void setRoundPath() { - //添加一个圆角矩形到path中, 如果要实现任意形状的View, 只需要手动添加path就行 - roundPath.addRoundRect(rectF, roundLayoutRadius, roundLayoutRadius, Path.Direction.CW); - } - - - public void setRoundLayoutRadius(float roundLayoutRadius) { - this.roundLayoutRadius = roundLayoutRadius; - setRoundPath(); - postInvalidate(); - } - - - @Override - public void setBackgroundResource(@DrawableRes int resId) { - super.setBackgroundResource(resId); - if (mBackgroundTintHelper != null) { - mBackgroundTintHelper.onSetBackgroundResource(resId); - } - } - - @Override - protected void onLayout(boolean changed, int l, int t, int r, int b) { - super.onLayout(changed, l, t, r, b); - rectF.set(0f, 0f, getMeasuredWidth(), getMeasuredHeight()); - setRoundPath(); - } - - @Override - public void draw(Canvas canvas) { - if (roundLayoutRadius > 0f) { - canvas.clipPath(roundPath); - } - super.draw(canvas); - } - - @Override - public void applySkin() { - if (mBackgroundTintHelper != null) { - mBackgroundTintHelper.applySkin(); - } - } - -} - diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/UploadFailedDialog.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/UploadFailedDialog.java deleted file mode 100644 index 31cd067e08..0000000000 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/view/UploadFailedDialog.java +++ /dev/null @@ -1,202 +0,0 @@ -package com.mogo.module.tanlu.view; - -import android.app.Dialog; -import android.content.Context; -import android.os.Bundle; -import android.text.TextUtils; -import android.text.method.LinkMovementMethod; -import android.util.TypedValue; -import android.view.Gravity; -import android.view.View; -import android.widget.TextView; - -import androidx.annotation.NonNull; - -import com.mogo.module.tanlu.R; - - -public class UploadFailedDialog extends Dialog { - TextView txtOk; - TextView txtCancel; -// TextView txtTitle; - TextView txtContent; - TextView txtSubContent; - - private int mContentSize = 0; - private int mContentColor = 0; - private int mBtnSize = 0; - - private View.OnClickListener onOkListener, onCancelListener; - - private String title, subContent, okText, cancelText; - private CharSequence content; - private boolean isAutoDismissDialog = true; - - private int contentGravity = Gravity.CENTER; - - private boolean isContentClickSpanEnable = false; - - public UploadFailedDialog(@NonNull Context context) { - super(context, R.style.Theme_AppCompat_Dialog); - getWindow().setBackgroundDrawableResource(android.R.color.transparent); - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.tanlu_dialog_cutom_layout); - getWindow().setBackgroundDrawableResource(android.R.color.transparent); - - initView(); - -// if (TextUtils.isEmpty(title)) { -// txtTitle.setVisibility(View.GONE); -// } else { -// txtTitle.setText(title); -// txtTitle.setVisibility(View.VISIBLE); -// } - - if (mContentSize > 0){ - txtContent.setTextSize(TypedValue.COMPLEX_UNIT_PX,mContentSize); - } - - if (mContentColor > 0){ - txtContent.setTextColor(mContentColor); - } - - if ( content instanceof String ) { - content = ( ( String ) content ).replace( "\\n", "\n" ); - } - - txtContent.setText(content); - if (TextUtils.isEmpty(subContent)) { - txtSubContent.setVisibility(View.GONE); - } else { - txtSubContent.setVisibility(View.VISIBLE); - txtSubContent.setText(subContent); - } - - if (mBtnSize > 0){ - txtOk.setTextSize(TypedValue.COMPLEX_UNIT_PX,mBtnSize); - txtCancel.setTextSize(TypedValue.COMPLEX_UNIT_PX,mBtnSize); - } - - if (!TextUtils.isEmpty(okText)) { - txtOk.setVisibility(View.VISIBLE); - txtOk.setText(okText); - } else { - txtOk.setVisibility(View.GONE); - } - if (!TextUtils.isEmpty(cancelText)) { - txtCancel.setVisibility(View.VISIBLE); - txtCancel.setText(cancelText); - } else { - txtCancel.setVisibility(View.GONE); - } - - txtOk.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (isAutoDismissDialog) { - dismiss(); - } - if (onOkListener != null) { - onOkListener.onClick(v); - } - } - }); - txtCancel.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (isAutoDismissDialog) { - dismiss(); - } - if (onCancelListener != null) { - onCancelListener.onClick(v); - } - } - }); - - txtContent.setGravity( contentGravity ); - - if ( isContentClickSpanEnable ) { - txtContent.setMovementMethod( LinkMovementMethod.getInstance() ); - } - - } - - private void initView() { - txtOk = findViewById(R.id.txt_ok); - txtCancel = findViewById(R.id.txt_cancel); -// txtTitle = findViewById(R.id.txt_title); - txtContent = findViewById(R.id.txt_content); - txtSubContent = findViewById(R.id.txt_sub_content); - } - - public TextView getTxtCancel() { - return txtCancel; - } - -// public void setTitle(String title) { -// this.title = title; -// } - - public void setContent(CharSequence content) { - this.content = content; - } - - public void setSubContent(String subContent) { - this.subContent = subContent; - } - - public void setContentGravity(int gravity) { - contentGravity = gravity; - } - - public void hiddenBtnCancel() { - txtCancel.setVisibility(View.GONE); - } - - public void setOnOkClickListener(String okText, View.OnClickListener onOkClickListener) { - this.okText = okText; - this.onOkListener = onOkClickListener; - } - - public void setOnOkClickListener(View.OnClickListener onOkClickListener) { - setOnOkClickListener("确定", onOkClickListener); - } - - public void setOnCancelListener(String cancelText, View.OnClickListener onCancelListener) { - this.cancelText = cancelText; - this.onCancelListener = onCancelListener; - } - - public void setOnCancelListener(View.OnClickListener onCancelListener) { - setOnCancelListener("取消", onCancelListener); - } - - public void setAutoDismissDialog(boolean autoDismissDialog) { - isAutoDismissDialog = autoDismissDialog; - } - - public void setBtnTextSize(int size){ - mBtnSize = size; - } - - public void setContentTextSize(int size){ - mContentSize = size; - } - - public void setContentColor(int color){ - mContentColor = color; - } - - public int getContentGravity() { - return contentGravity; - } - - public void setContentClickSpanEnable( boolean contentClickSpanEnable ) { - isContentClickSpanEnable = contentClickSpanEnable; - } -} - diff --git a/modules/mogo-module-tanlu/src/main/res/anim/v2x_like_heart_animation.xml b/modules/mogo-module-tanlu/src/main/res/anim/v2x_like_heart_animation.xml deleted file mode 100644 index eb0b1e566a..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/anim/v2x_like_heart_animation.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/anim/v2x_unlike_heart_animation.xml b/modules/mogo-module-tanlu/src/main/res/anim/v2x_unlike_heart_animation.xml deleted file mode 100644 index 2982515e45..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/anim/v2x_unlike_heart_animation.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/app_icon.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/app_icon.png deleted file mode 100644 index c97be4be12..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/app_icon.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_like.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_like.png deleted file mode 100644 index 3ce8b5d793..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_like.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_like_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_like_bg.png deleted file mode 100644 index 95f8552545..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_like_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_unlike.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_unlike.png deleted file mode 100644 index 2df4d5ba5d..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_unlike.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_unlike_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_unlike_bg.png deleted file mode 100644 index 66a3d308ca..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_heart_unlike_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_window_close_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_window_close_normal.png deleted file mode 100644 index e99eeaf974..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_window_close_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_window_close_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_window_close_press.png deleted file mode 100644 index 095574d6e2..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/icon_window_close_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_normal.png deleted file mode 100644 index 9c1a2a4aea..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_press.png deleted file mode 100644 index d927b18877..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_left_page_up_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_normal.png deleted file mode 100644 index dda526f475..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_press.png deleted file mode 100644 index 2289209d9a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_solid_right_page_up_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_pause_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_pause_btn_normal.png deleted file mode 100644 index 90b401f17f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_pause_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_play_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_play_btn_normal.png deleted file mode 100644 index a30cf8591a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_play_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_refresh_btn.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_refresh_btn.png deleted file mode 100644 index 7f021fc1a9..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_video_refresh_btn.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_view_empty_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_view_empty_bg.png deleted file mode 100644 index 627aab9957..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/main_view_empty_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_next.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_next.png deleted file mode 100644 index 339d7731ec..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_next.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_previous.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_previous.png deleted file mode 100644 index 7c0e9618fb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/media_previous.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/module_tanlu_upload_fail.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/module_tanlu_upload_fail.png deleted file mode 100644 index f11f2cb3cd..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/module_tanlu_upload_fail.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/module_tanlu_upload_success.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/module_tanlu_upload_success.png deleted file mode 100644 index 19829a2454..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/module_tanlu_upload_success.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/public_arrow_back_iv.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/public_arrow_back_iv.png deleted file mode 100644 index cd7159e219..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/public_arrow_back_iv.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/share_failed_icon.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/share_failed_icon.png deleted file mode 100644 index 38609be713..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/share_failed_icon.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat.png deleted file mode 100644 index 89ae31e528..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat_nomal.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat_nomal.png deleted file mode 100644 index 151904c2d9..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat_nomal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat_press.png deleted file mode 100644 index 8da24b97ee..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_chat_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_head_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_head_image.png deleted file mode 100644 index a6fba691bb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_head_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_icon_logo.png deleted file mode 100644 index 957c298fd6..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_icon_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_like.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_like.png deleted file mode 100644 index 0f1c0132e1..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_like.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_logo.png deleted file mode 100644 index 1fc2152cd5..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_navi.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_navi.png deleted file mode 100644 index db15c8c987..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_navi.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_normal_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_normal_image.png deleted file mode 100644 index 4be775c67e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-ldpi/tanlu_normal_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/app_icon.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/app_icon.png deleted file mode 100644 index c97be4be12..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/app_icon.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_like.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_like.png deleted file mode 100644 index 3ce8b5d793..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_like.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_like_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_like_bg.png deleted file mode 100644 index 95f8552545..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_like_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_unlike.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_unlike.png deleted file mode 100644 index 2df4d5ba5d..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_unlike.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_unlike_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_unlike_bg.png deleted file mode 100644 index 66a3d308ca..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_heart_unlike_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_window_close_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_window_close_normal.png deleted file mode 100644 index e99eeaf974..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_window_close_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_window_close_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_window_close_press.png deleted file mode 100644 index 095574d6e2..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/icon_window_close_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_left_page_up_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_left_page_up_normal.png deleted file mode 100644 index 9c1a2a4aea..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_left_page_up_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_left_page_up_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_left_page_up_press.png deleted file mode 100644 index d927b18877..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_left_page_up_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_right_page_up_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_right_page_up_normal.png deleted file mode 100644 index dda526f475..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_right_page_up_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_right_page_up_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_right_page_up_press.png deleted file mode 100644 index 2289209d9a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_solid_right_page_up_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_pause_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_pause_btn_normal.png deleted file mode 100644 index 90b401f17f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_pause_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_play_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_play_btn_normal.png deleted file mode 100644 index a30cf8591a..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_play_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_refresh_btn.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_refresh_btn.png deleted file mode 100644 index 7f021fc1a9..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_video_refresh_btn.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_view_empty_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_view_empty_bg.png deleted file mode 100644 index 627aab9957..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/main_view_empty_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/media_next.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/media_next.png deleted file mode 100644 index 339d7731ec..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/media_next.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/media_previous.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/media_previous.png deleted file mode 100644 index 7c0e9618fb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/media_previous.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/module_tanlu_upload_fail.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/module_tanlu_upload_fail.png deleted file mode 100644 index f11f2cb3cd..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/module_tanlu_upload_fail.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/module_tanlu_upload_success.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/module_tanlu_upload_success.png deleted file mode 100644 index 19829a2454..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/module_tanlu_upload_success.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/public_arrow_back_iv.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/public_arrow_back_iv.png deleted file mode 100644 index cd7159e219..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/public_arrow_back_iv.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/share_failed_icon.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/share_failed_icon.png deleted file mode 100644 index 38609be713..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/share_failed_icon.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat.png deleted file mode 100644 index 89ae31e528..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat_nomal.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat_nomal.png deleted file mode 100644 index 151904c2d9..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat_nomal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat_press.png deleted file mode 100644 index 8da24b97ee..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_chat_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_head_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_head_image.png deleted file mode 100644 index a6fba691bb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_head_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_icon_logo.png deleted file mode 100644 index 5480b6d165..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_icon_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_like.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_like.png deleted file mode 100644 index 0f1c0132e1..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_like.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_logo.png deleted file mode 100644 index 1fc2152cd5..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_navi.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_navi.png deleted file mode 100644 index db15c8c987..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_navi.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_normal_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_normal_image.png deleted file mode 100644 index 4be775c67e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-mdpi/tanlu_normal_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/icon_window_close_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/icon_window_close_normal.png deleted file mode 100644 index e99eeaf974..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/icon_window_close_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/icon_window_close_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/icon_window_close_press.png deleted file mode 100644 index 095574d6e2..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/icon_window_close_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_video_pause_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_video_pause_btn_normal.png deleted file mode 100644 index cbd22bb486..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_video_pause_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_video_play_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_video_play_btn_normal.png deleted file mode 100644 index bddef2f872..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_video_play_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_view_empty_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_view_empty_bg.png deleted file mode 100644 index bde2223192..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/main_view_empty_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/media_next.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/media_next.png deleted file mode 100644 index cfb640f6a3..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/media_next.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/media_previous.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/media_previous.png deleted file mode 100644 index fe7bd3486c..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/media_previous.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/share_failed_icon.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/share_failed_icon.png deleted file mode 100644 index 5ba01a14db..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/share_failed_icon.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_head_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_head_image.png deleted file mode 100644 index a6fba691bb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_head_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_icon_logo.png deleted file mode 100644 index 957c298fd6..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_icon_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_logo.png deleted file mode 100644 index d93e27ece5..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_navi.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_navi.png deleted file mode 100644 index db15c8c987..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_navi.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_normal_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_normal_image.png deleted file mode 100644 index 8cad619232..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_normal_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_top_bg.9.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_top_bg.9.png deleted file mode 100644 index f5010b2c44..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi-1920x1000/tanlu_top_bg.9.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_like.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_like.png deleted file mode 100644 index ce886a2383..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_like.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_like_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_like_bg.png deleted file mode 100644 index f196b6ff8e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_like_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_unlike.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_unlike.png deleted file mode 100644 index 0401ccc256..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_unlike.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_unlike_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_unlike_bg.png deleted file mode 100644 index 33becf307e..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_heart_unlike_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_window_close_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_window_close_normal.png deleted file mode 100644 index e99eeaf974..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_window_close_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_window_close_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_window_close_press.png deleted file mode 100644 index 095574d6e2..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/icon_window_close_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_pause_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_pause_btn_normal.png deleted file mode 100644 index cbd22bb486..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_pause_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_play_btn_normal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_play_btn_normal.png deleted file mode 100644 index bddef2f872..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_video_play_btn_normal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_view_empty_bg.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_view_empty_bg.png deleted file mode 100644 index bde2223192..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/main_view_empty_bg.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_next.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_next.png deleted file mode 100644 index cfb640f6a3..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_next.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_previous.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_previous.png deleted file mode 100644 index fe7bd3486c..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/media_previous.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/module_tanlu_upload_fail.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/module_tanlu_upload_fail.png deleted file mode 100644 index 4511f314bb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/module_tanlu_upload_fail.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/module_tanlu_upload_success.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/module_tanlu_upload_success.png deleted file mode 100644 index 1ad96fc40f..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/module_tanlu_upload_success.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/share_failed_icon.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/share_failed_icon.png deleted file mode 100644 index 5ba01a14db..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/share_failed_icon.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_chat_nomal.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_chat_nomal.png deleted file mode 100644 index ffb73a8dbc..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_chat_nomal.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_chat_press.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_chat_press.png deleted file mode 100644 index db9134bd4d..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_chat_press.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_circle_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_circle_image.png deleted file mode 100644 index 32847b095d..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_circle_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_head_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_head_image.png deleted file mode 100644 index a6fba691bb..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_head_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_icon_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_icon_logo.png deleted file mode 100644 index 957c298fd6..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_icon_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_logo.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_logo.png deleted file mode 100644 index d93e27ece5..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_logo.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_navi.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_navi.png deleted file mode 100644 index db15c8c987..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_navi.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_normal_image.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_normal_image.png deleted file mode 100644 index 01d1f3ebea..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_normal_image.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_top_bg.9.png b/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_top_bg.9.png deleted file mode 100644 index f5010b2c44..0000000000 Binary files a/modules/mogo-module-tanlu/src/main/res/drawable-xhdpi/tanlu_top_bg.9.png and /dev/null differ diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/loading_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/loading_bg.xml deleted file mode 100644 index b6c8ef5b9d..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/loading_bg.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_pause.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_pause.xml deleted file mode 100644 index 5e45e9d00b..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_pause.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_play.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_play.xml deleted file mode 100644 index 84339617e4..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_play.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_upload.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_upload.xml deleted file mode 100644 index 9d5ae2e7bc..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_btn_upload.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_left_page_up.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_left_page_up.xml deleted file mode 100644 index 5448ebf742..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_left_page_up.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_right_page_up.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_right_page_up.xml deleted file mode 100644 index a3879591d8..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_bg_solid_right_page_up.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_btn_close.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_btn_close.xml deleted file mode 100644 index 4c7b91247d..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_btn_close.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/selector_chat_btn.xml b/modules/mogo-module-tanlu/src/main/res/drawable/selector_chat_btn.xml deleted file mode 100644 index 12db1a0776..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/selector_chat_btn.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533.xml deleted file mode 100644 index db9b3f3247..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_6px_bottom.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_6px_bottom.xml deleted file mode 100644 index 1b882ade41..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_6px_bottom.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_9px.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_9px.xml deleted file mode 100644 index 3ac5215724..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_222533_9px.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_99191c25_4px.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_99191c25_4px.xml deleted file mode 100644 index f459707924..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_99191c25_4px.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_upload_222533.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_upload_222533.xml deleted file mode 100644 index e6fcbff414..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_upload_222533.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_upload_press.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_upload_press.xml deleted file mode 100644 index 8a40f60d68..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_bg_upload_press.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg.xml deleted file mode 100644 index 7ef399ca1a..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg_light.xml b/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg_light.xml deleted file mode 100644 index 4eba256888..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/shape_tanlu_top_bg_light.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/small_video_seekbar_style.xml b/modules/mogo-module-tanlu/src/main/res/drawable/small_video_seekbar_style.xml deleted file mode 100644 index c48724bdd8..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/small_video_seekbar_style.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_alert_window_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_alert_window_bg.xml deleted file mode 100644 index 1520ad601e..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_alert_window_bg.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_bg.xml deleted file mode 100644 index 80015e691b..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_bg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_bottom_button_right_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_bottom_button_right_bg.xml deleted file mode 100644 index 21a7a34f19..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_bottom_button_right_bg.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_button_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_button_bg.xml deleted file mode 100644 index 03926e4a3a..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_button_bg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_button_right_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_button_right_bg.xml deleted file mode 100644 index 4ecda55ea4..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_button_right_bg.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_neterror_button_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_neterror_button_bg.xml deleted file mode 100644 index b7d8bed176..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_dialog_neterror_button_bg.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_event_type_red_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_event_type_red_bg.xml deleted file mode 100644 index 29e0357cc9..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_event_type_red_bg.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_gradual_change_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_gradual_change_bg.xml deleted file mode 100644 index c1df67d071..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_gradual_change_bg.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_type_button_blue_bg.xml b/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_type_button_blue_bg.xml deleted file mode 100644 index d2aa0a07c1..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/drawable/tanlu_type_button_blue_bg.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_activity_media_full.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_activity_media_full.xml deleted file mode 100644 index 83821faa8a..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_activity_media_full.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_dialog_cutom_layout.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_dialog_cutom_layout.xml deleted file mode 100644 index 87fcf17536..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_dialog_cutom_layout.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_dialog_neterror_layout.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_dialog_neterror_layout.xml deleted file mode 100644 index 3babec8500..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_dialog_neterror_layout.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_fullscreen_video_view_pager.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_fullscreen_video_view_pager.xml deleted file mode 100644 index 231a9ba631..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_fullscreen_video_view_pager.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler.xml deleted file mode 100644 index 77031d9a53..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler_new.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler_new.xml deleted file mode 100644 index 9457b67313..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_main_media_recycler_new.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover.xml deleted file mode 100644 index eaaf91f104..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover_media.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover_media.xml deleted file mode 100644 index f01258705d..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_item_video_cover_media.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler.xml deleted file mode 100644 index 9e88dff310..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler_new.xml b/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler_new.xml deleted file mode 100644 index 409302fbaf..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/layout/tanlu_main_media_recycler_new.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/values-mdpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-mdpi/dimens.xml deleted file mode 100644 index 2a32aa9897..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values-mdpi/dimens.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - 52px - 52px - 48px - 48px - 72px - 5px - - 56px - 56px - 96px - 96px - 90px - 700px - 10px - - 72px - 25px - 25px - 16px - 48px - 22px - 700px - - - 5px - 15px - 2px - 19px - 136px - 44px - 2px - 109px - 10px - 23px - 30px - 28px - 16px - 22px - 26px - - - 6px - - 400px - 150px - 80px - 32px - - 260px - 44px - - - 18px - 14px - 15px - 13px - 16px - - - 418px - 278px - 69px - 22px - 36px - 18px - 32px - - 20px - 56px - 23px - - 10px - 8px - - - 642px - 186px - 176px - 250px - 158px - 45px - - 13px - 6px - 13px - 17px - 3px - 18px - 26px - 4px - - 28px - 56px - 6px - 16px - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/values-xhdpi-1920x1000/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-xhdpi-1920x1000/dimens.xml deleted file mode 100644 index 969d398b55..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values-xhdpi-1920x1000/dimens.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - 98px - 98px - 48px - 48px - 72px - 5px - - 106px - 106px - 96px - 96px - 100px - 700px - 12px - - 135px - 50px - 50px - 30px - 92px - 40px - 800px - - 11px - 28px - 4px - 32px - 255px - 82px - 2px - 205px - 20px - 40px - 60px - 50px - 32px - 40px - 50px - - - 10px - - 750px - 270px - 120px - 60px - - 488px - 82px - - - 34px - 24px - 28px - 26px - 30px - - - 790px - 524px - 130px - 40px - 66px - 36px - 59px - - 44px - 105px - 44px - - 20px - 16px - - - 1233px - 326px - 306px - 480px - 290px - 80px - - 19px - 12px - 24px - 30px - 9px - 27px - 46px - 4px - - 50px - 90px - 10px - 30px - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml deleted file mode 100644 index 1676116d31..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - 98px - 98px - 48px - 48px - 72px - 5px - - 106px - 106px - 96px - 96px - 100px - 700px - 12px - - 135px - 50px - 50px - 30px - 92px - 40px - 800px - - 11px - 28px - 4px - 32px - 255px - 82px - 2px - 205px - 20px - 40px - 60px - 50px - 32px - 40px - 50px - - - 10px - - 750px - 270px - 120px - 60px - - 488px - 82px - - - 34px - 24px - 28px - 26px - 30px - - - 790px - 524px - 130px - 40px - 66px - 36px - 59px - - 44px - 105px - 44px - - 20px - 16px - - - 1060px - 330px - 306px - 421px - 290px - 80px - - 19px - 13px - 24px - 15px - 9px - 27px - 46px - 4px - - 50px - 98px - 10px - 30px - - - - diff --git a/modules/mogo-module-tanlu/src/main/res/values/colors.xml b/modules/mogo-module-tanlu/src/main/res/values/colors.xml deleted file mode 100644 index e3dc6f20f6..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values/colors.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - #000000 - #000000 - #1F7FFF - #FFFFFF - #80FFFFFF - #1E212C - #1F7FFF - #171F7FFF - #4d191C25 - #99191C25 - #222533 - #303447 - #323131 - #4B5369 - #9A9A9A - #A2A2A2 - #5a979797 - #80FFFFFF - #00FFFFFF - #b3000000 - #0DFFFFFF - #000000 - #69718B - #213142 - #33FFFFFF - #B3000000 - #0091FF - #d9000000 - #FF1B1B - - #F8F8F8 - #333333 - #DADAE2 - #545362 - #99191C25 - #99666666 - #999999 - #99FFFFFF - #99FFFFFF - #59FFFFFF - #FFFFFF - - #FFFFFF - #3F4057 - #2A2B38 - #FFFFFF - #FFFFFF - #3E7FFC - #5CC1FF - #50526E - #5E6079 - #3F4057 - #555A75 - #F5F5F5 - - diff --git a/modules/mogo-module-tanlu/src/main/res/values/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values/dimens.xml deleted file mode 100644 index 955ea90977..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values/dimens.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - 52px - 52px - 48px - 48px - 72px - 5px - - 56px - 56px - 96px - 96px - 90px - 700px - 10px - - 72px - 25px - 25px - 16px - 48px - 22px - 700px - - - 5px - 15px - 2px - 19px - 136px - 44px - 2px - 109px - 10px - 23px - 30px - 28px - 16px - 22px - 26px - - - 6px - - 400px - 150px - 80px - 32px - - 260px - 44px - - - 18px - 14px - 15px - 13px - 16px - - - 418px - 278px - 69px - 22px - 36px - 18px - 32px - - 20px - 56px - 23px - - 10px - 8px - - - 642px - 186px - 176px - 250px - 158px - 45px - - 13px - 8px - 7px - 17px - 3px - 18px - 26px - 4px - - 28px - 56px - 6px - 16px - - \ No newline at end of file diff --git a/modules/mogo-module-tanlu/src/main/res/values/strings.xml b/modules/mogo-module-tanlu/src/main/res/values/strings.xml deleted file mode 100644 index 53a1d5d6c0..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values/strings.xml +++ /dev/null @@ -1,40 +0,0 @@ - - tanlu - 返回 - 取消授权 - 《探路共享计划》 - 已同意 - 探路共享计划 >> - 探路APP用户服务协议 - 未找到其他用户分享的拥堵信息,
您可以试试分享拥堵]]>
- 未找到其他用户分享的路况 - 未知区域 - 上报路况 - 正在更新情报数据 - 欢迎使用探路,您可以在探路内查看到周边的实时路况,也可以通过关键词“上报路况”来分享一段视频给其他车主 - 您还可以试试语音上报 - 为您找到%s条路况信息 - 开启小智车联 - 共享计划 - 上一条 - 下一条 - 已分享成功,你分享的内容将帮助%s位车友 - 上传失败 - 将为您播放 - 上报路况 - 为你查询到导航路线沿途的路况信息,可以对我说上一条、下一条来查看 - - 取消(%s) - 好的(%s) - - - 正在为您搜索路况 - 系统正在为您搜索 - 小智这就去查 - - - 找不到相关地址,试试换个说法 - 找不到地址,换个地址试试 - - -
diff --git a/modules/mogo-module-tanlu/src/main/res/values/styles.xml b/modules/mogo-module-tanlu/src/main/res/values/styles.xml deleted file mode 100644 index 1a0cf70536..0000000000 --- a/modules/mogo-module-tanlu/src/main/res/values/styles.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java index 0ebdcbbbd5..8fcdfb76f9 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java @@ -261,6 +261,7 @@ public class V2XRoadVideoWindow extends RelativeLayout implements @Override public void close() { + simpleCoverVideoPlayer.onVideoPause(); //移除窗体 V2XServiceManager .getMogoTopViewManager() diff --git a/modules/mogo-module-v2x/src/main/res/drawable-ldpi/v2x_video_close.png b/modules/mogo-module-v2x/src/main/res/drawable-ldpi/v2x_video_close.png new file mode 100644 index 0000000000..b5a4ad9594 Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-ldpi/v2x_video_close.png differ diff --git a/modules/mogo-module-v2x/src/main/res/drawable-mdpi/v2x_video_close.png b/modules/mogo-module-v2x/src/main/res/drawable-mdpi/v2x_video_close.png new file mode 100644 index 0000000000..b5a4ad9594 Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-mdpi/v2x_video_close.png differ diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_video_close.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_video_close.png new file mode 100644 index 0000000000..e632d54200 Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v2x_video_close.png differ diff --git a/settings.gradle b/settings.gradle index 849a39e744..a7eab4a54c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -57,7 +57,6 @@ include ':modules:mogo-module-push-noop' include ':modules:mogo-module-guide' -//include ':modules:mogo-module-tanlu' include ':libraries:tanlulib' include ':skin' include ':test' diff --git a/skin/mogo-skin-light/src/main/module-v2x-res/drawable-ldpi/v2x_video_close_light.png b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-ldpi/v2x_video_close_light.png new file mode 100644 index 0000000000..bde2310029 Binary files /dev/null and b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-ldpi/v2x_video_close_light.png differ diff --git a/skin/mogo-skin-light/src/main/module-v2x-res/drawable-mdpi/v2x_video_close_light.png b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-mdpi/v2x_video_close_light.png new file mode 100644 index 0000000000..bde2310029 Binary files /dev/null and b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-mdpi/v2x_video_close_light.png differ diff --git a/skin/mogo-skin-light/src/main/module-v2x-res/drawable-xhdpi/v2x_video_close_light.png b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-xhdpi/v2x_video_close_light.png new file mode 100644 index 0000000000..7b6a0f3b0a Binary files /dev/null and b/skin/mogo-skin-light/src/main/module-v2x-res/drawable-xhdpi/v2x_video_close_light.png differ