Merge branch 'dev' into dev_custom_map

This commit is contained in:
wangcongtao
2020-08-24 14:09:20 +08:00
334 changed files with 1417 additions and 3575 deletions

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="SuppressionsComponent">

View File

@@ -116,13 +116,27 @@ android {
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
}
// f系列-分体机
f80x {
applicationId rootProject.ext.android.fLauncherApplicationId
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
}
// e系列采用Launcher方案
e8xx {
applicationId rootProject.ext.android.launcherApplicationId
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
@@ -136,7 +150,7 @@ android {
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true'
@@ -150,7 +164,7 @@ android {
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'false'
@@ -164,7 +178,7 @@ android {
dimension "product"
// 使用思必驰语音
buildConfigField 'int', 'AIType', '2'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'false'
@@ -178,7 +192,21 @@ android {
dimension "product"
// 使用同行者语音
buildConfigField 'int', 'AIType', '1'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'false'
manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.commonIndependentAmapApiValue]
// 是否使用高德sdk自定义导航
buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false'
}
// d系列 2 + 32
d80x {
applicationId rootProject.ext.android.independentApplicationId
dimension "product"
// 使用同行者语音
buildConfigField 'int', 'AIType', '1'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'false'
@@ -192,7 +220,7 @@ android {
dimension "product"
// 使用同行者语音
buildConfigField 'int', 'AIType', '1'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'true'
buildConfigField 'boolean', 'AI_ASSIST_ACTIVE_STAUTS', 'false'
// 车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '0'
buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'false'
@@ -257,8 +285,6 @@ dependencies {
implementation rootProject.ext.dependencies.mogologlib
if (Boolean.valueOf(RELEASE)) {
launcherImplementation rootProject.ext.dependencies.modulemainlauncher
independentImplementation rootProject.ext.dependencies.modulemainindependent
implementation rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.modulecommon
implementation rootProject.ext.dependencies.modulesearch
@@ -276,8 +302,6 @@ dependencies {
implementation rootProject.ext.dependencies.mogomodulewidgets
implementation rootProject.ext.dependencies.mogomoduleback
} else {
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
independentImplementation project(':main-extensions:mogo-module-main-independent')
implementation project(':foudations:mogo-commons')
implementation project(':modules:mogo-module-common')
implementation project(':modules:mogo-module-search')
@@ -295,6 +319,7 @@ dependencies {
implementation project(':modules:mogo-module-back')
}
apply from: "./functions/perform.gradle"
apply from: "./functions/baseservices.gradle"
apply from: "./functions/socketpush.gradle"
apply from: "./functions/gpssimulator.gradle"

View File

@@ -0,0 +1,11 @@
// 表现:独立 app 和 launcher
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
launcherImplementation rootProject.ext.dependencies.modulemainlauncher
independentImplementation rootProject.ext.dependencies.modulemainindependent
} else {
launcherImplementation project(':main-extensions:mogo-module-main-launcher')
independentImplementation project(':main-extensions:mogo-module-main-independent')
}
}

View File

@@ -2,8 +2,8 @@
afterEvaluate {
def independent = ["em3", "em1", "d8xx", "d82x", "bydauto"]
def launcher = ["f8xx", "em4"]
def independent = ["em3", "em1", "d80x", "d82x", "bydauto"]
def launcher = ["f80x", "em4"]
it.getTasks().iterator().forEachRemaining {
def task = it

View File

@@ -12,6 +12,7 @@
android:label="@string/app_shell_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.App"
android:resizeableActivity="false"
tools:replace="android:label">
<meta-data
android:name="com.amap.api.v2.apikey"
@@ -28,6 +29,8 @@
<activity
android:name="com.zhidao.boot.persistent.lib.PersistentAliveActivity"
android:screenOrientation="landscape"
android:resizeableActivity="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
</application>

View File

@@ -75,6 +75,8 @@ public class MogoApplication extends AbsMogoApplication {
MogoModulePaths.addBaseModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) );
MogoModulePaths.addBaseModule( new MogoModule( V2XConst.PATH_V2X_UI, V2XConst.MODULE_NAME ) );
MogoModulePaths.addBaseModule(new MogoModule( MogoServicePaths.PATH_STRATEGY_SHARE,"StrategyShare"));
MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_MOGO_MONITOR, "MogoMonitor"));
MogoModulePaths.addModule( new MogoModule( V2XConst.PATH_EVENT_PANEL, V2XConst.MODULE_NAME_EVENT_PANEL ) );
MogoModulePaths.addModule( new MogoModule( PushUIConstants.PATH, PushUIConstants.NAME ) );

View File

@@ -3,7 +3,6 @@ apply from: "config.gradle"
apply from: "javadoc.gradle"
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
@@ -19,7 +18,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71'
classpath "com.alibaba:arouter-register:1.0.2"
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
// NOTE: Do not place your application dependencies here; they belong

View File

@@ -1,6 +1,6 @@
ext {
time = ""
kotlin_version = "1.3.71"
android = [
// applicationId : "com.mogo.launcher",
// zhidadoApplicationId: "com.zhidao.launcher",
@@ -20,8 +20,8 @@ ext {
dependencies = [
// androidx
androidxappcompat : "androidx.appcompat:appcompat:1.0.2",
androidxccorektx : "androidx.core:core-ktx:1.2.0",
androidxappcompat : "androidx.appcompat:appcompat:1.1.0",
androidxccorektx : "androidx.core:core-ktx:1.3.0",
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:1.1.3",
boostmultidex : "com.bytedance.boost_multidex:boost_multidex:1.0.1",
androidxviewpager2 : "androidx.viewpager2:viewpager2:1.0.0",
@@ -142,7 +142,7 @@ ext {
accountsdk : "com.zhidao.accountservice:account-sdk:1.0.11",
// crash
crashSdk : "com.zhidaoauto.crash.log:library:1.0.5",
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7",
kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}",
//探路
videoarmv7 : "com.shuyu:gsyVideoPlayer-armv7a:7.1.2",
@@ -197,6 +197,8 @@ ext {
androidxroomktx : "androidx.room:room-ktx:2.2.3",
//
mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}",
mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}",
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
]
}

View File

@@ -202,7 +202,7 @@ public class DebugConfig {
/**
* 是否支持临时激活小智
*/
private static boolean sActiveAIAssistFlag = true;
private static boolean sActiveAIAssistFlag = false;
public static boolean isActiveAIAssistFlag() {
return sActiveAIAssistFlag;

View File

@@ -3,6 +3,8 @@ package com.zhidao.mogo.tanlu.api;
import android.content.Context;
import android.util.ArrayMap;
import androidx.annotation.NonNull;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.analytics.AnalyticsUtils;
@@ -42,9 +44,10 @@ public class MogoTanluApiProvider implements IMogoTanluProvider {
properties.put("from", params.getFromType());
AnalyticsUtils.track("v2x_share_type", properties);
MainService.Companion.launchService(context, new UploadParams(params.getEventType(),
params.getFromType(), params.getDuration()));
params.getFromType(), params.getDuration(), params.getParentId(),
params.getLocation().lat, params.getLocation().lon));
}else{
throw new IllegalArgumentException("TanluUploadParams 不允许为空");
Logger.e(MODULE_NAME,"params为空无法上报情报");
}
}

View File

@@ -39,13 +39,10 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.3.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.zhidaoauto.common:service:1.0.4.10'
implementation rootProject.ext.dependencies.kotlinstdlibjdk7
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxccorektx
implementation rootProject.ext.dependencies.aiassist
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0'
implementation 'com.zhidaoauto.controller:api:1.0.8'
@@ -53,6 +50,7 @@ dependencies {
implementation 'com.zhidao.video:video-processor:1.0.2.1'
implementation 'com.foundation.utils:common-utils:1.0.7'
implementation rootProject.ext.dependencies.eventbus
compileOnly rootProject.ext.dependencies.mogocommons
implementation rootProject.ext.dependencies.eventbus
implementation rootProject.ext.dependencies.coroutinescore

View File

@@ -34,6 +34,8 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
var mType: String = "" //1 上报拥堵, 2 封路和查车
var mainInfoId: Long = 0
var mFromType: String = ""
private var mLongitude: Double = 0.0
private var mLatitude: Double = 0.0
private var getVideoFailed: (() -> Unit)? = null
private var interceptors: ArrayList<TakePhotoInterceptor> = ArrayList(1)
@@ -69,12 +71,16 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
isCustom: Boolean = false,
type: String,
mainInfoId: Long,
fromType: String
fromType: String,
longitude: Double,
latitude: Double
) {
Log.d(TAG, "takePhoto ---------- type = $type --- mType = $mType ---fromType = $fromType")
this.mType = type
this.mainInfoId = mainInfoId
this.mFromType = fromType
this.mLongitude = longitude
this.mLatitude = latitude
CustomStatusHandler.offerPhotoStatus(isCustom)
zdCarCoderController.takePhoto(photoType, cameraId, haveVoice)
trackGetPhoto(1)
@@ -91,13 +97,16 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
id: Long = 0L,
type: String,
mainInfoId: Long,
fromType: String
fromType: String,
longitude: Double,
latitude: Double
) {
Log.d(TAG, "takeVideo -------- type = $type")
Log.d(TAG, "takeVideo -------- isCustom = $isCustom ---mFromType = $mFromType")
Log.d(TAG, "takeVideo -------- isCustom = $isCustom ---mFromType = $mFromType ---type = $type" )
this.mType = type
this.mainInfoId = mainInfoId
this.mFromType = fromType
this.mLongitude = longitude
this.mLatitude = latitude
if (DebugConfig.getCarMachineType() == 0) { //自研车机
outputVideoPath = getCompressVideoPath()
CustomStatusHandler.offerVideoStatus(TakeEntity(isCustom, id))
@@ -118,7 +127,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
videoAndThumbMap,
mType,
entity,
mainInfoId
mainInfoId,
mLongitude,
mLatitude
)
//地图上打点
@@ -177,7 +188,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
mutableMapOf("pic" to "" as String),
mType,
entity,
mainInfoId
mainInfoId,
mLongitude,
mLatitude
);
}
}
@@ -219,7 +232,8 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
if (!TextUtils.isEmpty(mType)) {
Log.d(TAG, "onTakePhotoSuccess mType != null")
CosStatusController().uploadFile(mutableListOf(photoPath as String), entity, mType, mainInfoId, mFromType)
CosStatusController().uploadFile(mutableListOf(photoPath as String), entity, mType, mainInfoId, mFromType, mLongitude,
mLatitude)
} else {
Log.d(TAG, "onTakePhotoSuccess mType == null")
Log.d(
@@ -234,7 +248,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
entity,
mType,
mainInfoId,
mFromType
mFromType,
mLongitude,
mLatitude
)
}
}
@@ -247,7 +263,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
entity,
mType,
mainInfoId,
mFromType
mFromType,
mLongitude,
mLatitude
)
}
}
@@ -336,7 +354,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
videoAndThumbMap,
mType,
entity,
mainInfoId
mainInfoId,
mLongitude,
mLatitude
)
//地图上打点
@@ -375,7 +395,9 @@ object CarCorderController : TakePhotoCallback, TakeVideoCallback {
entity,
mType,
mainInfoId,
mFromType
mFromType,
mLongitude,
mLatitude
)
//删除压缩前的视频
deletePicFile(videoPath)

