diff --git a/core/function-impl/mogo-core-function-main/build.gradle b/core/function-impl/mogo-core-function-main/build.gradle index ef409600d8..cba5c2b168 100644 --- a/core/function-impl/mogo-core-function-main/build.gradle +++ b/core/function-impl/mogo-core-function-main/build.gradle @@ -70,7 +70,6 @@ dependencies { api rootProject.ext.dependencies.mogoservice api rootProject.ext.dependencies.moduleshare api rootProject.ext.dependencies.moduleextensions - api rootProject.ext.dependencies.modulemap api rootProject.ext.dependencies.moduleADAS api rootProject.ext.dependencies.callchat api rootProject.ext.dependencies.callchatprovider @@ -100,7 +99,6 @@ dependencies { api project(':modules:mogo-module-service') api project(':modules:mogo-module-share') api project(':modules:mogo-module-extensions') - api project(':modules:mogo-module-map') api project(':modules:mogo-module-adas') api project(':modules:mogo-module-carchatting') api project(':modules:mogo-module-carchattingprovider') diff --git a/core/function-impl/mogo-core-function-map/build.gradle b/core/function-impl/mogo-core-function-map/build.gradle index ab14ac4055..cc7eeed20f 100644 --- a/core/function-impl/mogo-core-function-map/build.gradle +++ b/core/function-impl/mogo-core-function-map/build.gradle @@ -60,6 +60,9 @@ dependencies { implementation rootProject.ext.dependencies.mogo_core_utils implementation rootProject.ext.dependencies.mogo_core_function_api implementation rootProject.ext.dependencies.mogo_core_function_call + + implementation rootProject.ext.dependencies.mogomap + implementation rootProject.ext.dependencies.mogomapapi } else { implementation project(':modules:mogo-module-common') implementation project(':services:mogo-service-api') @@ -68,6 +71,9 @@ dependencies { implementation project(':core:mogo-core-utils') implementation project(':core:mogo-core-function-api') implementation project(':core:mogo-core-function-call') + + implementation project(":libraries:mogo-map") + implementation project(":libraries:mogo-map-api") } } diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java similarity index 99% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFragment.java rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java index dd0b294154..451ad1fae9 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFragment.java @@ -1,4 +1,4 @@ -package com.mogo.module.map; +package com.mogo.eagle.core.function.map; import android.content.Context; import android.os.Bundle; diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFrameController.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFrameController.java similarity index 96% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFrameController.java rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFrameController.java index c48ddf8126..9218ddbf0c 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapFrameController.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapFrameController.java @@ -1,4 +1,4 @@ -package com.mogo.module.map; +package com.mogo.eagle.core.function.map; import android.content.Context; diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPresenter.java similarity index 87% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPresenter.java index f5c04ac454..86223a257a 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapPresenter.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapPresenter.java @@ -1,4 +1,4 @@ -package com.mogo.module.map; +package com.mogo.eagle.core.function.map; import com.mogo.commons.mvp.Presenter; diff --git a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapView.java similarity index 88% rename from modules/mogo-module-map/src/main/java/com/mogo/module/map/MapView.java rename to core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapView.java index 8bb8ae2a88..ac3adb7d4c 100644 --- a/modules/mogo-module-map/src/main/java/com/mogo/module/map/MapView.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/MapView.java @@ -1,4 +1,4 @@ -package com.mogo.module.map; +package com.mogo.eagle.core.function.map; import com.mogo.commons.mvp.IView; import com.mogo.map.uicontroller.IMogoMapUIController; diff --git a/modules/mogo-module-map/src/main/res/layout/module_map_fragment_map.xml b/core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml similarity index 100% rename from modules/mogo-module-map/src/main/res/layout/module_map_fragment_map.xml rename to core/function-impl/mogo-core-function-map/src/main/res/layout/module_map_fragment_map.xml diff --git a/modules/mogo-module-map/src/main/res/values-xhdpi/dimens.xml b/core/function-impl/mogo-core-function-map/src/main/res/values-xhdpi/dimens.xml similarity index 100% rename from modules/mogo-module-map/src/main/res/values-xhdpi/dimens.xml rename to core/function-impl/mogo-core-function-map/src/main/res/values-xhdpi/dimens.xml diff --git a/modules/mogo-module-map/src/main/res/values/dimens.xml b/core/function-impl/mogo-core-function-map/src/main/res/values/dimens.xml similarity index 100% rename from modules/mogo-module-map/src/main/res/values/dimens.xml rename to core/function-impl/mogo-core-function-map/src/main/res/values/dimens.xml diff --git a/core/function-impl/mogo-core-function-map/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-map/src/main/res/values/strings.xml new file mode 100644 index 0000000000..d32a85d33b --- /dev/null +++ b/core/function-impl/mogo-core-function-map/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + mogo-core-function-map + diff --git a/modules.txt b/modules.txt index 3db87cb8bf..f3f450451e 100644 --- a/modules.txt +++ b/modules.txt @@ -30,7 +30,6 @@ :modules:mogo-module-service :core:function-impl:mogo-core-function-check :services:mogo-service -:modules:mogo-module-map :core:function-impl:mogo-core-function-smp :modules:mogo-module-share :modules:mogo-module-extensions diff --git a/modules/mogo-module-map/.gitignore b/modules/mogo-module-map/.gitignore deleted file mode 100644 index 796b96d1c4..0000000000 --- a/modules/mogo-module-map/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/modules/mogo-module-map/README.md b/modules/mogo-module-map/README.md deleted file mode 100644 index 88a8df2b69..0000000000 --- a/modules/mogo-module-map/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# 地图模块 - -## 地图 Fragment - -## 地图状态和小智交互部分 - -## 语音控制地图 - diff --git a/modules/mogo-module-map/build.gradle b/modules/mogo-module-map/build.gradle deleted file mode 100644 index fa9fcd2bcf..0000000000 --- a/modules/mogo-module-map/build.gradle +++ /dev/null @@ -1,76 +0,0 @@ -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'kotlin-android-extensions' - id 'kotlin-kapt' - id '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" - - //ARouter apt 参数 - kapt { - useBuildCache = false - arguments { - arg("AROUTER_MODULE_NAME", project.getName()) - } - } - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - targetCompatibility 1.8 - sourceCompatibility 1.8 - } - -} -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - - implementation rootProject.ext.dependencies.androidxappcompat - implementation rootProject.ext.dependencies.androidxconstraintlayout - - implementation rootProject.ext.dependencies.arouter - kapt rootProject.ext.dependencies.aroutercompiler - - if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { - api rootProject.ext.dependencies.mogomap - api rootProject.ext.dependencies.mogomapapi - api rootProject.ext.dependencies.mogo_core_utils - api rootProject.ext.dependencies.mogocommons - api rootProject.ext.dependencies.mogoserviceapi - implementation rootProject.ext.dependencies.modulecommon - - implementation rootProject.ext.dependencies.mogo_core_utils - implementation rootProject.ext.dependencies.mogo_core_data - } else { - api project(":libraries:mogo-map") - api project(":libraries:mogo-map-api") - api project(':core:mogo-core-utils') - api project(":foudations:mogo-commons") - api project(':services:mogo-service-api') - implementation project(':modules:mogo-module-common') - - implementation project(':core:mogo-core-utils') - implementation project(':core:mogo-core-data') - } -} - -apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() diff --git a/modules/mogo-module-map/consumer-rules.pro b/modules/mogo-module-map/consumer-rules.pro deleted file mode 100644 index 82082f24eb..0000000000 --- a/modules/mogo-module-map/consumer-rules.pro +++ /dev/null @@ -1 +0,0 @@ -#-----ModuleMap----- diff --git a/modules/mogo-module-map/gradle.properties b/modules/mogo-module-map/gradle.properties deleted file mode 100644 index 6ba02c63b7..0000000000 --- a/modules/mogo-module-map/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -GROUP=com.mogo.module -POM_ARTIFACT_ID=module-map -VERSION_CODE=1 diff --git a/modules/mogo-module-map/proguard-rules.pro b/modules/mogo-module-map/proguard-rules.pro deleted file mode 100644 index 707fa663b8..0000000000 --- a/modules/mogo-module-map/proguard-rules.pro +++ /dev/null @@ -1,24 +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 - -#-----ModuleMap----- --keep class com.mogo.module.map.NavConstants diff --git a/modules/mogo-module-map/src/main/AndroidManifest.xml b/modules/mogo-module-map/src/main/AndroidManifest.xml deleted file mode 100644 index c14b468c9b..0000000000 --- a/modules/mogo-module-map/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/modules/mogo-module-map/src/main/res/values/strings.xml b/modules/mogo-module-map/src/main/res/values/strings.xml deleted file mode 100644 index fab4c86972..0000000000 --- a/modules/mogo-module-map/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - mogo-module-map - diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/dispatch/bean/StartLatLon.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/dispatch/bean/StartLatLon.java deleted file mode 100644 index 8aac7f52be..0000000000 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/dispatch/bean/StartLatLon.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.mogo.module.service.dispatch.bean; - -public class StartLatLon { - - private double lat; - private double lon; - - public StartLatLon(double lat, double lon) { - this.lat = lat; - this.lon = lon; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - @Override - public String toString() { - return "StartLatLon{" + - "lat=" + lat + - ", lon=" + lon + - '}'; - } -} diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/CarCorderController.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/CarCorderController.kt index 855704a95c..effe9ec59a 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/CarCorderController.kt +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/CarCorderController.kt @@ -48,12 +48,6 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback { private var mCityCode: String = "" - private var getVideoFailed: (() -> Unit)? = null - - fun getVideoFailed(getVideoFailed: (() -> Unit)) { - this.getVideoFailed = getVideoFailed - } - fun initCarCorderController() { try { zdCarCoderController = @@ -140,17 +134,6 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback { } else { //比亚迪 Logger.d(TANLU, "takeVideo ------ isnet = " + NetworkUtils.isConnected(AbsMogoApplication.getApp().applicationContext)) getInfo("", mAddress, mLongitude, mLatitude, mType, mDirection, mAreaCode, mCityCode, 1, mFromType, CarCorderController.mainInfoId)?.let { uploadRoadInfo(it) } - - //地图上打点 - taskAsync(3_000) { - try { -// LatLngStickyEventBus.getInstance() -// .postSticky(GetImageSuccessEvent("", mType)) - } catch (e: java.lang.Exception) { - e.printStackTrace() - } - } -// } } } @@ -166,9 +149,7 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback { //获取图片失败也上报,图片不打点 if (isCustom) { getInfo("", mAddress, mLongitude, mLatitude, mType, mDirection, mAreaCode, mCityCode, 0, mFromType, mainInfoId)?.let { uploadRoadInfo(it) } - } - } //拍照成功回调返回图片本地路径 diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/MainService.kt b/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/MainService.kt index ba1fa705d4..36b4cd674f 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/MainService.kt +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/service/MainService.kt @@ -12,15 +12,13 @@ import com.alibaba.android.arouter.launcher.ARouter import com.elegant.analytics.Analytics import com.mogo.commons.AbsMogoApplication import com.mogo.commons.debug.DebugConfig -import com.mogo.module.common.MogoApisHandler -import com.mogo.service.IMogoServiceApis import com.mogo.eagle.core.data.constants.MogoServicePaths import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr +import com.mogo.module.common.MogoApisHandler +import com.mogo.module.share.BuildConfig import com.mogo.module.share.bean.event.GetImageSuccessEvent import com.mogo.module.share.bean.event.LatLngStickyEventBus -import com.zhidao.cosupload.manager.CosUploadManagerImpl -import com.mogo.module.share.BuildConfig import com.mogo.module.share.constant.* import com.mogo.module.share.constant.ShareConstants.TANLU import com.mogo.module.share.utils.* @@ -28,6 +26,8 @@ import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.clearStrateg import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.getStrategyFrequency import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.getStrategyInterval import com.mogo.module.share.utils.StrategyPreferenceUtil.Companion.getStrategyType +import com.mogo.service.IMogoServiceApis +import com.zhidao.cosupload.manager.CosUploadManagerImpl import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers import org.greenrobot.eventbus.Subscribe @@ -56,6 +56,7 @@ class MainService : Service() { //是否已经获取过策略 var isGetStrategies: Boolean = false + //1是一次性,2是周期性 private var picType: Int = 0 private var videoType: Int = 0 @@ -167,7 +168,6 @@ class MainService : Service() { CarCorderController.initCarCorderController() mainServiceHttpModel = MainServiceController() registReceiver() -// CosCallbackMapController.init(this) } /** @@ -252,14 +252,12 @@ class MainService : Service() { private fun takePhoto(isInterval: Boolean = false, isCustom: Boolean = false) { Logger.d(TANLU, "takePhoto -----1----->") //判断是否授权 -// if (isAuthorization(BaseApplication.getAppContext())) { //目前不支持连拍,只能定时2秒拍一张 第一期每次只拍一张 Observable.intervalRange(0, 1, 0, 2_000, TimeUnit.MILLISECONDS) .observeOn(AndroidSchedulers.mainThread()) .subscribe { CarCorderController.takePhoto(1, 1, false, isCustom, TANLU_ROAD_CURRENT, mainInfoId, fromType, mLongitude, mLatitude, speed, mAddress, mDirection, mAreaCode, mCityCode) } -// } postPhotoAlarmTask(isInterval) @@ -274,9 +272,7 @@ class MainService : Service() { id: Long = 0 ) { Logger.d(TANLU, "takeVideo --------1----> fromType = $fromType --isCustom = $isCustom") -// if (isAuthorization(BaseApplication.getAppContext())) { CarCorderController.takeVideo(1, duration, isCustom, id, shareType, mainInfoId, fromType, mLongitude, mLatitude, speed, mAddress, mDirection, mAreaCode, mCityCode) -// } postVideoAlarmTask(isInterval) this@MainService.isCustom = isCustom @@ -304,8 +300,7 @@ class MainService : Service() { AbsMogoApplication.getApp().applicationContext, "pic", getStrategyType("pic") - ) - , pendingIntent + ), pendingIntent ) } } @@ -336,8 +331,7 @@ class MainService : Service() { AbsMogoApplication.getApp().applicationContext, "video", getStrategyType("video") - ) - , videoPendingIntent + ), videoPendingIntent ) } } @@ -345,9 +339,7 @@ class MainService : Service() { override fun onDestroy() { super.onDestroy() unregisterReceiver(mAlarmBroadCast) -// unregisterReceiver(mCustomSendBroadCast) CarCorderController.release() -// CosCallbackMapController.release() LatLngStickyEventBus.getInstance().unregister(this) LatLngStickyEventBus.getInstance().removeAllStickyEvents() trackNormalEvent(CarNet_MainService_Destory, null) diff --git a/settings.gradle b/settings.gradle index 3ac3268450..5a3fac5c2b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -57,7 +57,6 @@ include ':libraries:mogo-map' // OLD业务模块 include ':modules:mogo-module-adas' -include ':modules:mogo-module-map' include ':modules:mogo-module-common' include ':modules:mogo-module-main' include ':modules:mogo-module-share'