Merge remote-tracking branch 'origin/dev_merge_shunyi_vr_map' into dev_merge_shunyi_vr_map

This commit is contained in:
tongchenfei
2020-12-22 12:38:54 +08:00
552 changed files with 10631 additions and 910 deletions

View File

@@ -3,18 +3,9 @@
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
<package name="java.util" withSubpackages="false" static="false" />
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
<package name="io.ktor" withSubpackages="true" static="false" />
</value>
</option>
</JetCodeStyleSettings>

1
.idea/gradle.xml generated
View File

@@ -84,7 +84,6 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'com.alibaba.arouter'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'android-aspectjx'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
@@ -150,7 +151,7 @@ android {
// 分享时是否隐藏 adas
buildConfigField 'boolean', 'IS_NEED_HIDE_ADAS_WHEN_SHARE', 'false'
// 是否需要实时上报坐标
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'true'
buildConfigField 'boolean', 'IS_NEED_UPLOAD_COORDINATES_IN_TIME', 'false'
}
// f系列-分体机-高德
f8Amap {
@@ -445,6 +446,10 @@ repositories {
}
}
aspectjx {
include "com.mogo.chat"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

View File

@@ -53,6 +53,7 @@ ext {
glideanno : 'com.github.bumptech.glide:annotations:4.8.0',
glidecompiler : 'com.github.bumptech.glide:compiler:4.8.0',
supportannos : "com.android.support:support-annotations:28.0.0",
okhttpinterceptor :"com.squareup.okhttp3:logging-interceptor:3.12.0",
// fresco
fresco : 'com.facebook.fresco:fresco:1.1.0',
// 公司服务 - 语音
@@ -175,6 +176,7 @@ ext {
mogobaseservicesdk : "com.mogo.base:services-sdk:${MOGO_BASE_SERVICES_SDK_VERSION}",
mogobaseserviceapk : "com.mogo.base:services-apk:${MOGO_BASE_SERVICES_APK_VERSION}",
mogobasewebsocketsdk : "com.mogo.base:websocket-sdk:${MOGO_BASE_WEBSOCKET_SDK_VERSION}",
mogowebsocket : "com.mogo.module.carchatting:module-carchatt-socket:${WEBSOCKET_VERSION}",
// loglib
mogologlib : "com.mogo.module:module-loglib:${LOGLIB_VERSION}",
// monitor

View File

@@ -29,8 +29,7 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.arouter
implementation "com.mogo.module.carchatting:module-carchatt-socket:1.1.2"
implementation rootProject.ext.dependencies.mogowebsocket
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogoutils

View File

@@ -1,6 +1,7 @@
package com.mogo.utils;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@@ -19,8 +20,11 @@ public class ViewUtils {
view.destroyDrawingCache();
view.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
Bitmap bitmap = null;
return (bitmap = view.getDrawingCache()) != null ? bitmap.copy(Bitmap.Config.ARGB_8888, false) : null;
Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas( bitmap );
view.draw( canvas );
return bitmap;
// return (bitmap = view.getDrawingCache()) != null ? bitmap.copy(Bitmap.Config.ARGB_8888, false) : null;
}
public static void processChildView(View view) {

View File

@@ -138,9 +138,11 @@ HTTPDNS_NOOP_VERSION = 2.0.12
######## 外部依赖引用
# 车聊聊
CARCHATTING_VERSION=2.2.14
CARCHATTING_VERSION=2.2.32
# 车聊聊接口
CARCHATTINGPROVIDER_VERSION=1.1.8
# websocket
WEBSOCKET_VERSION=1.1.2
# loglib
LOGLIB_VERSION = 1.0.4

View File

@@ -23,7 +23,10 @@ public class AMapMarkerClickHandler {
final IMogoMarkerClickListener listener = mogoMarker.getOnMarkerClickListener();
Logger.d( "AMapMarkerWrapper", "marker 点击回调:%s -> %s", mogoMarker, marker );
if ( listener != null ) {
listener.onMarkerClicked( mogoMarker );
boolean result = listener.onMarkerClicked( mogoMarker );
if ( result ) {
return true;
}
}
return MogoMarkersHandler.getInstance().onMarkerClicked( mogoMarker );
}

View File

@@ -67,7 +67,7 @@ dependencies {
implementation project(':foudations:mogo-commons')
}
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.3.3'
implementation 'com.zhidaoauto.machine:map:1.0.0-vr-7.4.1'
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -21,12 +21,13 @@ public class AMapMarkerClickHandler {
private static volatile AMapMarkerClickHandler sInstance;
private AMapMarkerClickHandler(){}
private AMapMarkerClickHandler() {
}
public static AMapMarkerClickHandler getInstance(){
if( sInstance == null ){
synchronized( AMapMarkerClickHandler.class ) {
if( sInstance == null ){
public static AMapMarkerClickHandler getInstance() {
if ( sInstance == null ) {
synchronized ( AMapMarkerClickHandler.class ) {
if ( sInstance == null ) {
sInstance = new AMapMarkerClickHandler();
}
}
@@ -34,7 +35,7 @@ public class AMapMarkerClickHandler {
return sInstance;
}
public synchronized void release(){
public synchronized void release() {
sInstance = null;
}
@@ -47,13 +48,16 @@ public class AMapMarkerClickHandler {
if ( marker == null ) {
return false;
}
Map<String, IMogoMarker> mogoMarkerMap = MarkerWrapperClickHelper.getInstance().getMogoMarkerMap();
if ( mogoMarkerMap.containsKey(marker.getId())) {
IMogoMarker mogoMarker = mogoMarkerMap.get(marker.getId());
Map< String, IMogoMarker > mogoMarkerMap = MarkerWrapperClickHelper.getInstance().getMogoMarkerMap();
if ( mogoMarkerMap.containsKey( marker.getId() ) ) {
IMogoMarker mogoMarker = mogoMarkerMap.get( marker.getId() );
final IMogoMarkerClickListener listener = mogoMarker.getOnMarkerClickListener();
Logger.d( "AMapMarkerWrapper", "marker 点击回调:%s -> %s", mogoMarker, marker );
if ( listener != null ) {
listener.onMarkerClicked( mogoMarker );
boolean result = listener.onMarkerClicked( mogoMarker );
if ( result ) {
return true;
}
}
return MogoMarkersHandler.getInstance().onMarkerClicked( mogoMarker );
}

View File

@@ -339,13 +339,11 @@ public class AMapViewWrapper implements IMogoMapView,
if ( mMapView.getMapAutoViewHelper() != null ) {
switch ( ui ) {
case CarUp_2D:
mMapView.getMapAutoViewHelper().setMapViewPerspective( MapAutoApi.MAP_PERSPECTIVE_2D );
break;
case CarUp_3D:
mMapView.getMapAutoViewHelper().setMapViewPerspective( MapAutoApi.MAP_PERSPECTIVE_3D );
mMapView.getMapAutoViewHelper().setMapViewPerspective( MapAutoApi.MAP_PERSPECTIVE_UP_CAR );
break;
case NorthUP_2D:
mMapView.getMapAutoViewHelper().setRotateGesturesEnabled( false );
mMapView.getMapAutoViewHelper().setMapViewPerspective( MapAutoApi.MAP_PERSPECTIVE_UP_NORTH );
break;
}
}

View File

@@ -59,6 +59,7 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer {
marker.setMObject( this );
MarkerWrapperClickHelper.getInstance().setMogoMarkerMap( marker.getId(), this );
}
marker.setSaveBitmapEnable( true );
setObject( mogoMarkerOptions.getObject() );
this.mMogoMarkerOptions = mogoMarkerOptions;
mMogoMarkerOptions.addObserver( this );

View File

@@ -126,15 +126,15 @@ public class ObjectUtils {
location.setLongitude( aLocation.getLon() );
location.setAltitude( aLocation.getAltitude() );
// location.setTime( aLocation.getTime() );
// location.setBearing( aLocation.getBearing() );
location.setBearing( aLocation.getHeading() );
// location.setAccuracy( aLocation.getAccuracy() );
// location.setCityCode( aLocation.getCityCode() );
// location.setCityName( aLocation.getCity() );
location.setCityCode( aLocation.getCityCode() );
location.setCityName( aLocation.getCity() );
location.setProvider( aLocation.getProvider() );
// location.setAddress( aLocation.getAddress() );
// location.setDistrict( aLocation.getDistrict() );
// location.setProvince( aLocation.getProvince() );
// location.setAdCode( aLocation.getAdCode() );
location.setAddress( aLocation.getAddress() );
location.setDistrict( aLocation.getDistrict() );
location.setProvince( aLocation.getProvince() );
location.setAdCode( aLocation.getAdCode() );
// location.setLocationDetail( aLocation.getLocationDetail() );
// location.setPoiName( aLocation.getPoiName() );
// location.setAoiName( aLocation.getAoiName() );

View File

@@ -78,7 +78,7 @@ public class MogoMarkersHandler implements IMogoMarkerClickListener, IMogoMarker
}
public synchronized Map< String, List< IMogoMarker > > getAllMarkers() {
public synchronized Map< String, List< IMogoMarker > > getAllMarkers() {
return mServicesMarkers;
}

View File

@@ -0,0 +1,18 @@
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.tanlu.api.MogoTanluApiProvider;
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$$tanlulib implements IRouteGroup {
@Override
public void loadInto(Map<String, RouteMeta> atlas) {
atlas.put("/tanlulib/api", RouteMeta.build(RouteType.PROVIDER, MogoTanluApiProvider.class, "/tanlulib/api", "tanlulib", null, -1, -2147483648));
}
}

View File

@@ -0,0 +1,18 @@
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.tanlu.api.MogoTanluApiProvider;
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$$mogotanluapi implements IProviderGroup {
@Override
public void loadInto(Map<String, RouteMeta> providers) {
providers.put("com.mogo.service.tanlu.IMogoTanluProvider", RouteMeta.build(RouteType.PROVIDER, MogoTanluApiProvider.class, "/tanlulib/api", "tanlulib", null, -1, -2147483648));
}
}

View File

@@ -0,0 +1,17 @@
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$$mogotanluapi implements IRouteRoot {
@Override
public void loadInto(Map<String, Class<? extends IRouteGroup>> routes) {
routes.put("tanlulib", ARouter$$Group$$tanlulib.class);
}
}

View File

@@ -0,0 +1,18 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.zhidao.mogo.tanlu.api;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String LIBRARY_PACKAGE_NAME = "com.zhidao.mogo.tanlu.api";
/**
* @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.tanlu.api";
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

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

View File

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

View File

@@ -0,0 +1 @@
{"jetified-arouter-compiler-1.2.2.jar (com.alibaba:arouter-compiler:1.2.2)":false,"auto-service-1.0-rc2.jar (com.google.auto.service:auto-service:1.0-rc2)":false}

View File

@@ -0,0 +1,2 @@
<?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="F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\src\debug\jniLibs"/></dataSet></merger>

View File

@@ -0,0 +1,2 @@
<?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="F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\src\debug\shaders"/></dataSet></merger>

View File

@@ -0,0 +1,2 @@
<?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="F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\assets"/><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\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="F:\Station\Launcher\libraries\mogo-tanlu-api\src\debug\assets"/></dataSet></merger>

View File

@@ -0,0 +1 @@
#Tue Dec 15 19:29:29 CST 2020

View File

@@ -0,0 +1,2 @@
<?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="F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\res"/><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\build\generated\res\rs\debug"/><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\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="F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\res"/><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\build\generated\res\rs\debug"/><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\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="F:\Station\Launcher\libraries\mogo-tanlu-api\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="F:\Station\Launcher\libraries\mogo-tanlu-api\src\debug\res"/></dataSet><mergedItems/></merger>

View File

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

View File

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

View File

@@ -0,0 +1,14 @@
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="com.zhidao.mogo.tanlu.api"
4 android:versionCode="1"
5 android:versionName="1.0.0-SNAPSHOT" >
6
7 <uses-sdk
8 android:minSdkVersion="19"
8-->F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
9 android:targetSdkVersion="22" />
9-->F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
10 /
11
12</manifest>

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
-- Merging decision tree log ---
manifest
ADDED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
package
ADDED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:2:5-40
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
android:versionName
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
ADDED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
android:versionCode
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
ADDED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:1-5:12
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
xmlns:android
ADDED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml:1:11-69
uses-sdk
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml reason: use-sdk injection requested
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
android:targetSdkVersion
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
ADDED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
android:minSdkVersion
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
ADDED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml
INJECTED from F:\Station\Launcher\libraries\mogo-tanlu-api\src\main\AndroidManifest.xml

View File

@@ -2,10 +2,8 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'android-aspectjx'
apply plugin: 'com.alibaba.arouter'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
// buildToolsVersion rootProject.ext.android.buildToolsVersion
@@ -50,7 +48,7 @@ dependencies {
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 rootProject.ext.dependencies.okhttpinterceptor
implementation 'com.zhidaoauto.controller:api:1.0.8'
implementation 'com.zhidao.cosupload:cosuploadsdk:1.1.6', {
exclude group: 'com.zhidao.utils', module: 'utils'
@@ -65,7 +63,6 @@ dependencies {
implementation rootProject.ext.dependencies.gson
implementation rootProject.ext.dependencies.rxjava
implementation rootProject.ext.dependencies.rxandroid
implementation rootProject.ext.dependencies.aspectj
implementation rootProject.ext.dependencies.analytics
implementation rootProject.ext.dependencies.arouter

View File

@@ -1,29 +0,0 @@
package com.zhidao.roadcondition.aspect
import android.util.Log
import com.zhidao.roadcondition.util.CarNet_Alive
import com.zhidao.roadcondition.util.trackNormalEvent
import org.aspectj.lang.annotation.*
@Aspect
class DAUAspectj {
companion object {
const val TAG = "DAUAspectj"
}
@Pointcut("execution(* com.zhidao.roadcondition.splash_module.SplashActivity.initView())")
fun callDAU() {
}
@Pointcut("execution(* com.zhidao.roadcondition.service.RoadInfoService.launchMainActivity(..))")
fun callDAUOther(){
}
@Before("callDAU() || callDAUOther()")
fun trackDAU() {
Log.i(TAG, "trackDAU")
trackNormalEvent(CarNet_Alive, null)
}
}

View File

@@ -1,14 +0,0 @@
package com.zhidao.roadcondition.aspect;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
@Target({TYPE, METHOD, CONSTRUCTOR})
@Retention(RUNTIME)
public @interface DebugLog {
}

View File

@@ -1,112 +0,0 @@
package com.zhidao.roadcondition.aspect
import android.os.Looper
import android.os.Trace
import android.util.Log
import com.zhidao.roadcondition.BuildConfig
import org.aspectj.lang.ProceedingJoinPoint
import org.aspectj.lang.annotation.Around
import org.aspectj.lang.annotation.Aspect
import org.aspectj.lang.annotation.Pointcut
import org.aspectj.lang.reflect.CodeSignature
import org.aspectj.lang.reflect.MethodSignature
import java.util.concurrent.TimeUnit
@Aspect
class LogAspectj {
companion object {
@Volatile
private var enable: Boolean = BuildConfig.DEBUG
}
@Pointcut("within(@com.zhidao.roadcondition.aspect.DebugLog *)")
fun withinAnnotatedClass() {}
@Pointcut("execution(!synthetic * *(..))&& withinAnnotatedClass()")
fun methodInsideAnnotatedType() {}
@Pointcut("execution(!synthetic *.new(..))&& withinAnnotatedClass()")
fun constructorInsideAnnotatedType() {}
@Pointcut("execution(@com.zhidao.roadcondition.aspect.DebugLog * *(..))|| methodInsideAnnotatedType()")
fun method() {}
@Pointcut("execution(@com.zhidao.roadcondition.aspect.DebugLog *.new(..))|| constructorInsideAnnotatedType()")
fun constructor() {}
@Around("method() || constructor()")
fun logExecute(joinPoint: ProceedingJoinPoint) {
enterMethod(joinPoint)
var startNanos = System.nanoTime()
var result = joinPoint.proceed()
var stopNanos = System.nanoTime()
var lengthMill = TimeUnit.NANOSECONDS.toMillis(stopNanos - startNanos)
exitMethod(joinPoint, result, lengthMill)
}
private fun enterMethod(joinPoint: ProceedingJoinPoint) {
if (!enable) return
val signature = joinPoint.signature as CodeSignature
val cls = signature.declaringType
val methodName = signature.name
val parameterNames = signature.parameterNames
val parameterValues = joinPoint.args
var builder = StringBuilder("\u21E2 ")
builder.append(methodName).append('(')
parameterValues.forEachIndexed { index, _ ->
if (index > 0) {
builder.append(",")
}
builder.append(parameterNames[index]).append('=')
builder.append(parameterValues[index])
}
builder.append(')')
if (Looper.myLooper() != Looper.getMainLooper()) {
builder.append("[Thread:\"").append(Thread.currentThread().name).append("\"]")
}
Log.i(asTag(cls), builder.toString())
val section = builder.toString().substring(2)
Trace.beginSection(section)
}
private fun exitMethod(joinPoint: ProceedingJoinPoint, result: Any?, lengthMill: Long) {
if (!enable) return
Trace.endSection()
val signature = joinPoint.signature
val cls = signature.declaringType
val methodName = signature.name
var hasReturnType = signature is MethodSignature
&& signature.returnType != Void.TYPE
var builder = StringBuilder("\u21E0 ")
.append(methodName)
.append("[")
.append(lengthMill)
.append("ms]")
if (hasReturnType) {
builder.append(" = ")
builder.append(result.let {
result.toString()
})
}
Log.i(asTag(cls), builder.toString())
}
private fun asTag(cls: Class<*>): String {
// if (cls.isAnonymousClass) {
// return asTag(cls.enclosingClass)
// }
return cls.simpleName
}
}

View File

@@ -1,7 +1,6 @@
package com.zhidao.roadcondition.constant
import com.mogo.commons.debug.DebugConfig
import com.zhidao.roadcondition.BuildConfig
class HttpConstants {

View File

@@ -11,7 +11,7 @@ class StrategyServiceModel : BaseRepository() {
suspend fun getCityStrategy(): BaseResponse<Results> {
return apiCall {
var map = hashMapOf<String, String>()
val map = hashMapOf<String, String>()
map["sn"] = Utils.getSn()
val locInfo = LocationUtil.getInstance().getLocationInfo()
map["data"] = Gson().toJson(
@@ -25,43 +25,10 @@ class StrategyServiceModel : BaseRepository() {
}
}
// suspend fun getAuthorization(): BaseResponse<Any> {
// return apiCall {
// HttpClient.getInstance().getHttpApi().getAuthorization(getSn())
// }
// }
//
// suspend fun getAllConfig(): BaseResponse<CommonConfig> {
// return apiCall {
// var map = hashMapOf<String, String>()
// map["sn"] = getSn()
// HttpClient.getInstance().getHttpApi()
// .getAllCommonConfig(map)
// }
// }
//
// suspend fun getSplashConfig(): BaseR
// esponse<SplashConfig> {
// return apiCall {
// var splashConfigRequest =
// SplashConfigRequest("1", "1")
// var splashBodyStr = Gson().toJson(splashConfigRequest)
//
// HttpClient.getInstance().getHttpApi()
// .getSplashConfig(
// mapOf(
// "sn" to getSn(),
// "data" to splashBodyStr
// )
// )
//
// }
// }
suspend fun uploadInformation(informationBody: InformationBody): BaseResponse<UploadResult> {
return apiCall {
var informationBodyStr = Gson().toJson(informationBody)
Log.d("MainServiceController", "uploadInformation informationBody = " + informationBodyStr)
val informationBodyStr = Gson().toJson(informationBody)
Log.d("MainServiceController", "uploadInformation informationBody = $informationBodyStr")
HttpClient.getInstance().getHttpApi()
.uploadInformation(mapOf("sn" to Utils.getSn(), "data" to informationBodyStr))
}

View File

@@ -1,17 +0,0 @@
package com.zhidao.roadcondition.net
import android.util.Log
import okhttp3.Interceptor
import okhttp3.Response
class CommonInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val oldRequest = chain.request()
val newRequest = oldRequest.newBuilder()
Log.d("CommonInterceptor","addHeader")
newRequest.header("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
return chain.proceed(newRequest.build())
}
}

View File

@@ -19,12 +19,10 @@ class HttpClient private constructor(baseUrl: String) {
const val DEFAULT_WRITE_TIMEOUT = 30L
const val DEFAULT_READ_TIMEOUT = 30L
const val COMMON_PARAM_SN = "sn"
private var baseUrlClientMap = HashMap<String, HttpClient>()
fun getInstance(): HttpClient {
var baseUrl = HttpConstants.getBaseUrl()
val baseUrl = HttpConstants.getBaseUrl()
var httpClient = baseUrlClientMap[baseUrl]
if (httpClient == null) {
synchronized(HttpClient::class.java) {

View File

@@ -1,43 +0,0 @@
package com.zhidao.roadcondition.net
import androidx.annotation.NonNull
import okhttp3.MediaType
import okhttp3.RequestBody
import okhttp3.internal.Util
import okio.BufferedSink
class PostCommonBody : RequestBody {
companion object {
val CONTENT_TYPE = MediaType.parse("application/x-www-form-urlencoded; charset=UTF-8")
val charset = Util.UTF_8
fun create(@NonNull content: String): RequestBody {
return PostCommonBody(content)
}
}
private var content: String
constructor(@NonNull content: String) {
this.content = content
}
fun getContent(): String {
return content
}
override fun contentType(): MediaType? {
return CONTENT_TYPE
}
override fun writeTo(sink: BufferedSink) {
if (content.isEmpty()) {
throw NullPointerException("content == null")
}
val bytes = content.toByteArray(charset)
Util.checkOffsetAndCount(bytes.size.toLong(), 0, bytes.size.toLong())
sink.write(bytes, 0, bytes.size)
}
}

View File

@@ -1,28 +0,0 @@
package com.zhidao.roadcondition.net
import com.zhidao.roadcondition.constant.HttpConstants
import com.zhidao.roadcondition.exception.ApiException
import com.zhidao.roadcondition.model.BaseResponse
import io.reactivex.functions.Function
class ResponseFunction<T> : Function<BaseResponse<T>, T> {
private var baseUrl: String = ""
constructor() {
this.baseUrl = HttpConstants.getBaseUrl()
}
constructor(baseUrl: String) {
this.baseUrl = baseUrl
}
override fun apply(t: BaseResponse<T>): T {
if (!t.isSuccess(baseUrl)) {
throw ApiException(t.code, t.msg)
}
return t.result
}
}

View File

@@ -11,7 +11,7 @@ class ShareRoadReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
Log.d("MainService", "ShareRoadReceiver ------> intent.action = " + intent.action)
if (intent.action == "com.zhidao.share.roadcondition.action") {
var type = intent.getStringExtra("type")
val type = intent.getStringExtra("type")
Log.e("MainService", "ShareRoadReceiver type ----> $type ----> 此方法已经废弃了,无法调起服务")
// MainService.launchService(context, type)
}

View File

@@ -28,15 +28,15 @@ import kotlin.math.abs
* @since 2019-10-30
*/
object CarCorderController : TakePhotoCallback, TakeVideoCallback {
const val TAG: String = "CarCorderController"
private lateinit var zdCarCoderController: ZdCarCoderController
val TAG: String = this.javaClass.simpleName
var outputVideoPath: String = ""
var mType: String = "" //1 上报拥堵, 2 封路和查车
var mainInfoId: Long = 0
var mFromType: String = ""
private var outputVideoPath: String = ""
private var mType: String = "" //1 上报拥堵, 2 封路和查车
private var mainInfoId: Long = 0
private var mFromType: String = ""
private var mLongitude: Double = 0.0
private var mLatitude: Double = 0.0
var mSpeed: Float = 0f
private var mSpeed: Float = 0f
private var getVideoFailed: (() -> Unit)? = null
private var interceptors: ArrayList<TakePhotoInterceptor> = ArrayList(1)

View File

@@ -1,6 +1,5 @@
package com.zhidao.roadcondition.service
import android.util.Log
import com.zhidao.cosupload.callback.CosStatusCallback
import com.zhidao.cosupload.callback.CosStatusCallbackManager
@@ -11,9 +10,7 @@ import com.zhidao.cosupload.callback.CosStatusCallbackManager
*/
object CosCallbackMapController : CosStatusCallback {
val TAG = "CosCallbackMapController"
val map: MutableMap<String, CosStatusCallback> = mutableMapOf()
private val map: MutableMap<String, CosStatusCallback> = mutableMapOf()
var uploadFailed: (() -> Unit)? = null
@@ -58,9 +55,7 @@ object CosCallbackMapController : CosStatusCallback {
}
override fun uploadCosFailed(cosPath: String?, eventId: String?, localPath: String?) {
map[localPath]?.let {
it.uploadCosFailed(cosPath, eventId, localPath)
}
map[localPath]?.uploadCosFailed(cosPath, eventId, localPath)
}
override fun uploadCosCompleted(
@@ -69,15 +64,11 @@ object CosCallbackMapController : CosStatusCallback {
downloadUrl: String?,
localPath: String?
) {
map[localPath]?.let {
it.uploadCosCompleted(cosPath, eventId, downloadUrl, localPath)
}
map[localPath]?.uploadCosCompleted(cosPath, eventId, downloadUrl, localPath)
}
override fun onProgress(localPath: String?, progress: Float) {
map[localPath]?.let {
it.onProgress(localPath, progress)
}
map[localPath]?.onProgress(localPath, progress)
}
fun release() {

View File

@@ -4,11 +4,9 @@ import android.content.Intent
import android.util.Log
import com.google.gson.Gson
import com.mogo.commons.AbsMogoApplication
import com.mogo.utils.TipToast
import com.zhidao.cosupload.DbPriorityConfig
import com.zhidao.cosupload.callback.CosStatusCallback
import com.zhidao.cosupload.manager.CosUploadManagerImpl
import com.zhidao.roadcondition.constant.*
import com.zhidao.roadcondition.event.GetImageSuccessEvent
import com.zhidao.roadcondition.event.LatLngStickyEventBus
import com.zhidao.roadcondition.model.proxy.INFO_TYPE_IMG
@@ -25,11 +23,15 @@ import com.zhidao.roadcondition.util.trackNormalEvent
* @since 2019-10-30
*/
class CosStatusController : CosStatusCallback {
val TAG: String = this.javaClass.simpleName
companion object{
const val TAG: String = "CosStatusController"
}
//存储单次请求的视频和缩略图url
var videoAndThumbMap: MutableMap<String, String> = mutableMapOf()
private var videoAndThumbMap: MutableMap<String, String> = mutableMapOf()
//图片上传的eventId
lateinit var mPicEventId: String
private lateinit var mPicEventId: String
private var isRetry = false //是否重试上传过图片
private var mainServiceHttpModel = MainServiceController()
@@ -41,7 +43,7 @@ class CosStatusController : CosStatusCallback {
private var mFromType: String = ""
private var mLongitude: Double = 0.0
private var mLatitude: Double = 0.0
var mSpeed: Float = 0f
private var mSpeed: Float = 0f
//上传文件
fun uploadFile(picPath: MutableList<String?>?, entity: TakeEntity, type: String, mainInfoId: Long,
@@ -123,7 +125,7 @@ class CosStatusController : CosStatusCallback {
videoAndThumbMap["thumb"] = downloadUrl!!
Log.i(TAG, "videoAndThumbMap add thumb")
}
Log.d(TAG, "videoAndThumbMap ${videoAndThumbMap}")
Log.d(TAG, "videoAndThumbMap $videoAndThumbMap")
if (videoAndThumbMap.size == 2) {
trackUploadCos(4)
Log.d(TAG, "videoAndThumbMap.size == 2 ")

View File

@@ -10,8 +10,8 @@ import java.util.*
*/
object CustomStatusHandler {
val takePhotoStatusQueue: Queue<Boolean> = ArrayDeque(5)
val takeVideoStatusQueue: Queue<TakeEntity> = ArrayDeque(5)
private val takePhotoStatusQueue: Queue<Boolean> = ArrayDeque(5)
private val takeVideoStatusQueue: Queue<TakeEntity> = ArrayDeque(5)
fun offerPhotoStatus(status: Boolean) {
takePhotoStatusQueue.offer(status)

View File

@@ -6,9 +6,6 @@ import android.content.Intent
import android.os.IBinder
import android.util.Log
import com.zhidao.roadcondition.util.*
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import java.io.File
import java.lang.Exception

View File

@@ -13,7 +13,7 @@ import com.zhidao.roadcondition.util.*
*/
object InformationUploadController {
val TAG : String = this.javaClass.simpleName
private val TAG : String = this.javaClass.simpleName
private var mainServiceHttpModel = MainServiceController()
@@ -110,9 +110,7 @@ object InformationUploadController {
fun release(id: Long) {
val target = informationCache.remove(id)
target?.let {
it.release()
}
target?.release()
}
private fun recordUploadTime() {

View File

@@ -33,7 +33,6 @@ import com.zhidao.roadcondition.util.StrategyPreferenceUtil.Companion.getStrateg
import com.zhidao.roadcondition.util.StrategyPreferenceUtil.Companion.getStrategyType
import io.reactivex.Observable
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.functions.Consumer
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import java.util.concurrent.TimeUnit
@@ -61,22 +60,21 @@ class MainService : Service() {
//是否已经获取过策略
var isGetStrategies: Boolean = false
val TAG: String = this.javaClass.simpleName
private val TAG: String = this.javaClass.simpleName
//1是一次性2是周期性
var picType: Int = 0
var videoType: Int = 0
var shareType: String = "type"
var fromType: String = ""
var isCustom: Boolean = false
var speed: Float = 0f
private var picType: Int = 0
private var videoType: Int = 0
private var shareType: String = "type"
private var fromType: String = ""
private var isCustom: Boolean = false
private var speed: Float = 0f
var params: UploadParams? = null
var mainInfoId: Long = 0
private var params: UploadParams? = null
private var mainInfoId: Long = 0
private var mLongitude: Double = 0.0
private var mLatitude: Double = 0.0
lateinit var serviceApis: IMogoServiceApis
private lateinit var serviceApis: IMogoServiceApis
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
//清理多媒体资源和sp策略数据
@@ -86,10 +84,8 @@ class MainService : Service() {
//参数说明appKey: app唯一标识比如包名
CosUploadManagerImpl.getInstance(AbsMogoApplication.getApp().applicationContext)
.init(BuildConfig.APPLICATION_ID, 0)
//初始化语音
VoiceController.initVoice()
serviceApis = ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(this) as IMogoServiceApis
speed = serviceApis.getMapServiceApi().getSingletonLocationClient(this).getLastKnowLocation().getSpeed()
speed = serviceApis.mapServiceApi.getSingletonLocationClient(this).lastKnowLocation.speed
Log.d(TAG, "onStartCommand speed = $speed")
if (intent != null) {
params = intent.getParcelableExtra("params")
@@ -115,7 +111,7 @@ class MainService : Service() {
}
//定时任务回调广播
var mAlarmBroadCast: BroadcastReceiver = object : BroadcastReceiver() {
private var mAlarmBroadCast: BroadcastReceiver = object : BroadcastReceiver() {
override fun onReceive(p0: Context?, p1: Intent) {
Log.d(TAG, "receive alarm!!!!!!!!!!AlarmType===${p1.getIntExtra("AlarmType", 1)}")
if (p1.action == alarmBroadAction) {
@@ -178,14 +174,14 @@ class MainService : Service() {
// mainServiceHttpModel.getSplashConfig()
}
var id: Long = System.currentTimeMillis()
private var id: Long = System.currentTimeMillis()
/**
* 获取图片成功
*/
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true, priority = 98)
fun getImageEvent(getImageSuccessEvent: GetImageSuccessEvent) {
var info = LocationUtil.getInstance().getLocationInfo()
val info = LocationUtil.getInstance().getLocationInfo()
Log.d("MainService", "getImageEvent long = ${info.longitude} ----> lat= ${info.latitude}")
Log.d(
"MainService",
@@ -209,7 +205,7 @@ class MainService : Service() {
* 初始化定位监听
*/
private fun initLocationListener() {
var isOpen = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp().applicationContext).getBoolean("KEY_SERVER_REPORTSTRATEGY_SWITCH", false)
val isOpen = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp().applicationContext).getBoolean("KEY_SERVER_REPORTSTRATEGY_SWITCH", false)
Logger.d("EntrancePresenter", " initLocationListener ---- isOpen = $isOpen")
//开始开始监听速度,只要超过一次5公里每小时则即开始获取策略进行本地上报 只有release才加此判断qa环境方便测试
LocationUtil.getInstance().setonSpeedlistenner(object : LocationUtil.SpeedListener {
@@ -277,9 +273,9 @@ class MainService : Service() {
//目前不支持连拍只能定时2秒拍一张 第一期每次只拍一张
Observable.intervalRange(0, 1, 0, 2_000, TimeUnit.MILLISECONDS)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(Consumer {
.subscribe {
CarCorderController.takePhoto(1, 1, false, isCustom, TANLU_ROAD_CURRENT, mainInfoId, fromType, mLongitude, mLatitude, speed)
})
}
// }
postPhotoAlarmTask(isInterval)
@@ -310,7 +306,7 @@ class MainService : Service() {
intent.action = alarmBroadAction
intent.putExtra("number", getLong(PIC_NUMBER, PIC_NUMBER_DEFAULT))
intent.putExtra("AlarmType", AlarmTypePic)
var pendingIntent = PendingIntent.getBroadcast(this, AlarmTypePic, intent, 0)
val pendingIntent = PendingIntent.getBroadcast(this, AlarmTypePic, intent, 0)
Log.d(
"MainService",
"postPhotoAlarmTask time =" + getStrategyInterval(
@@ -342,7 +338,7 @@ class MainService : Service() {
"duration", (VIDEO_DURATION_DEFAULT / 1000).toInt()
)
videoIntent.putExtra("AlarmType", AlarmTypeVideo)
var videoPendingIntent =
val videoPendingIntent =
PendingIntent.getBroadcast(this, AlarmTypeVideo, videoIntent, 0)
Log.d(
"MainService",

View File

@@ -18,20 +18,20 @@ import kotlinx.coroutines.runBlocking
class MainServiceController {
companion object {
var TAG = this::class.java.name
const val TAG = "MainServiceController"
}
//逆地理编码是否重试
private var geoRetryed = false
private var geoRetry = false
private var mFromType: String = ""
private var mPoiType: String = ""
private val strategyeModel by lazy { StrategyServiceModel() }
private val strategyModel by lazy { StrategyServiceModel() }
fun initStrategies(initFinish: (() -> Unit)? = null) {
request<BaseResponse<Results>> {
loader {
strategyeModel.getCityStrategy()
strategyModel.getCityStrategy()
}
onSuccess {
it.result.let { strategy ->
@@ -184,7 +184,7 @@ class MainServiceController {
}, {
//转换失败的情况下再重试一次
Log.d(TAG, "geoLocation -------true-->")
geoRetryed = if (!geoRetryed) {
geoRetry = if (!geoRetry) {
geoLocation(type, url, locationInfo, isCustom, trafficInfoType, isShare, customSend, poiType,mainInfoId,speed, longitude,latitude)
true
} else {
@@ -207,7 +207,7 @@ class MainServiceController {
trackUploadServer(3)
request<BaseResponse<UploadResult>> {
loader {
strategyeModel.uploadInformation(informationBody)
strategyModel.uploadInformation(informationBody)
}
onSuccess {
Log.i(TAG, "upload success id = " + it.result.id)
@@ -230,7 +230,7 @@ class MainServiceController {
private fun sendUgcStatusReceiver(id: Long, type: String?, fromType: String?) {
Log.d(TAG, "sendUgcStatusReceiver id = $id ---type = $type --fromType = $fromType ")
var intent = Intent()
val intent = Intent()
intent.action = "com.v2x.ugc.upload.status"
intent.putExtra("id", id)
intent.putExtra("type", type)

View File

@@ -2,7 +2,6 @@ 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, val parentId: Long, val lat: Double, val lon: Double) : Parcelable {
constructor(parcel: Parcel) : this(

View File

@@ -1,63 +0,0 @@
package com.zhidao.roadcondition.service
import com.mogo.commons.AbsMogoApplication
import com.zhidao.auto.platform.voice.VoiceClient
import java.lang.Exception
/**
* @description 声音控制类
*
* @author lixiaopeng
* @since 2019-11-01
*/
object VoiceController {
private lateinit var voiceClient: VoiceClient
fun initVoice() {
voiceClient = VoiceClient(AbsMogoApplication.getApp().applicationContext)
}
/**
* 设置语音命令回调接口
* @param callBack
*/
fun setCallBack(callBack: VoiceClient.VoiceCmdCallBack) {
voiceClient.setCallBack(callBack)
}
/**
* @param speakText 语音播报内容
*/
fun speakVoice(speakText: String) {
voiceClient.speakDefault(speakText)
}
/**
* 注册免唤醒命令
* @param customType 命令
* @param customWakeupCmd 命令对应的唤醒词集合
*/
fun registerCustomWakeupCmd(customType: String, customWakeupCmd: Array<String>) {
voiceClient.registerCustomWakeupCmd(customType, customWakeupCmd)
}
/**
* 取消免唤醒命令
* @param customType 命令
*/
fun unRegisterCustomWakeupCmd(customType: String) {
try {
voiceClient.unRegisterCustomWakeupCmd(customType)
} catch (e:Exception){
}
}
/**
* 释放资源(界面销毁的时候调用)
*/
fun release() {
voiceClient.release()
}
}

View File

@@ -4,7 +4,6 @@ import android.content.Context
import com.elegant.analytics.Analytics
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.network.Utils
import com.zhidao.roadcondition.aspect.DebugLog
import java.util.HashMap
const val CarNet_Alive:String = "CarNet_Alive"//探路日活DAU埋点
@@ -38,7 +37,6 @@ const val CarNet_Geo:String = "CarNet_Geo_Location" //上传服务端, type=1开
const val CarNet_live_broadcast = "CarNet_live_broadcast" // 地图页面点击直播(在线可直播车机)
//自定义埋点
@DebugLog
fun trackNormalEvent(event: String, _data: MutableMap<String, Any>?, context: Context = AbsMogoApplication.getApp().applicationContext) {
var data = _data
if (data == null) {

View File

@@ -3,35 +3,14 @@
package com.zhidao.roadcondition.util
import android.content.Context
import java.lang.reflect.InvocationTargetException
private const val SN_INFO: String = "gsm.serial"
fun getSn(): String {
var serial = ""
try {
var cls = Class.forName("android.os.SystemProperties")
var method = cls.getMethod("get", String::class.java)
serial = method.invoke(cls, SN_INFO) as String
} catch (var4: ClassNotFoundException) {
var4.printStackTrace()
} catch (var5: NoSuchMethodException) {
var5.printStackTrace()
} catch (var6: InvocationTargetException) {
var6.printStackTrace()
} catch (var7: IllegalAccessException) {
var7.printStackTrace()
}
return serial
}
fun getSystemVersion(context: Context): String {
try {
var cls = context.classLoader
var systemProperties = cls.loadClass("android.os.SystemProperties")
var paramTypes = String::class.java
val cls = context.classLoader
val systemProperties = cls.loadClass("android.os.SystemProperties")
val paramTypes = String::class.java
val get = systemProperties.getMethod("get", paramTypes)
val version = get.invoke(systemProperties, *arrayOf<Any>("ro.fota.version")) as String
val version = get.invoke(systemProperties, "ro.fota.version") as String
return if (!version.trim().isNullOrEmpty()) version.trim() else ""
} catch (e: Exception) {
e.printStackTrace()

View File

@@ -3,7 +3,6 @@ package com.zhidao.roadcondition.util
import android.graphics.Bitmap
import android.media.MediaMetadataRetriever
import android.os.Environment
import android.util.Log
import okhttp3.MediaType
import okhttp3.MultipartBody
import okhttp3.RequestBody
@@ -14,21 +13,21 @@ import java.util.*
//创建文件上传请求体
fun fileToMultiPart(fileUrl: String): MultipartBody.Part? {
var file = File(fileUrl)
val file = File(fileUrl)
if (file.exists()) {
var requestBody = RequestBody.create(MediaType.parse("image/jpg"), file)
val requestBody = RequestBody.create(MediaType.parse("image/jpg"), file)
return MultipartBody.Part.createFormData("file", file.name, requestBody)
}
return null
}
fun deletePicFile(filePath: String?): Boolean {
var file = File(filePath)
val file = File(filePath)
if (file.exists()) {
//如果图片地址包含此路径则是C上面的拍照需要再删除后摄图片
if (filePath!!.contains("usbotg-1-1.1")) {
//将地址替换成后摄图片地址
var backFile =
val backFile =
File(filePath.replace("frontPic", "backPic").replace("PhotoFront", "PhotoBack"))
if (backFile.exists()) {
return backFile.delete()
@@ -64,7 +63,7 @@ fun deleteAllFile(file: File?) { //判断文件不为null或文件目录存在
//根据本地视频文件生成缩略图文件
fun getVideoThumbnail(filePath: String, picPath: String): Boolean {
var b: Bitmap? = null
var retriever = MediaMetadataRetriever()
val retriever = MediaMetadataRetriever()
try {
retriever.setDataSource(filePath)
b = retriever.getFrameAtTime(0)
@@ -92,7 +91,7 @@ fun bitmapToFile(bitmap: Bitmap?, filePath: String): Boolean {
file.delete()
file.createNewFile()
val fos = FileOutputStream(file)
var ins = ByteArrayInputStream(baos.toByteArray())
val ins = ByteArrayInputStream(baos.toByteArray())
var x = 0
val b = ByteArray(1024 * 100)
while ({ x = ins.read(b);x }() != -1) {
@@ -130,50 +129,4 @@ fun getCompressVideoPath(): String {
}
return destPath.absolutePath
}
/**
* 保存图片到本地
*/
fun saveImageToSdcard(bmp: Bitmap): Boolean {
val currentFile: File
var fos: FileOutputStream? = null
val picFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)
picFile.mkdirs()
val builder = StringBuilder()
builder.append("splash_bg")
val filePrefix = builder.toString()
val fileOut = ".jpg"
currentFile = File(picFile, filePrefix + fileOut)
try {
fos = FileOutputStream(currentFile)
bmp.compress(Bitmap.CompressFormat.JPEG, 100, fos)
fos.flush()
} catch (e: FileNotFoundException) {
e.printStackTrace()
return false
} catch (e: IOException) {
e.printStackTrace()
return false
} finally {
try {
fos?.close()
} catch (e: IOException) {
e.printStackTrace()
return false
}
}
return true
}
/**
* 获取本地保存的图片地址
*/
fun getImagePath(): String {
return "/mnt/sdcard/Pictures/splash_bg.jpg"
}
}

View File

@@ -11,7 +11,7 @@ import com.mogo.map.search.geo.query.MogoRegeocodeQuery
import com.mogo.module.common.MogoApisHandler
import com.zhidao.roadcondition.model.LocationInfo
private fun MogoRegeocodeAddress.toLocInfo(
private fun toLocInfo(
address: MogoRegeocodeAddress,
latlngPoint: MogoLatLng
): LocationInfo {
@@ -29,7 +29,7 @@ private fun MogoRegeocodeAddress.toLocInfo(
)
}
private fun MogoLocation.toLocInfo(location: MogoLocation): LocationInfo {
private fun toLocInfo(location: MogoLocation): LocationInfo {
return LocationInfo(
location.province,
location.cityName,
@@ -104,7 +104,7 @@ class LocationUtil private constructor() {
locationInfo!!
} else {
val location = MogoApisHandler.getInstance().apis.mapServiceApi.getSingletonLocationClient(mContext).lastKnowLocation
location.toLocInfo(location)
toLocInfo(location)
}
}
@@ -114,8 +114,8 @@ class LocationUtil private constructor() {
locGeoCode: (((locInfo: LocationInfo) -> Unit)),
onError: ((msg: String) -> Unit)
) {
var geocoderSearch = MogoApisHandler.getInstance().apis.mapServiceApi.getGeoSearch(AbsMogoApplication.getApp().applicationContext)
var regeocodeQuery = MogoRegeocodeQuery()
val geocoderSearch = MogoApisHandler.getInstance().apis.mapServiceApi.getGeoSearch(AbsMogoApplication.getApp().applicationContext)
val regeocodeQuery = MogoRegeocodeQuery()
regeocodeQuery.latlngType = ""
regeocodeQuery.point = latlngPoint
regeocodeQuery.radius = 200
@@ -126,13 +126,13 @@ class LocationUtil private constructor() {
override fun onRegeocodeSearched(regeocodeResult: MogoRegeocodeResult?) {
super.onRegeocodeSearched(regeocodeResult)
if( regeocodeResult == null ){
trackUploadGeo(3);
trackUploadGeo(3)
onError.invoke("geoCode")
} else {
trackUploadGeo(2);
var regeocodeAddress = regeocodeResult?.regeocodeAddress
trackUploadGeo(2)
val regeocodeAddress = regeocodeResult.regeocodeAddress
regeocodeAddress?.let {
var locInfo = regeocodeAddress.toLocInfo(regeocodeAddress, latlngPoint)
val locInfo = toLocInfo(regeocodeAddress, latlngPoint)
locGeoCode.invoke(locInfo)
}
}

View File

@@ -5,7 +5,6 @@ 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
@@ -13,16 +12,6 @@ import com.zhidao.roadcondition.model.proxy.INFO_TYPE_VIDEO
import com.zhidao.roadcondition.util.StrategyPreferenceUtil.Companion.getStrategyType
import com.zhidao.roadcondition.util.StrategyPreferenceUtil.Companion.getStrategyValidity
var array: Array<LocationInfo> = arrayOf(
LocationInfo(116.40320588562773, 39.96661385462713, "测试数据1", 123123213),
LocationInfo(116.41309250805662, 39.970285228355976, "测试数据2", 123123213),
LocationInfo(116.40749205563353, 39.97317943101997, "测试数据3", 12321321321),
LocationInfo(116.39925230953978, 39.97314654304226, "测试数据4", 123123123),
LocationInfo(116.439366, 39.868472, "测试数据5", 123123123),
LocationInfo(116.288164, 39.910547, "测试数据6", 123123123),
LocationInfo(116.330132, 39.989311, "测试数据7", 123123123)
)
fun getInformationBody(
types: Int,
urls: Map<String, String>,
@@ -37,21 +26,21 @@ fun getInformationBody(
speed: Float,
fromType: String
): InformationBody {
var jsonArray = JsonArray()
var type: Int
val jsonArray = JsonArray()
val type: Int
type = if (types == INFO_TYPE_VIDEO) {
var videoObject = JsonObject()
val videoObject = JsonObject()
videoObject.addProperty("thumbnail", urls["thumb"])
videoObject.addProperty("url", urls["video"])
jsonArray.add(videoObject)
INFO_TYPE_VIDEO
} else {
var urlObject = JsonObject()
val urlObject = JsonObject()
urlObject.addProperty("url", urls["pic"])
jsonArray.add(urlObject)
INFO_TYPE_IMG
}
var infoType = if (isCustom) 1 else 0
val infoType = if (isCustom) 1 else 0
Log.d("MainServiceController", "isCustom = $isCustom ---- infoType = $infoType")
return InformationBody(
jsonArray.toString(),

View File

@@ -1,123 +1,17 @@
package com.zhidao.roadcondition.util
import android.content.Context
import android.util.Log
import androidx.core.content.edit
import com.mogo.commons.AbsMogoApplication
import com.zhidao.roadcondition.aspect.DebugLog
const val FILE_NAME = "settings_data"
const val FILE_NAME_NAVI = "settings_navi_data"
const val FILE_NAME_ACTIVE = "settings_active_data"
const val NAVI_INFO = "NAVI_INFO" //沿途导航数据存储
const val NAVI_INFO_STATUS = "NAVI_INFO_STATUS" //沿途导航路线是否存在
const val PARAM_AUTHORIZATION = "PARAM_AUTHORIZATION"
const val PARAM_PROMOTION_CONTENT = "PARAM_PROMOTION_CONTENT"
const val PARAM_ACTIVE_WEB_URL = "PARAM_ACTIVE_WEB_URL"
const val PARAM_ACTIVE_IMG_URL = "PARAM_ACTIVE_IMG_URL"
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 = 10_000L //视频拍摄时长
const val PIC_NUMBER_DEFAULT = 1L //图片拍摄张数
const val TIME_QUANTUM = "time_quantum" //时间段
const val COUNT_DOWN_TIME = "count_down" //倒计时
const val VOICE_TEXT = "voice_text" //语音播报内容
const val IS_SAVE_SPLASH = "is_save_splash" //是否保存了
//播放开始时间
const val PLAYER_START_TIME = "first_time"
fun clearActiveInfo(context: Context = AbsMogoApplication.getApp().applicationContext) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME_ACTIVE, Context.MODE_PRIVATE)
sharedPreferences.edit {
clear()
val clearActiveInfo = commit()
Log.d(FILE_NAME_NAVI, "clearActiveInfo = $clearActiveInfo")
}
}
fun setActiveWebUrl(content: String, context: Context = AbsMogoApplication.getApp().applicationContext) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME_ACTIVE, Context.MODE_PRIVATE)
sharedPreferences.edit {
putString(PARAM_ACTIVE_WEB_URL, content)
.commit()
}
}
fun setActiveStatus(status: Int, context: Context = AbsMogoApplication.getApp().applicationContext) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME_ACTIVE, Context.MODE_PRIVATE)
sharedPreferences.edit {
putInt(PARAM_ACTIVE_STATUS, status)
.commit()
}
}
fun getActiveStatus(context: Context): Int {
return context.getSharedPreferences(FILE_NAME_ACTIVE, Context.MODE_PRIVATE)
.getInt(PARAM_ACTIVE_STATUS, 0)
}
fun setPromotionContent(content: String, context: Context = AbsMogoApplication.getApp().applicationContext) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putString(PARAM_PROMOTION_CONTENT, content)
.commit()
}
}
fun isAuthorization(context: Context): Boolean {
return context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
.getBoolean(PARAM_AUTHORIZATION, false)
}
@DebugLog
fun setAuthorization(context: Context, authorization: Boolean) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putBoolean(PARAM_AUTHORIZATION, authorization)
.commit()
}
}
@DebugLog
fun setNaviInfo(context: Context, naviInfo: String) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME_NAVI, Context.MODE_PRIVATE)
sharedPreferences.edit {
val naviInfoSave = putString(NAVI_INFO, naviInfo)
.commit()
Log.d(FILE_NAME_NAVI, "naviInfoSave = $naviInfoSave")
}
}
@DebugLog
fun setNaviInfoStatus(context: Context, naviInfoStatus: Boolean) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME_NAVI, Context.MODE_PRIVATE)
sharedPreferences.edit {
val naviInfoSaveStatus = putBoolean(NAVI_INFO_STATUS, naviInfoStatus)
.commit()
Log.d(FILE_NAME_NAVI, "naviInfoSaveStatus = $naviInfoSaveStatus")
}
}
fun clearAllNaviInfo(context: Context) {
var sharedPreferences = context.getSharedPreferences(FILE_NAME_NAVI, Context.MODE_PRIVATE)
sharedPreferences.edit {
clear()
val naviInfoAllClear = commit()
Log.d(FILE_NAME_NAVI, "naviInfoAllClear = $naviInfoAllClear")
}
}
fun putLong(key: String, value: Long) {
var sharedPreferences =
val sharedPreferences =
AbsMogoApplication.getApp().applicationContext.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putLong(key, value).apply()
@@ -129,42 +23,27 @@ fun getLong(key: String, defaultValue: Long): Long {
.getLong(key, defaultValue)
}
fun putInt(key: String, value: Int) {
var sharedPreferences =
val sharedPreferences =
AbsMogoApplication.getApp().applicationContext.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putInt(key, value).apply()
}
}
fun getInt(key: String, defaultValue: Int): Int {
return AbsMogoApplication.getApp().applicationContext.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
.getInt(key, defaultValue)
}
fun putCommonString(key: String, value: String) {
var sharedPreferences =
val sharedPreferences =
AbsMogoApplication.getApp().applicationContext.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putString(key, value).apply()
}
}
//fun getCommonString(key: String?, defaultValue: String?): String {
// return AbsMogoApplication.getApp().applicationContext.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
// .getString(key, defaultValue)
//}
//
//fun putCommonBoolean(key: String, value: Boolean) {
// var sharedPreferences =
// AbsMogoApplication.getApp().applicationContext.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
// sharedPreferences.edit {
// putBoolean(key, value).apply()
// }
//}
fun getCommonBoolean(key: String, defaultValue: Boolean): Boolean {
return AbsMogoApplication.getApp().applicationContext.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE)
.getBoolean(key, defaultValue)

View File

@@ -35,7 +35,7 @@ class StrategyPreferenceUtil {
companion object {
//保存策略类型在AccOff的时候清除数据更新时需要在没有情报上传时操作
fun setStrategyType(context: Context, strategyType: Int, type: String) {
var sharedPreferences =
val sharedPreferences =
context.getSharedPreferences(STRATEGY_TYPE_COPY, Context.MODE_PRIVATE)
sharedPreferences.edit {
putInt(STRATEGY_TYPE + type, strategyType).commit()
@@ -51,7 +51,7 @@ class StrategyPreferenceUtil {
}
fun clearStrategyType(context: Context) {
var sharedPreferences =
val sharedPreferences =
context.getSharedPreferences(STRATEGY_TYPE_COPY, Context.MODE_PRIVATE)
sharedPreferences.edit {
clear()
@@ -66,7 +66,7 @@ class StrategyPreferenceUtil {
infoType: String,
frequency: Int
) {
var sharedPreferences =
val sharedPreferences =
context.getSharedPreferences(STRATEGY_FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putInt(
@@ -98,7 +98,7 @@ class StrategyPreferenceUtil {
infoType: String,
interval: Long
) {
var sharedPreferences =
val sharedPreferences =
context.getSharedPreferences(STRATEGY_FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putLong(
@@ -130,7 +130,7 @@ class StrategyPreferenceUtil {
infoType: String,
validity: Int
) {
var sharedPreferences =
val sharedPreferences =
context.getSharedPreferences(STRATEGY_FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putInt(
@@ -154,7 +154,7 @@ class StrategyPreferenceUtil {
infoType: String,
maxSpeed: Int
) {
var sharedPreferences =
val sharedPreferences =
context.getSharedPreferences(STRATEGY_FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putInt(
@@ -178,7 +178,7 @@ class StrategyPreferenceUtil {
infoType: String,
minSpeed: Int
) {
var sharedPreferences =
val sharedPreferences =
context.getSharedPreferences(STRATEGY_FILE_NAME, Context.MODE_PRIVATE)
sharedPreferences.edit {
putInt(

View File

@@ -1,17 +0,0 @@
package com.zhidao.roadcondition.util
import android.text.format.DateFormat
const val format = "yy/MM/dd kk:mm:ss"
fun formatDate(time: Long): String {
return DateFormat.format(format, time).toString()
}
fun convertVar(param: Any?): Any? {
return if (param is String) {
"\"$param\""
} else {
param
}
}

View File

@@ -1,12 +0,0 @@
package com.zhidao.roadcondition.util
import android.content.Context
import android.content.Intent
fun isReiceverRegist(context: Context, intentAction: String): Boolean {
val intent = Intent()
intent.action = intentAction
val pm = context.packageManager
val resolveInfos = pm.queryBroadcastReceivers(intent, 0)
return resolveInfos != null && resolveInfos.isNotEmpty()
}

View File

@@ -54,7 +54,7 @@ public class AppsFragment extends MvpFragment< AppsView, AppsPresenter > impleme
mIndicator = findViewById( R.id.module_apps_id_indicator );
mIndicator.setOpenPadding( true );
ViewPagerSpeedScroller.attach(getContext(), mAppsPager, 1000);
// ViewPagerSpeedScroller.attach(getContext(), mAppsPager, 1000);
}
@NonNull

View File

@@ -22,7 +22,7 @@ enum AdasRecognizedType {
classIdTrafficSign( "traffic_sign", 5 ),
//bus
classIdTrafficBus( "traffic_bus", 6 ),
//track
//truck
classIdTrafficTruck( "traffic_truck", 8 );
AdasRecognizedType( int code ) {

View File

@@ -13,6 +13,7 @@ import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.R;
import com.mogo.module.common.constants.AdasRecognizedType;
import com.mogo.module.common.constants.DataTypes;
import com.mogo.service.adas.entity.ADASRecognizedListResult;
import com.mogo.utils.ViewUtils;
@@ -79,6 +80,12 @@ class AdasRecognizedResultDrawer extends BaseDrawer {
if ( recognizedListResult == null ) {
continue;
}
// 暂时只显示车辆
if ( isCarType( recognizedListResult.type ) ) {
continue;
}
IMogoMarker marker = null;
String uniqueKey = recognizedListResult.uuid;
if ( TextUtils.isEmpty( uniqueKey ) ) {

View File

@@ -2,6 +2,7 @@ package com.mogo.module.common.drawer;
import com.mogo.map.CoordinatesTransformer;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.constants.AdasRecognizedType;
import com.mogo.module.common.constants.CarModelType;
import com.mogo.module.common.constants.SafeType;
@@ -83,4 +84,14 @@ class BaseDrawer {
}
return mTransformer.transform( lat, lon );
}
protected boolean isCarType( int type ) {
AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom( type );
if ( recognizedType != AdasRecognizedType.classIdCar
|| recognizedType != AdasRecognizedType.classIdTrafficBus
|| recognizedType != AdasRecognizedType.classIdTrafficTruck ) {
return false;
}
return true;
}
}

View File

@@ -10,14 +10,18 @@ import android.widget.ImageView;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.map.MogoLatLng;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.MogoMarkerOptions;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.R;
import com.mogo.module.common.api.CallChatApi;
import com.mogo.module.common.constants.DataTypes;
import com.mogo.module.common.entity.CloudRoadData;
import com.mogo.module.common.entity.MogoSnapshotSetData;
import com.mogo.utils.ViewUtils;
import com.mogo.utils.logger.Logger;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
import com.zhidao.carchattingprovider.MogoDriverInfo;
import java.util.ArrayList;
import java.util.HashMap;
@@ -32,7 +36,7 @@ public
*
* 云端数据绘制
*/
class SnapshotSetDataDrawer extends BaseDrawer {
class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClickListener {
private static final String TAG = "SnapshotSetDataDrawer";
@@ -84,8 +88,7 @@ class SnapshotSetDataDrawer extends BaseDrawer {
boolean machineVision ) {
if ( data == null || (
( data.getAllList() == null || data.getAllList().isEmpty() ) &&
( data.getNearList() == null || data.getNearList().isEmpty() )
) ) {
( data.getNearList() == null || data.getNearList().isEmpty() ) ) ) {
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMarkerManager( AbsMogoApplication.getApp() ).removeMarkers( DataTypes.TYPE_MARKER_CLOUD_DATA );
return;
}
@@ -101,12 +104,21 @@ class SnapshotSetDataDrawer extends BaseDrawer {
mPurseCounter++;
if ( mPurseCounter >= 100 ) {
mPurseCounter = 0;
purgeCloudSnapshotData( allDatumsList );
}
purgeCloudSnapshotData( allDatumsList );
for ( CloudRoadData cloudRoadData : allDatumsList ) {
if ( cloudRoadData == null ) {
continue;
}
// 暂时只显示车辆
if ( TextUtils.isEmpty( cloudRoadData.getSn() ) ) {
if ( isCarType( cloudRoadData.getType() ) ) {
continue;
}
}
IMogoMarker marker = null;
String uniqueKey = cloudRoadData.getUniqueKey();
if ( TextUtils.isEmpty( uniqueKey ) ) {
@@ -121,6 +133,9 @@ class SnapshotSetDataDrawer extends BaseDrawer {
if ( marker == null ) {
continue;
}
if ( !TextUtils.isEmpty( cloudRoadData.getSn() ) ) {
bindClickListener( marker );
}
mCloudSnapshotMarkersCaches.put( uniqueKey, marker );
} else {
if ( mIsVrMode != MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
@@ -128,6 +143,7 @@ class SnapshotSetDataDrawer extends BaseDrawer {
if ( mIsVrMode ) {
marker.use3DResource( getVrModel( cloudRoadData ) );
} else {
marker.getMogoMarkerOptions().set3DMode( false );
marker.setIcon( ViewUtils.fromView( inflateView( cloudRoadData, machineVision, 0 ) ) );
}
}
@@ -142,7 +158,7 @@ class SnapshotSetDataDrawer extends BaseDrawer {
List< MogoLatLng > points = new ArrayList<>();
points.add( new MogoLatLng( lastPosition.lat, lastPosition.lon ) );
points.add( new MogoLatLng( target.lat, target.lon ) );
marker.startSmoothInMs( points, SystemClock.elapsedRealtime() - mLastReceiveTime );
marker.startSmoothInMs( points, 500L );
}
} else {
marker.setRotateAngle( 360 - ( float ) cloudRoadData.getHeading() );
@@ -154,6 +170,13 @@ class SnapshotSetDataDrawer extends BaseDrawer {
}
}
private void bindClickListener( IMogoMarker marker ) {
if ( marker == null || marker.isDestroyed() ) {
return;
}
marker.setOnMarkerClickListener( this );
}
/**
* 过滤本次数据中,不存在的 marker
*
@@ -206,6 +229,7 @@ class SnapshotSetDataDrawer extends BaseDrawer {
.owner( DataTypes.TYPE_MARKER_CLOUD_DATA )
.anchor( 0.5f, 0.5f )
.rotate( ( float ) data.getHeading() )
.object( data )
// .position( new MogoLatLng( coor[POS_LAT], coor[POS_LON] ) );
.position( new MogoLatLng( data.getLat(), data.getLon() ) );
if ( mIsVrMode = MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode() ) {
@@ -256,4 +280,32 @@ class SnapshotSetDataDrawer extends BaseDrawer {
return R.drawable.icon_map_marker_car_gray;
}
}
@Override
public boolean onMarkerClicked( IMogoMarker marker ) {
if ( marker != null && !marker.isDestroyed() ) {
if ( marker.getObject() instanceof CloudRoadData ) {
showCarCallPanel( ( ( CloudRoadData ) marker.getObject() ) );
}
}
return true;
}
private void showCarCallPanel( CloudRoadData data ) {
MogoDriverInfo driverInfo = new MogoDriverInfo();
driverInfo.setLat( data.getLat() );
driverInfo.setLon( data.getLon() );
driverInfo.setSn( data.getSn() );
ICarsChattingProvider carChatting = CallChatApi.getInstance().getApiProvider();
if ( carChatting != null ) {
try {
carChatting.showUserWindow( TAG, driverInfo, mContext );
} catch ( Exception e ) {
Logger.e( TAG, e, "showCarCallPanel" );
}
}
}
}

View File

@@ -22,6 +22,7 @@ import com.mogo.module.common.R;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.ViewUtils;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.storage.SharedPrefsMgr;
/**
* 自车图标工具类
@@ -44,6 +45,10 @@ public class MyLocationUtil {
private static final CarCursorOption DEFAULT_OPTION = new CarCursorOption.Builder()
.build();
public static void setMyLocationIconUrl(Context context){
setMyLocationIconUrl( context, SharedPrefsMgr.getInstance( context ).getString( "MY_LOCATION_CONFIG", "" ) );
}
public static void setMyLocationIconUrl(Context context, String url) {
if (url == null || url.isEmpty()) {
return;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1066,7 +1066,7 @@
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_bubble_width">100px</dimen>
<dimen name="module_service_marker_bubble_vr_width">55px</dimen>
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_bubble_height">130px</dimen>
<dimen name="module_service_marker_bubble_vr_height">69px</dimen>
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>
<dimen name="module_service_marker_bubble_icon_height">60px</dimen>

View File

@@ -49,6 +49,7 @@ import com.mogo.module.common.dialog.WMDialog;
import com.mogo.module.common.glide.SkinAbleBitmapTarget;
import com.mogo.module.common.map.CustomNaviInterrupter;
import com.mogo.module.common.map.MapCenterPointStrategy;
import com.mogo.module.common.map.MyLocationUtil;
import com.mogo.module.common.map.Scene;
import com.mogo.module.common.view.OnPreventFastClickListener;
import com.mogo.module.extensions.R;
@@ -344,6 +345,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
initDebugPanel();
// 根据本地配置设置自车图标
MyLocationUtil.setMyLocationIconUrl( getContext() );
}
private int debugPanelClickCount = 0;

View File

@@ -9,6 +9,7 @@ import com.mogo.map.navi.IMogoNavi;
import com.mogo.map.overlay.IMogoOverlayManager;
import com.mogo.map.search.geo.IMogoGeoSearch;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.analytics.IMogoAnalytics;
@@ -75,7 +76,7 @@ public class ExtensionServiceManager {
isInit = true;
mContext = context;
mMogoServiceApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context);
mMogoServiceApis = MogoApisHandler.getInstance().getApis();
mMapService = mMogoServiceApis.getMapServiceApi();
mImageLoader = mMogoServiceApis.getImageLoaderApi();

View File

@@ -28,9 +28,6 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
private MogoImageView mIvReportHead;
private ImageView pushVideoClose;
// 弹窗状态监听
// private CameraLiveWindowStatusListener mWindowStatusListener;
// 直播30秒自动关闭
private static Handler handlerV2XEvent = new Handler();
private static Runnable runnableV2XEvent;
@@ -84,9 +81,6 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
}
countDownV2XEvent(entity);
// if (mWindowStatusListener != null) {
// mWindowStatusListener.onViewShow();
// }
}
}
@@ -97,16 +91,6 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
@Override
public void close() {
// 修改地图比例
// V2XServiceManager.getMoGoStatusManager().setUserInteractionStatus(MODULE_NAME, true, false);
// 锁车就是将地图视图移植中心点,因为行驶中的车和地图要相对的跟随
// MarkerUtils.resetMapZoom(16);
// 如果窗体处于展示的时候
// if (mWindowStatusListener != null) {
// mWindowStatusListener.onViewClose();
// }
// 停止倒计时
if (handlerV2XEvent != null && runnableV2XEvent != null) {
handlerV2XEvent.removeCallbacks(runnableV2XEvent);
@@ -119,12 +103,6 @@ public class PushCameraLiveWindow extends RelativeLayout implements ICameraWindo
.removeView(this);
}
// @Override
// public void setWindowStatusListener(CameraLiveWindowStatusListener listener) {
// this.mWindowStatusListener = listener;
// }
/**
* 窗体倒计时 TODO
*/

View File

@@ -25,10 +25,10 @@ import com.mogo.utils.logger.Logger;
/**
* vr模式下红绿灯消息 AdasNoticeHelper
* vr模式下摄像头消息 AdasNoticeHelper
*/
public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<MogoSnapshotSetData> {
private static final String TAG = "liyz";
private static final String TAG = "CameraLiveNoticeHelper";
private Context mContext;
private static IMogoMarker mMogoMarker;
private CloudRoadData mCloudRoadData;
@@ -47,7 +47,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
.getMogoRegisterCenter().registerMogoMarkerClickListener(PushDataType.TYPE_PUSH_CAMERA_DATA, new IMogoMarkerClickListener() {
@Override
public boolean onMarkerClicked(IMogoMarker marker) {
//点击的marker的具体数据
//点击的marker的具体数据 TODO
if (mCloudRoadData != null && !TextUtils.isEmpty(mCloudRoadData.getRtmpUrl())) {
CameraLiveManager.getInstance().init(mCloudRoadData);
} else {
@@ -84,22 +84,23 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
*/
private void addVrCameraMarker(CloudRoadData roadData) {
Logger.d(TAG, "addVrCameraMarker --lat = " + roadData.getLat() + "--lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
Log.d("lixp", "addVrCameraMarker --lat = " + roadData.getLat() + "--lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
removeCameraMarker();
MogoMarkerOptions options = new MogoMarkerOptions()
.object(roadData)
.latitude(roadData.getLat())
.longitude(roadData.getLon());
options.anchor(0.5f, 0.5f);
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
removeCameraMarker();
MogoMarkerOptions options = new MogoMarkerOptions()
.object(roadData)
.latitude(roadData.getLat())
.longitude(roadData.getLon());
options.anchor(0.5f, 0.5f);
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_space, null);
options.icon(bitmap);
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
if (mMogoMarker != null) {
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), options));
mMogoMarker.showInfoWindow();
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_space, null);
options.icon(bitmap);
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
if (mMogoMarker != null) {
mMogoMarker.setInfoWindowAdapter(new CameraWindow3DAdapter(AbsMogoApplication.getApp(), options));
mMogoMarker.showInfoWindow();
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
}
}
}
@@ -110,22 +111,22 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
*/
private void addNormalCameraMarker(CloudRoadData roadData) {
Logger.d(TAG, "addNormalCameraMarker --lat = " + roadData.getLat() + " --lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
Log.d("lixp", "addNormalCameraMarker --lat = " + roadData.getLat() + " --lon =" + roadData.getLon() + "--uuid = " + roadData.getUuid() + "---rtmpUrl =" + roadData.getRtmpUrl());
removeCameraMarker();
mMogoMarker.hideInfoWindow();
if (!TextUtils.isEmpty(roadData.getRtmpUrl())) {
removeCameraMarker();
mMogoMarker.hideInfoWindow();
MogoMarkerOptions options = new MogoMarkerOptions()
.object(roadData)
.latitude(roadData.getLat())
.longitude(roadData.getLon());
options.anchor(0.5f, 0.5f);
MogoMarkerOptions options = new MogoMarkerOptions()
.object(roadData)
.latitude(roadData.getLat())
.longitude(roadData.getLon());
options.anchor(0.5f, 0.5f);
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.module_camera_normal_traffic, null);
options.icon(bitmap);
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
if (mMogoMarker != null) {
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.module_camera_normal_traffic, null);
options.icon(bitmap);
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
if (mMogoMarker != null) {
mMogoMarker.setOwner(PushDataType.TYPE_PUSH_CAMERA_DATA);
}
}
}
@@ -152,28 +153,32 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
public void onMsgReceived(MogoSnapshotSetData obj) {
Logger.d(TAG, "onMsgReceived cameralive : " + obj);
if (obj != null) {
mCloudRoadData = obj.getCamera();
if (mCloudRoadData != null) {
Logger.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl() + "--- isVrMode = " + isVrMode + ">>>>mCurrentUuid = " + mCurrentUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid());
if (obj.getCamera() != null && !TextUtils.isEmpty(obj.getCamera().getRtmpUrl())) {
mCloudRoadData = obj.getCamera();
Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl() + "--- isVrMode = " + isVrMode + ">>>>mCurrentUuid = " + mCurrentUuid + ">>>mCloudRoadData.getUuid() = " + mCloudRoadData.getUuid());
if (TextUtils.equals(mCurrentUuid, mCloudRoadData.getUuid())) {
if (isVrMode == isVrModeMarker) {
// do nothing.
Log.e(TAG, "-------------1------------");
} else {
if (isVrMode) {
addVrCameraMarker(mCloudRoadData);
isVrModeMarker = true;
Log.d(TAG, "-------------2------------");
} else {
addNormalCameraMarker(mCloudRoadData);
Log.d(TAG, "-------------3------------");
isVrModeMarker = false;
}
}
} else {
Logger.d(TAG, "mCurrentUuid != ----------");
mCurrentUuid = mCloudRoadData.getUuid();
if (isVrMode) {
if (isVrMode) { //TODO 是否需要延迟
Log.d(TAG, "-------------4------------");
addVrCameraMarker(mCloudRoadData);
isVrModeMarker = true;
} else {
Log.d(TAG, "-------------5------------");
addNormalCameraMarker(mCloudRoadData);
isVrModeMarker = false;
}

View File

@@ -88,7 +88,7 @@
<!-- module_map_layout_navi_info_panel.xml-->
<dimen name="module_ext_top_view_width">1058px</dimen>
<dimen name="module_ext_top_view_width_in_vr_mode">760px</dimen>
<dimen name="module_ext_top_view_width_in_vr_mode">822px</dimen>
<dimen name="module_ext_top_view_no_link_width_in_vr_mode">700px</dimen>
<dimen name="module_ext_navi_info_panel_width">544px</dimen>
<dimen name="module_ext_navi_info_panel_height">117px</dimen>

View File

@@ -3,7 +3,6 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.alibaba.arouter'
apply plugin: 'kotlin-kapt'
apply plugin: 'android-aspectjx'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
@@ -51,7 +50,6 @@ dependencies {
implementation rootProject.ext.dependencies.androidxviewpager2
implementation rootProject.ext.dependencies.arouter
kapt rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.aspectj
implementation rootProject.ext.dependencies.indicator
if (Boolean.valueOf(RELEASE)) {

View File

@@ -13,10 +13,8 @@ import com.mogo.map.MogoMapView;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.map.MyLocationUtil;
import com.mogo.service.map.IMogoMapFrameController;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
/**
* @author congtaowang
@@ -71,8 +69,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
mMogoMap.getUIController().showMyLocation( true );
mMogoMap.getUIController().recoverLockMode();// 启动锁车
}
// 根据本地配置设置自车图标
MyLocationUtil.setMyLocationIconUrl( getContext(), SharedPrefsMgr.getInstance( getContext() ).getString( "MY_LOCATION_CONFIG", "" ) );
}
@NonNull

View File

@@ -150,7 +150,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener {
mPauseImage = mWindowView.findViewById(R.id.window_play_pause_new);
if (mPauseImage != null) {
mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause);
mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause_new);
}
int yPos =
@@ -294,7 +294,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener {
if( mMediaInfoData.getPlayState() == MusicConstant.PLAY_STATE_PLAYING) {
// kw音乐做的容错
if (mPauseImage != null) {
mPauseImage.setImageResource(R.drawable.module_media_window_pop_play);
mPauseImage.setImageResource(R.drawable.module_media_window_pop_play_new);
}
if (mAnimCircleImageView != null) {
mAnimCircleImageView.startAnim();
@@ -314,7 +314,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener {
// GlideApp.with(mContext).applyDefaultRequestOptions(options).load(mMediaInfoData.getMediaImg()).into(new SkinAbleBitmapTarget(mCircleImg, options));
}else{
Logger.e(TAG, "mMediaInfoData == null ");
mAnimCircleImageView.setImageResource(R.drawable.module_media_default_music_img);
mAnimCircleImageView.setImageResource(R.drawable.module_media_default_music_img_new);
}
}
} else {
@@ -371,7 +371,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener {
updateWindowUI(false);
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
if (mPauseImage != null) {
mPauseImage.setImageResource(R.drawable.module_media_window_pop_play);
mPauseImage.setImageResource(R.drawable.module_media_window_pop_play_new);
}
if (mAnimCircleImageView != null) {
@@ -396,7 +396,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener {
Log.d(TAG, "onMusicPause: ===" + mMediaInfoData);
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
if (mPauseImage != null) {
mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause);
mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause_new);
}
if (mAnimCircleImageView != null) {
@@ -421,7 +421,7 @@ public class MediaWindow2 implements IMusicView , IMogoStatusChangedListener {
Log.d(TAG, "onMusicStopped===" + mMediaInfoData);
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
if (mPauseImage != null) {
mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause);
mPauseImage.setImageResource(R.drawable.module_media_window_pop_pause_new);
}
if (mAnimCircleImageView != null) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -32,7 +32,8 @@
android:id="@+id/window_circle_img_new"
android:layout_width="@dimen/module_media_pop_window_anim_img_size_new"
android:layout_height="@dimen/module_media_pop_window_anim_img_size_new"
android:src="@drawable/module_media_default_music_img"
android:src="@drawable/module_media_default_music_img_new"
android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
@@ -43,7 +44,7 @@
android:layout_width="@dimen/module_media_pop_window_pause"
android:layout_height="@dimen/module_media_pop_window_pause"
android:background="@drawable/module_media_play_bg_selector"
android:src="@drawable/module_media_window_pop_play"
android:src="@drawable/module_media_window_pop_play_new"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"

View File

@@ -71,7 +71,7 @@
<dimen name="module_media_pop_window_anim_img_size">80px</dimen>
<dimen name="module_media_pop_window_anim_img_size_new">101px</dimen>
<dimen name="module_media_pop_window_pause">60px</dimen>
<dimen name="module_media_pop_window_size">116px</dimen>
<dimen name="module_media_pop_window_size">115px</dimen>
<dimen name="module_media_pop_window_text_width">230px</dimen>
<dimen name="module_media_pop_window_text_margin">14px</dimen>
<dimen name="module_media_pop_window_text_top_size">35px</dimen>

View File

@@ -3,5 +3,7 @@
<color name="modules_media_music_title_text_color">#fff</color>
<color name="modules_media_music_time_text_color">#7affffff</color>
<color name="modules_media_music_bg_color">#444E6E</color>
<color name="modules_media_music_circle_color">#80ffffff</color>
<color name="modules_media_music_circle_color">#f6ffffff</color>
<color name="modules_media_music_circle_color_start">#1Affffff</color>
<color name="modules_media_music_circle_color_end">#ffffff</color>
</resources>

View File

@@ -59,6 +59,7 @@ public class MogoRTKLocation {
}
private void sendLocationData() {
if (rtkLocationListener != null) {
List<CloudLocationInfo> list = new ArrayList<>(cacheList);
rtkLocationListener.onLocationChanged(list);

View File

@@ -102,6 +102,12 @@ class SnapshotUploadInTime implements MogoRTKLocation.RTKLocationListener {
content.self = locationResult;
content.adas = recognizedResults;
if ( content.self == null &&
( content.adas == null || content.adas.isEmpty() ) ) {
return;
}
MarkerServiceHandler.getApis().getWebSocketManagerApi( mContext ).sendMsg( content, new IMogoOnWebSocketMessageListener() {
@Override
public WebSocketMsgType getDownLinkType() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

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