View File

@@ -38,16 +38,21 @@ class CosStatusController : CosStatusCallback {
private var mType: String = ""
private var mainInfoId: Long = 0
private var mFromType: String = ""
private var mLongitude: Double = 0.0
private var mLatitude: Double = 0.0
//上传文件
fun uploadFile(picPath: MutableList<String>, entity: TakeEntity, type: String, mainInfoId: Long, fromType: String) {
fun uploadFile(picPath: MutableList<String>, entity: TakeEntity, type: String, mainInfoId: Long,
fromType: String, longitude: Double, latitude: Double) {
CosCallbackMapController.registerCallback(picPath, this)
// CosLogger.setLogStatus(true)
this.entity = entity
this.mType = type
this.mainInfoId = mainInfoId
this.mFromType = fromType;
this.mFromType = fromType
this.mLongitude = longitude
this.mLatitude = latitude
Log.d(TAG, "uploadFile type===$type ---- mainInfoId =$mainInfoId ----mFromType = $mFromType ---- picPath = $picPath ")
trackUploadCos(3)
if (picPath.contains("backPic")) return
@@ -161,7 +166,9 @@ class CosStatusController : CosStatusCallback {
mutableMapOf("pic" to downloadUrl as String),
mType,
entity,
mainInfoId
mainInfoId,
mLongitude,
mLatitude
)
// }
}
@@ -177,7 +184,7 @@ class CosStatusController : CosStatusCallback {
// CosCallbackMapController.mainService?.sendCustomResult(it)
// }
// } else {
sendInformationDirectly(type, map, mType, entity, mainInfoId)
sendInformationDirectly(type, map, mType, entity, mainInfoId, mLongitude, mLatitude)
// }
}
@@ -189,7 +196,9 @@ class CosStatusController : CosStatusCallback {
map: Map<String, String>,
poiType: String,
entity: TakeEntity,
mainInfoId: Long
mainInfoId: Long,
longitude: Double,
latitude: Double
) {
Log.d(TAG, "sendInformationDirectly isCustomSend = ${entity?.isCustom}")
Log.d(TAG, "sendInformationDirectly poiType= $poiType ---- mainInfoId= $mainInfoId")
@@ -198,7 +207,9 @@ class CosStatusController : CosStatusCallback {
url = map,
isCustom = entity?.isCustom,
poiType = poiType,
mainInfoId = mainInfoId
mainInfoId = mainInfoId,
longitude = longitude,
latitude = latitude
) { success ->
CosCallbackMapController.unregisterCallbacks(map)
CosCallbackMapController.mainService?.let {

View File

@@ -62,6 +62,8 @@ class MainService : Service() {
var params: UploadParams? = null
var mainInfoId: Long = 0
private var mLongitude: Double = 0.0
private var mLatitude: Double = 0.0
//发送主动上报结果广播给外部
fun sendCustomResult(result: Boolean) {
@@ -87,14 +89,16 @@ class MainService : Service() {
params?.let {
shareType = it.eventType
fromType = it.fromType
mainInfoId = 0 //TODO
Log.d(TAG, "onStartCommand shareType = $shareType")
mainInfoId = it.parentId
mLongitude = it.lon
mLatitude = it.lat
Log.d(TAG, "onStartCommand shareType = $shareType --fromType = $fromType --mainInfoId = $mainInfoId -- mLongitude = $mLongitude --mLatitude = $mLatitude --it.duration = ${it.duration} ")
if (shareType == TANLU_ROAD_CONGESTION || shareType == TANLU_TRAFFIC_CHECK || shareType == TANLU_ROAD_CLOSURE || shareType == TANLU_ROAD_CURRENT
|| shareType == TANLU_ROAD_PONDING || shareType == TANLU_ROAD_ICING || shareType == TANLU_ROAD_HEAVY_FOG
|| shareType == TANLU_ROAD_ACCIDENT || shareType == TANLU_ROAD_WORK
) {
// takePhoto(1, false, true)
if (!fromType.equals(UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO)) { // 是策略触发,不提示
if (fromType != UPLOAD_FROM_STRATEGY_ACCIDENT_AUTO) { // 是策略触发,不提示
takeVideo(it.duration, isCustom = true, id = id)
} else {
takeVideo(it.duration)
@@ -131,7 +135,7 @@ class MainService : Service() {
override fun onReceive(p0: Context?, p1: Intent) {
val id = p1.getLongExtra("id", 0L)
if (p1.action == sendInformationAction) {
takeVideo(10, isCustom = true, id = id)
takeVideo(DEFAULT_VIDEO_DURATION, isCustom = true, id = id)
}
}
}
@@ -181,7 +185,7 @@ class MainService : Service() {
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true, priority = 98)
fun getImageEvent(getImageSuccessEvent: GetImageSuccessEvent) {
var info = LocationUtil.getInstance().getLocationInfo()
Log.e("MainService", "getImageEvent long = ${info.longitude} ----> lat= ${info.latitude}")
Log.d("MainService", "getImageEvent long = ${info.longitude} ----> lat= ${info.latitude}")
Log.d(
"MainService",
"getImageEvent url = " + getImageSuccessEvent.getImageUrl() + ">>>>type =" + getImageSuccessEvent.getType()
@@ -250,7 +254,7 @@ class MainService : Service() {
}
if (videoType == 1) {
takeVideo(10)
takeVideo(DEFAULT_VIDEO_DURATION)
} else if (videoType == 2) {
postVideoAlarmTask(true)
}
@@ -278,7 +282,7 @@ class MainService : Service() {
Observable.intervalRange(0, 1, 0, 2_000, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
CarCorderController.takePhoto(1, 1, false, isCustom, TANLU_ROAD_CURRENT, mainInfoId, fromType)
CarCorderController.takePhoto(1, 1, false, isCustom, TANLU_ROAD_CURRENT, mainInfoId, fromType, mLongitude, mLatitude)
})
// }
@@ -297,7 +301,7 @@ class MainService : Service() {
Log.d("MainService", "takeVideo --------1---->")
// if (isAuthorization(BaseApplication.getAppContext())) {
// log(TAG, "takeVideo --------2---->")
CarCorderController.takeVideo(1, duration, isCustom, id, if (isCustom) shareType else TANLU_ROAD_CURRENT, mainInfoId, fromType)
CarCorderController.takeVideo(1, duration, isCustom, id, if (isCustom) shareType else TANLU_ROAD_CURRENT, mainInfoId, fromType, mLongitude, mLatitude)
// }
postVideoAlarmTask(isInterval)

View File

@@ -227,16 +227,18 @@ class MainServiceController {
isShare:Boolean = false,
poiType:String,
mainInfoId:Long,
longitude: Double,
latitude: Double,
customSend: ((Boolean) -> Unit)? = null
) {
Log.d(TAG, " sendInformationMessage poiType = $poiType");
//删除测试数据
var locationInfo = LocationUtil.getInstance().getLocationInfo();
if (locationInfo.address.isNullOrEmpty()) {
geoLocation(type, url, locationInfo, isCustom,trafficInfoType, isShare, customSend,poiType,mainInfoId)
geoLocation(type, url, locationInfo, isCustom,trafficInfoType, isShare, customSend,poiType,mainInfoId,longitude,latitude)
} else {
postInformationMessage(
getInformationBody(type, url, locationInfo, isCustom, trafficInfoType, isShare,poiType,mainInfoId),
getInformationBody(type, url, locationInfo, isCustom, trafficInfoType, isShare,poiType,mainInfoId,longitude,latitude),
customSend
)
}
@@ -253,19 +255,21 @@ class MainServiceController {
isShare: Boolean,
customSend: ((Boolean) -> Unit)? = null,
poiType: String,
mainInfoId: Long
mainInfoId: Long,
longitude: Double,
latitude: Double
) {
Log.d(TAG, " geoLocation -- poiType = $poiType");
LocationUtil.getInstance()
.geoCodeLocation(locationInfo.toLatLngPoint(), { locInfo: LocationInfo ->
postInformationMessage(
getInformationBody(type, url, locationInfo, isCustom, trafficInfoType, isShare, poiType,mainInfoId),
getInformationBody(type, url, locationInfo, isCustom, trafficInfoType, isShare, poiType,mainInfoId,longitude,latitude),
customSend
)
}, {
//转换失败的情况下再重试一次
geoRetryed = if (!geoRetryed) {
geoLocation(type, url, locationInfo, isCustom, trafficInfoType, isShare, customSend, poiType,mainInfoId)
geoLocation(type, url, locationInfo, isCustom, trafficInfoType, isShare, customSend, poiType,mainInfoId,longitude,latitude)
true
} else {
false

View File

@@ -2,29 +2,37 @@ package com.zhidao.roadcondition.service
import android.os.Parcel
import android.os.Parcelable
import com.mogo.map.MogoLatLng
class UploadParams(val eventType:String,val fromType:String,val duration:Int) : Parcelable {
class UploadParams(val eventType: String, val fromType: String, val duration: Int, val parentId: Long, val lat: Double, val lon: Double) : Parcelable {
constructor(parcel: Parcel) : this(
parcel.readString()!!,
parcel.readString()!!,
parcel.readInt())
parcel.readInt(),
parcel.readLong(),
parcel.readDouble(),
parcel.readDouble()
)
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeString(eventType)
parcel.writeString(fromType)
parcel.writeInt(duration)
parcel.writeLong(parentId)
parcel.writeDouble(lat)
parcel.writeDouble(lon)
}
override fun describeContents(): Int {
return 0
}
override fun toString(): String {
return "UploadParams(eventType='$eventType', fromType='$fromType', duration=$duration)"
return "UploadParams(eventType='$eventType', fromType='$fromType', duration=$duration, parentId='$parentId', lat=$lat, lon=$lon)"
}
companion object CREATOR : Parcelable.Creator<UploadParams> {
override fun createFromParcel(parcel: Parcel): UploadParams {
return UploadParams(parcel)

View File

@@ -4,6 +4,7 @@ import com.google.gson.JsonArray
import com.google.gson.JsonObject
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.network.Utils
import com.zhidao.roadcondition.constant.TANLU_ROAD_CURRENT
import com.zhidao.roadcondition.model.InformationBody
import com.zhidao.roadcondition.model.LocationInfo
import com.zhidao.roadcondition.model.proxy.INFO_TYPE_IMG
@@ -29,7 +30,9 @@ fun getInformationBody(
trafficInfoType:String = "",
isShare:Boolean,
poiType: String,
mainInfoId: Long
mainInfoId: Long,
latitude: Double,
longitude: Double
): InformationBody {
var jsonArray = JsonArray()
var type: Int
@@ -54,8 +57,8 @@ fun getInformationBody(
locationInfo.cityCode,
locationInfo.cityName,
System.currentTimeMillis(),
locationInfo.latitude,
locationInfo.longitude,
if (latitude == 0.0) locationInfo.latitude else latitude,
if (longitude == 0.0) locationInfo.longitude else longitude,
locationInfo.provinceName,
Utils.getSn(),
locationInfo.street,

View File

@@ -22,7 +22,7 @@ const val PARAM_ACTIVE_STATUS = "PARAM_ACTIVE_STATUS"
const val LAST_ENTER_TIME = "LAST_ENTER_TIME"
const val PIC_NUMBER = "PIC_NUMBER" //图片拍摄张数
const val VIDEO_DURATION_DEFAULT = 15_000L //视频拍摄时长
const val VIDEO_DURATION_DEFAULT = 10_000L //视频拍摄时长
const val PIC_NUMBER_DEFAULT = 1L //图片拍摄张数
const val TIME_QUANTUM = "time_quantum" //时间段

View File

@@ -7,7 +7,7 @@
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
android:enabled="true"
android:launchMode="singleInstance"
android:resizeableActivity="true"
android:resizeableActivity="false"
android:resumeWhilePausing="true"
android:screenOrientation="landscape"
android:stateNotNeeded="true"

View File

@@ -1,14 +1,16 @@
package com.zhidao.mogo.module.main.independent;
import android.annotation.TargetApi;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.module.common.map.CustomNaviInterrupter;
import com.mogo.module.main.MainActivity;
import com.mogo.utils.TipToast;
/**
* 针对独立应用形式,做单独定制
@@ -47,8 +49,19 @@ public class MainIndependentActivity extends MainActivity {
if ( mCoverUpLayout.getVisibility() != View.VISIBLE ) {
mServiceApis.getAdasControllerApi().setUseAlgorithm( true );
}
if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){
fixInMultiWindowMode();
}
}
@TargetApi( Build.VERSION_CODES.N )
private void fixInMultiWindowMode(){
if ( isInMultiWindowMode() ) {
TipToast.shortTip( R.string.module_main_un_support_multi_window_mode );
}
}
@Override
protected void onPause() {
super.onPause();

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="module_main_un_support_multi_window_mode">应用不支持分屏</string>
</resources>

View File

@@ -8,7 +8,7 @@
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
android:enabled="true"
android:launchMode="singleInstance"
android:resizeableActivity="true"
android:resizeableActivity="false"
android:resumeWhilePausing="true"
android:screenOrientation="landscape"
android:stateNotNeeded="true"

View File

@@ -26,7 +26,7 @@
android:name=".AppsListActivity"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
android:launchMode="singleTask"
android:resizeableActivity="true"
android:resizeableActivity="false"
android:resumeWhilePausing="true"
android:screenOrientation="landscape"
android:stateNotNeeded="true"

View File

@@ -25,7 +25,13 @@ public class AppsAdapter extends BaseAdapter {
private List< AppInfo > mAppInfos;
public AppsAdapter( List< AppInfo > appInfos ) {
this.mAppInfos = new ArrayList<>( appInfos );
this.mAppInfos = new ArrayList<>();
for ( AppInfo appInfo : appInfos ) {
if ( appInfo == null ) {
continue;
}
mAppInfos.add( appInfo );
}
}
@Override

View File

@@ -10,7 +10,7 @@
android:id="@+id/module_apps_id_app_icon"
android:layout_width="@dimen/module_apps_navigation_icon_width"
android:scaleType="fitXY"
android:src="@drawable/module_apps_ic_im"
android:src="@drawable/module_apps_ic_default_icon"
android:layout_height="@dimen/module_apps_navigation_icon_height" />
<TextView

View File

@@ -5,6 +5,7 @@
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:backgroundDimAmount">0.85</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:fullBright">@android:color/transparent</item>

View File

@@ -1,18 +0,0 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.zhidao.mogo.module.event.panel;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.zhidao.mogo.module.event.panel";
/**
* @deprecated APPLICATION_ID is misleading in libraries. For the library package name use LIBRARY_PACKAGE_NAME
*/
@Deprecated
public static final String APPLICATION_ID = "com.zhidao.mogo.module.event.panel";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0.0-SNAPSHOT";
}

View File

@@ -1,18 +0,0 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.zhidao.mogo.module.event.panel.EventPanelModuleProvider;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
/**
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
public class ARouter$$Group$$event implements IRouteGroup {
@Override
public void loadInto(Map<String, RouteMeta> atlas) {
atlas.put("/event/panel", RouteMeta.build(RouteType.PROVIDER, EventPanelModuleProvider.class, "/event/panel", "event", null, -1, -2147483648));
}
}

View File

@@ -1,18 +0,0 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.enums.RouteType;
import com.alibaba.android.arouter.facade.model.RouteMeta;
import com.alibaba.android.arouter.facade.template.IProviderGroup;
import com.zhidao.mogo.module.event.panel.EventPanelModuleProvider;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
/**
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
public class ARouter$$Providers$$mogomoduleeventpanelnoop implements IProviderGroup {
@Override
public void loadInto(Map<String, RouteMeta> providers) {
providers.put("com.mogo.service.eventpanel.IEventPanelProvider", RouteMeta.build(RouteType.PROVIDER, EventPanelModuleProvider.class, "/event/panel", "event", null, -1, -2147483648));
}
}

View File

@@ -1,17 +0,0 @@
package com.alibaba.android.arouter.routes;
import com.alibaba.android.arouter.facade.template.IRouteGroup;
import com.alibaba.android.arouter.facade.template.IRouteRoot;
import java.lang.Class;
import java.lang.Override;
import java.lang.String;
import java.util.Map;
/**
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
public class ARouter$$Root$$mogomoduleeventpanelnoop implements IRouteRoot {
@Override
public void loadInto(Map<String, Class<? extends IRouteGroup>> routes) {
routes.put("event", ARouter$$Group$$event.class);
}
}

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zhidao.mogo.module.event.panel"
android:versionCode="1"
android:versionName="1.0.0-SNAPSHOT" >
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="22" />
/
</manifest>

View File

@@ -1 +0,0 @@
[{"outputType":{"type":"AAPT_FRIENDLY_MERGED_MANIFESTS"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0.0-SNAPSHOT","enabled":true,"outputFile":"mogo-module-event-panel-noop-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.zhidao.mogo.module.event.panel","split":""}}]

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/debug/jniLibs"/></dataSet></merger>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/debug/shaders"/></dataSet></merger>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/main/assets"/><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/debug/assets"/></dataSet></merger>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/main/res"/><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/build/generated/res/rs/debug"/><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/main/res"/><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/build/generated/res/rs/debug"/><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/debug/res"/></dataSet><mergedItems/></merger>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zhidao.mogo.module.event.panel"
android:versionCode="1"
android:versionName="1.0.0-SNAPSHOT" >
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="22" />
/
</manifest>

View File

@@ -1,2 +0,0 @@
R_DEF: Internal format may change without notice
local

View File

@@ -1,14 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="com.zhidao.mogo.module.event.panel"
4 android:versionCode="1"
5 android:versionName="1.0.0-SNAPSHOT" >
6
7 <uses-sdk
8 android:minSdkVersion="19"
8-->/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/main/AndroidManifest.xml
9 android:targetSdkVersion="22" />
9-->/Users/congtaowang/Public/AndroidStudioProjects/zhidao/yycp/MogoLauncher/modules/mogo-module-event-panel-noop/src/main/AndroidManifest.xml
10 /
11
12</manifest>

View File

@@ -1 +0,0 @@
[{"outputType":{"type":"MERGED_MANIFESTS"},"apkData":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0.0-SNAPSHOT","enabled":true,"outputFile":"mogo-module-event-panel-noop-debug.aar","fullName":"debug","baseName":"debug"},"path":"../../library_manifest/debug/AndroidManifest.xml","properties":{"packageId":"com.zhidao.mogo.module.event.panel","split":""}}]

Some files were not shown because too many files have changed in this diff Show More