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

# Conflicts:
#	modules/mogo-module-service/src/main/java/com/mogo/module/service/ttsConfig/TtsConfigProvider.java
This commit is contained in:
wangcongtao
2020-11-20 09:53:42 +08:00
589 changed files with 14439 additions and 504 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" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -342,8 +342,8 @@ dependencies {
debugImplementation rootProject.ext.dependencies.debugleakcanary
releaseImplementation rootProject.ext.dependencies.releaseleakcanary
implementation rootProject.ext.dependencies.carcallprovider
implementation rootProject.ext.dependencies.carcall
implementation rootProject.ext.dependencies.callchatprovider
implementation rootProject.ext.dependencies.callchat
implementation rootProject.ext.dependencies.mogologlib
compileOnly rootProject.ext.dependencies.adasapi

View File

@@ -3,9 +3,9 @@
project.dependencies {
if (Boolean.valueOf(RELEASE)) {
d82xImplementation rootProject.ext.dependencies.moduleleftpanel
em1Implementation rootProject.ext.dependencies.moduleleftpanel
bydautoImplementation rootProject.ext.dependencies.moduleleftpanel
em1Implementation rootProject.ext.dependencies.moduleleftpanelnoop
d8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop
d80xImplementation rootProject.ext.dependencies.moduleleftpanelnoop
em4Implementation rootProject.ext.dependencies.moduleleftpanelnoop
@@ -16,9 +16,9 @@ project.dependencies {
em3Implementation rootProject.ext.dependencies.moduleleftpanelnoop
} else {
d82xImplementation project(':modules:mogo-module-left-panel')
em1Implementation project(':modules:mogo-module-left-panel')
bydautoImplementation project(':modules:mogo-module-left-panel')
em1Implementation project(':modules:mogo-module-left-panel-noop')
d8xxImplementation project(':modules:mogo-module-left-panel-noop')
d80xImplementation project(':modules:mogo-module-left-panel-noop')
em4Implementation project(':modules:mogo-module-left-panel-noop')

View File

@@ -108,6 +108,9 @@ targetSdkVersion : 22,
moduleextensions : "com.mogo.module:module-extensions:${MOGO_MODULE_EXTENSIONS_VERSION}",
carcall : "com.mogo.module.carchatting:module-carchatting:${CARCHATTING_VERSION}",
carcallprovider : "com.mogo.module.carchatting:module-carchatting-provider:${CARCHATTINGPROVIDER_VERSION}",
callchat : "com.mogo.module.carchatout:module-carchatting:1.4.8",
callchatprovider : "com.mogo.module.carchatout:module-carchatting-provider:1.0.6",
guideshow : "com.mogo.module:module-guide:${MOGO_MODULE_GUIDESHOW_VERSION}",
// V2X
moduleV2x : "com.mogo.module:module-v2x:${MOGO_MODULE_V2X_VERSION}",
@@ -154,7 +157,7 @@ targetSdkVersion : 22,
gpssimulatordebug : "com.mogo.module:module-gps-simulator-debug:${MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION}",
gpssimulatornoop : "com.mogo.module:module-gps-simulator-noop:${MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION}",
adasapi : "com.zhidao.autopilot.support:adas:1.0.6.3",
adasapi : "com.zhidao.autopilot.support:adas:1.0.6.5",
adasconfigapi : "com.zhidao.adasconfig:adasconfig:1.1.5",
// 个人中心的SDK

View File

@@ -1,25 +1,17 @@
package com.mogo.map.impl.amap;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.os.Bundle;
import android.os.Looper;
import android.os.SystemClock;
import android.os.Trace;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.Interpolator;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.amap.api.maps.AMap;
import com.amap.api.maps.AMapUtils;
@@ -33,15 +25,13 @@ import com.amap.api.maps.model.MyLocationStyle;
import com.amap.api.maps.model.Poi;
import com.amap.api.maps.model.Polyline;
import com.amap.api.maps.model.animation.Animation;
import com.amap.api.maps.model.animation.ScaleAnimation;
import com.amap.api.maps.model.animation.TranslateAnimation;
import com.amap.api.navi.AMapNaviView;
import com.amap.api.navi.AMapNaviViewListener;
import com.amap.api.navi.AMapNaviViewOptions;
import com.amap.api.navi.enums.AMapNaviViewShowMode;
import com.amap.api.navi.model.NaviInfo;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.transition.Transition;
import com.mogo.map.IMogoMap;
import com.mogo.map.IMogoMapView;
import com.mogo.map.MogoLatLng;
@@ -60,11 +50,8 @@ import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.map.uicontroller.MapCameraPosition;
import com.mogo.map.uicontroller.MapControlResult;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.WindowUtils;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
import java.util.List;
@@ -85,7 +72,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
AMapNaviViewListener,
AMapMessageListener,
AMap.OnCameraChangeListener,
AMap.OnMyLocationChangeListener {
AMap.OnMyLocationChangeListener{
private static final String TAG = "AMapNaviViewWrapper";
@@ -134,7 +121,6 @@ public class AMapNaviViewWrapper implements IMogoMapView,
// 设置路线相关的配置属性,如:路线的路况颜色,路线上是否显示摄像头气泡等。
// options.setRouteOverlayOptions( MapStyleUtils.getRouteOverlayOptions() );
// 设置自车的图片对象
checkDefaultOption();
options.setCarBitmap( BitmapFactory.decodeResource( getContext().getResources(), DEFAULT_OPTION.getNaviCursorRes() ) );
// 设置指南针图标否在导航界面显示默认显示。true显示false隐藏。
options.setCompassEnabled( false );
@@ -562,12 +548,40 @@ public class AMapNaviViewWrapper implements IMogoMapView,
mMapView.getMap().setMyLocationStyle( style );
if ( visible ) {
// 强制刷新一遍车标
setCarCursorOption(null);
setCarCursorOption(mCarCursorOption);
// style.myLocationIcon( BitmapDescriptorFactory.fromResource( mCarCursorOption.getCarCursorRes() ) );
}
}
}
@Override
public void emphasizeMyLocation() {
if (mMyLocationMarker == null) {
initMyLocationMarker();
}
ScaleAnimation animation = new ScaleAnimation(1f, 1.2f, 1f, 1.2f);
animation.setDuration(250);
mMyLocationMarker.setAnimation(animation);
// mMyLocationMarker.setAnimationListener(new Animation.AnimationListener() {
// @Override
// public void onAnimationStart() {
//
// }
//
// @Override
// public void onAnimationEnd() {
// mMyLocationMarker.setAnimationListener(null);
// ScaleAnimation animation = new ScaleAnimation(1.5f, 1f, 1.5f, 1f);
// animation.setDuration(250);
// mMyLocationMarker.setAnimation(animation);
// mMyLocationMarker.startAnimation();
// }
// });
mMyLocationMarker.startAnimation();
}
@Override
public void showMyLocation( View view ) {
if ( NaviClient.getInstance( getContext() ).isNaviing() ) {
@@ -928,40 +942,25 @@ public class AMapNaviViewWrapper implements IMogoMapView,
return mIsCarLocked;
}
private String myLocationConfigCache = null;
private boolean isUseDefaultOption = false;
private void checkDefaultOption(){
String myLocationConfig = SharedPrefsMgr.getInstance(getContext()).getString(
"MY_LOCATION_CONFIG", "");
if (myLocationConfigCache == null || !myLocationConfigCache.equals(myLocationConfig)) {
// 内存缓存的地址为空,或者内存缓存的地址和sp保存的config不一致那得重新获取bitmap
myLocationConfigCache = myLocationConfig;
loadMyLocationIcon(myLocationConfig);
}
}
@Override
public void setCarCursorOption( CarCursorOption option ) {
if (!isVisible) {
// 当前自车图标没有显示,所以先不走下面的流程
return;
}
if ( mCarCursorOption != null && mCarCursorOption != DEFAULT_OPTION ) {
mCarCursorOption.destroy();
}
checkDefaultOption();
if ( option != null ) {
try {
isUseDefaultOption = false;
mCarCursorOption = option.clone();
} catch ( Exception e ) {
isUseDefaultOption = true;
// if ( mCarCursorOption != null && mCarCursorOption != DEFAULT_OPTION) {
// mCarCursorOption.destroy();
// }
if(option != mCarCursorOption) {
if (option != null) {
try {
mCarCursorOption = option.clone();
} catch (Exception e) {
mCarCursorOption = DEFAULT_OPTION;
}
} else {
mCarCursorOption = DEFAULT_OPTION;
}
} else {
isUseDefaultOption = true;
mCarCursorOption = DEFAULT_OPTION;
}
if ( !checkAMapView() ) {
return;
@@ -1019,55 +1018,4 @@ public class AMapNaviViewWrapper implements IMogoMapView,
mMapView.getMap().moveCamera( CameraUpdateFactory.changeBearing( bearing ) );
}
}
protected void loadMyLocationIcon(String url) {
if ( Looper.myLooper() != Looper.getMainLooper() ) {
UiThreadHandler.post( ()-> loadMyLocationIconInUiThread(url));
} else {
loadMyLocationIconInUiThread(url);
}
}
private void loadMyLocationIconInUiThread(String url) {
if (!url.isEmpty()) {
RequestOptions options = new RequestOptions()
.placeholder( DEFAULT_OPTION.getCarCursorRes() )
.error( DEFAULT_OPTION.getCarCursorRes() )
.dontAnimate();
GlideApp.with( getContext() )
.asBitmap()
.load( url )
.apply( options )
.into( new SimpleTarget< Bitmap >() {
@Override
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition< ? super Bitmap > transition ) {
if (isUseDefaultOption) {
DEFAULT_OPTION.setCarCursorBmp(inflateMyLocation(resource));
setCarCursorOption(null);
}
}
@Override
public void onLoadStarted( @Nullable Drawable placeholder ) {
}
@Override
public void onLoadCleared( @Nullable Drawable placeholder ) {
}
@Override
public void onLoadFailed( @Nullable Drawable errorDrawable ) {
}
} );
}
}
private Bitmap inflateMyLocation(Bitmap res) {
View root =
LayoutInflater.from(getContext()).inflate(R.layout.module_map_amap_my_location, null, false);
ImageView iv = root.findViewById(R.id.module_map_amap_my_location_iv);
iv.setImageBitmap(res);
return BitmapDescriptorFactory.fromView(root).getBitmap();
}
}

View File

@@ -426,6 +426,11 @@ public class AMapViewWrapper implements IMogoMapView,
}
}
@Override
public void emphasizeMyLocation() {
// 空实现
}
@Override
public void showMyLocation( View view ) {
if ( NaviClient.getInstance( getContext() ).isNaviing() ) {

View File

@@ -99,6 +99,13 @@ public class AMapUIController implements IMogoMapUIController {
}
}
@Override
public void emphasizeMyLocation() {
if ( mClient != null ) {
mClient.emphasizeMyLocation();
}
}
@Override
public void showMyLocation( View view ) {
if ( mClient != null ) {

View File

@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView
android:id="@+id/module_map_amap_my_location_bg_iv"
android:layout_width="@dimen/module_map_amap_my_location_bg_size"
android:layout_height="@dimen/module_map_amap_my_location_bg_size"
android:src="@drawable/map_api_ic_current_location2"/>
<ImageView
android:id="@+id/module_map_amap_my_location_iv"
android:layout_width="@dimen/module_map_amap_my_location_size"
android:layout_height="@dimen/module_map_amap_my_location_size" />
android:layout_width="@dimen/module_map_amap_my_location_icon_width"
android:layout_height="@dimen/module_map_amap_my_location_icon_height"
android:layout_gravity="center"
android:src="@drawable/module_map_amap_my_location_icon"/>
</FrameLayout>

View File

@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_map_amap_my_location_size">370px</dimen>
<dimen name="module_map_amap_my_location_bg_size">370px</dimen>
<dimen name="module_map_amap_my_location_icon_width">78px</dimen>
<dimen name="module_map_amap_my_location_icon_height">120px</dimen>
</resources>

View File

@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="path_width">60px</dimen>
<dimen name="module_map_amap_my_location_size">146px</dimen>
<dimen name="module_map_amap_my_location_icon_width">44px</dimen>
<dimen name="module_map_amap_my_location_icon_height">66px</dimen>
<dimen name="module_map_amap_my_location_bg_size">146px</dimen>
</resources>

View File

@@ -71,6 +71,11 @@ public interface IMogoMapUIController {
*/
void showMyLocation( View view );
/**
* 强调自车位置,加个动画突显一下自车位置
*/
void emphasizeMyLocation();
/**
* 以外部定位的方式改变当前位置
*

View File

@@ -92,6 +92,13 @@ public class MogoMapUIController implements IMogoMapUIController {
}
}
@Override
public void emphasizeMyLocation() {
if ( mDelegate != null ) {
mDelegate.emphasizeMyLocation();
}
}
@Override
public void showMyLocation( View view ) {
if ( mDelegate != null ) {

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.share.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 = false;
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 = "release";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "2.0.1";
}

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="2.0.1" >
<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":"2.0.1","enabled":true,"outputFile":"mogo-tanlu-api-release.aar","fullName":"release","baseName":"release"},"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="release" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\src\release\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="release" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\src\release\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\release\compileReleaseShaders\out"/></dataSet><dataSet config="release" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\src\release\assets"/></dataSet></merger>

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\release"/><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\build\generated\res\resValues\release"/></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\release"/><source path="F:\Station\Launcher\libraries\mogo-tanlu-api\build\generated\res\resValues\release"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="release$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\release\res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="release" generated-set="release$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\release\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="2.0.1" >
<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="2.0.1" >
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":"2.0.1","enabled":true,"outputFile":"mogo-tanlu-api-release.aar","fullName":"release","baseName":"release"},"path":"..\\..\\library_manifest\\release\\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

@@ -178,7 +178,7 @@ class CosStatusController : CosStatusCallback {
latitude: Double,
speed: Float
) {
Log.d(TAG, "sendInformationDirectly poiType= $poiType ---- mainInfoId= $mainInfoId")
Log.d(TAG, "sendInformationDirectly poiType= $poiType ---- mainInfoId= $mainInfoId --- isCustom = ${entity?.isCustom}")
//开始上传
entity?.isCustom?.let {
mainServiceHttpModel.sendInformationMessage(

View File

@@ -1,5 +1,6 @@
package com.zhidao.roadcondition.util
import android.util.Log
import com.google.gson.JsonArray
import com.google.gson.JsonObject
import com.mogo.commons.AbsMogoApplication
@@ -51,6 +52,7 @@ fun getInformationBody(
INFO_TYPE_IMG
}
var infoType = if (isCustom) 1 else 0
Log.d("MainServiceController", "isCustom = $isCustom ---- infoType = $infoType")
return InformationBody(
jsonArray.toString(),
locationInfo.address,

View File

@@ -33,7 +33,7 @@ dependencies {
implementation rootProject.ext.dependencies.androidxrecyclerview
implementation rootProject.ext.dependencies.androidxconstraintlayout
implementation rootProject.ext.dependencies.arouter
implementation rootProject.ext.dependencies.carcallprovider
implementation rootProject.ext.dependencies.callchatprovider
if (Boolean.valueOf(RELEASE)) {
api rootProject.ext.dependencies.mogomap
api rootProject.ext.dependencies.mogomapapi

View File

@@ -3,9 +3,9 @@ package com.mogo.module.common.api;
import android.content.Context;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.module.carchattingprovider.ICarsChattingProvider;
import com.mogo.module.common.entity.MarkerOnlineCar;
import com.mogo.utils.logger.Logger;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
import com.zhidao.carchattingprovider.MogoDriverInfo;
public

View File

@@ -12,5 +12,47 @@ public class OwnCarModelEntity {
private int isLock;
private String imageUrl;
private String imageName;
private int level;
private int imageLevel;
public int getIsLock() {
return isLock;
}
public void setIsLock(int isLock) {
this.isLock = isLock;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public String getImageName() {
return imageName;
}
public void setImageName(String imageName) {
this.imageName = imageName;
}
public int getImageLevel() {
return imageLevel;
}
public void setImageLevel(int imageLevel) {
this.imageLevel = imageLevel;
}
@Override
public String toString() {
return "OwnCarModelEntity{" +
"isLock=" + isLock +
", imageUrl='" + imageUrl + '\'' +
", imageName='" + imageName + '\'' +
", imageLevel=" + imageLevel +
'}';
}
}

View File

@@ -0,0 +1,107 @@
package com.mogo.module.common.map;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Looper;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.amap.api.maps.model.BitmapDescriptorFactory;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.transition.Transition;
import com.mogo.map.uicontroller.CarCursorOption;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.R;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.glide.GlideApp;
/**
* 自车图标工具类
*
* @author tongchenfei
*/
public class MyLocationUtil {
private static boolean isLoadingIcon = false;
private static boolean needEmphasizeMyLocation = false;
public static void emphasizeMyLocation(){
if (!isLoadingIcon) {
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().emphasizeMyLocation();
}else{
needEmphasizeMyLocation = true;
}
}
private static final CarCursorOption DEFAULT_OPTION = new CarCursorOption.Builder()
.build();
public static void setMyLocationIconUrl(Context context, String url) {
if (url == null || url.isEmpty()) {
return;
}
if (Looper.myLooper() != Looper.getMainLooper()) {
UiThreadHandler.post(() -> loadMyLocationIconInUiThread(context, url));
} else {
loadMyLocationIconInUiThread(context, url);
}
}
private static void loadMyLocationIconInUiThread(Context context, String url) {
if (!url.isEmpty()) {
isLoadingIcon = true;
RequestOptions options = new RequestOptions()
.placeholder(DEFAULT_OPTION.getCarCursorRes())
.error(DEFAULT_OPTION.getCarCursorRes())
.dontAnimate();
GlideApp.with(context)
.asBitmap()
.load(url)
.apply(options)
.into(new SimpleTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull Bitmap resource,
@Nullable Transition<? super Bitmap> transition) {
DEFAULT_OPTION.setCarCursorBmp(inflateMyLocation(context, resource));
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().setCarCursorOption(DEFAULT_OPTION);
if (needEmphasizeMyLocation) {
needEmphasizeMyLocation = false;
MogoApisHandler.getInstance().getApis().getMapServiceApi().getMapUIController().emphasizeMyLocation();
}
isLoadingIcon = false;
}
@Override
public void onLoadStarted(@Nullable Drawable placeholder) {
}
@Override
public void onLoadCleared(@Nullable Drawable placeholder) {
}
@Override
public void onLoadFailed(@Nullable Drawable errorDrawable) {
}
});
}
}
private static Bitmap inflateMyLocation(Context context, Bitmap res) {
if (res == null) {
throw new IllegalArgumentException("inflate myLocation bitmap can not be null!");
}
View root =
LayoutInflater.from(context).inflate(R.layout.module_map_amap_my_location, null, false);
ImageView iv =
root.findViewById(R.id.module_map_amap_my_location_iv);
iv.setImageBitmap(res);
return BitmapDescriptorFactory.fromView(root).getBitmap();
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content">
<ImageView
android:id="@+id/module_map_amap_my_location_bg_iv"
android:layout_width="@dimen/module_map_amap_my_location_bg_size"
android:layout_height="@dimen/module_map_amap_my_location_bg_size"
android:src="@drawable/map_api_ic_current_location2"/>
<ImageView
android:id="@+id/module_map_amap_my_location_iv"
android:layout_width="@dimen/module_map_amap_my_location_icon_width"
android:layout_height="@dimen/module_map_amap_my_location_icon_height"
android:layout_gravity="center"
android:src="@drawable/module_map_amap_my_location_icon"/>
</FrameLayout>

View File

@@ -1060,6 +1060,6 @@
<dimen name="v2x_share_btn_width">281px</dimen>
<dimen name="v2x_share_btn_height">90px</dimen>
<dimen name="share_item_address">32px</dimen>
<dimen name="panel_list_item_title_size">28px</dimen>
<dimen name="panel_list_item_title_size">26px</dimen>
</resources>

View File

@@ -1,11 +1,15 @@
package com.mogo.module.extensions.entrance;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Debug;
import android.os.Handler;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -22,6 +26,7 @@ import androidx.constraintlayout.widget.ConstraintSet;
import androidx.constraintlayout.widget.Group;
import com.alibaba.android.arouter.launcher.ARouter;
import com.amap.api.maps.model.MyLocationStyle;
import com.bumptech.glide.request.RequestOptions;
import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.debug.DebugConfig;
@@ -43,6 +48,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.ExtensionsModuleConst;
@@ -190,7 +196,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
@Override
protected int getLayoutId() {
return R.layout.module_ext_layout_entrance;
if(DebugConfig.isMapBased()) {
return R.layout.module_ext_layout_entrance;
}else{
return R.layout.module_ext_layout_entrance_no_map;
}
}
@Override
@@ -850,15 +860,24 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
private void debugTopView() {
findViewById(R.id.btnDebugCtrlNaviView).setOnClickListener(view -> {
if (!toggle) {
TopViewAnimHelper.getInstance().showNaviView();
} else {
TopViewAnimHelper.getInstance().hideNaviView();
}
toggle = !toggle;
SharedPrefsMgr.getInstance(getContext()).putString("MY_LOCATION_CONFIG", "https" +
"://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705236512" +
"&di=50620661ded7035fb84899a408f9f27e&imgtype=0&src=http%3A%2F%2Fb-ssl" +
".duitang.com%2Fuploads%2Fitem%2F201409%2F11%2F20140911211243_3rT4u.jpeg");
MyLocationUtil.setMyLocationIconUrl(getContext(),"https" +
"://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705236512" +
"&di=50620661ded7035fb84899a408f9f27e&imgtype=0&src=http%3A%2F%2Fb-ssl" +
".duitang.com%2Fuploads%2Fitem%2F201409%2F11%2F20140911211243_3rT4u.jpeg");
// if (!toggle) {
// TopViewAnimHelper.getInstance().showNaviView();
// } else {
// TopViewAnimHelper.getInstance().hideNaviView();
// }
// toggle = !toggle;
});
findViewById(R.id.btnDebugCtrlSubView).setOnClickListener(view -> {
// MyLocationUtil.emphasizeMyLocation();
View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
TextView tv = v.findViewById(R.id.tvIndex);
tv.setText("sub view height: " + currentHeight + ": " + v);
@@ -886,6 +905,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
});
findViewById(R.id.btnDebugCtrlTopView).setOnClickListener(view -> {
// SharedPrefsMgr.getInstance(getContext()).putString("MY_LOCATION_CONFIG", "https" +
// "://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705508574" +
// "&di=339d3259ad21f5f48c8abcd1bafff324&imgtype=0&src=http%3A%2F%2Fc-ssl" +
// ".duitang.com%2Fuploads%2Fitem%2F202004%2F23%2F20200423111550_4AJLr.thumb" +
// ".1000_0.jpeg");
// MyLocationUtil.setMyLocationIconUrl(getContext(),"https" +
// "://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1605705508574" +
// "&di=339d3259ad21f5f48c8abcd1bafff324&imgtype=0&src=http%3A%2F%2Fc-ssl" +
// ".duitang.com%2Fuploads%2Fitem%2F202004%2F23%2F20200423111550_4AJLr.thumb" +
// ".1000_0.jpeg");
// MyLocationUtil.emphasizeMyLocation();
View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
TextView tv = v.findViewById(R.id.tvIndex);
Random random = new Random();
@@ -893,29 +923,29 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
tv.setText(" height: " + currentHeight + ": " + v);
ViewGroup.LayoutParams params =
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, currentHeight);
mApis.getEntranceButtonController().addLeftFeatureView(v);
// mApis.getEntranceButtonController().addLeftFeatureView(v);
// mApis.getTopViewManager().addView(v, params, new IMogoTopViewStatusListener() {
// @Override
// public void onViewAdded(View view) {
// Logger.d(TAG, "onViewAdded: " + view);
// }
//
// @Override
// public void onViewRemoved(View view) {
// Logger.d(TAG, "onViewRemoved: " + view);
// }
//
// @Override
// public void beforeViewAddAnim(View view) {
// Logger.d(TAG, "beforeViewAddAnim: " + view);
// }
//
// @Override
// public void beforeViewRemoveAnim(View view) {
// Logger.d(TAG, "beforeViewRemoveAnim: " + view);
// }
// });
mApis.getTopViewManager().addView(v, params, new IMogoTopViewStatusListener() {
@Override
public void onViewAdded(View view) {
Logger.d(TAG, "onViewAdded: " + view);
}
@Override
public void onViewRemoved(View view) {
Logger.d(TAG, "onViewRemoved: " + view);
}
@Override
public void beforeViewAddAnim(View view) {
Logger.d(TAG, "beforeViewAddAnim: " + view);
}
@Override
public void beforeViewRemoveAnim(View view) {
Logger.d(TAG, "beforeViewRemoveAnim: " + view);
}
});
});
findViewById(R.id.btnDebugAddBottomLayerView).setOnClickListener(v -> {
@@ -923,7 +953,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
tv.setText("entrance add");
mApis.getEntranceButtonController().addBottomLayerView(tv, 50, 50);
});
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功"));
findViewById(R.id.btnShowTextTip).setOnClickListener(v-> TipToast.tip("分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功分享成功"));
findViewById(R.id.btnShowDrawableTip).setOnClickListener(v->{
mMsgContainer.setVisibility(View.VISIBLE);
@@ -934,9 +964,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
findViewById(R.id.btnShowDrawableTipNoSize).setOnClickListener(v->{
mMsgContainer.setVisibility(View.GONE);
TipDrawable drawable =
new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
TipToast.tip("分享成功",drawable);
String enthusiasmIndex = "一般的字加粗的字一般的字";
SpannableString spannableStringUnSelectCountStr = new SpannableString(enthusiasmIndex);
ForegroundColorSpan foregroundColorSpanUnSelectCount = new ForegroundColorSpan(Color.RED);
spannableStringUnSelectCountStr.setSpan(foregroundColorSpanUnSelectCount, 4, 7, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
TipToast.tip(spannableStringUnSelectCountStr.toString());
// TipDrawable drawable =
// new TipDrawable(getResources().getDrawable(R.drawable.model_ext_default_user_head));
// TipToast.tip("分享成功",drawable);
});
}

View File

@@ -244,6 +244,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
private void requestCarModelList() {
Map<String, String> params = new HashMap<>(8);
params.put("sn", Utils.getSn());
// params.put("sn", "ZD802B1932L00617");
mNetWork.create(UserInfoNetApiServices.class, DztHttpConstant.getBaseUrl()).
requestCarModelList(params).
subscribeOn(Schedulers.io()).

View File

@@ -67,16 +67,16 @@ public abstract class BaseNaviInfoView {
protected String getFormatSurplusTime( int seconds ) {
if ( seconds > 60 * 60 ) {
mFormatSurplusTimeUnit = "h";
mFormatSurplusTimeUnit = "小时";
return String.format( "%.1f", ( ( float ) seconds ) / ( 60 * 60 ) );
}
if ( seconds > 60 ) {
mFormatSurplusTimeUnit = "min";
mFormatSurplusTimeUnit = "分钟";
return String.format( "%.1f", ( ( float ) seconds ) / 60 );
}
mFormatSurplusTimeUnit = "s";
mFormatSurplusTimeUnit = "";
return String.format( "%d", seconds );
}

View File

@@ -24,6 +24,6 @@ public interface UserInfoNetApiServices {
@GET("carlife/carMachine/getAccountInfo")
Single<UserInfoResponse> requestUserInfo(@QueryMap Map<String, String> params);
@GET("carlife/carMachine/getAccountInfo")
@GET("yycp-userDataService/app/enthusiasm/getEnthusiasmInfo/v1")
Observable<CarModelListResponse> requestCarModelList(@QueryMap Map<String, String> params);
}

View File

@@ -35,4 +35,13 @@ public class CarModelListInfo {
public void setImageData(List<OwnCarModelEntity> imageData) {
this.imageData = imageData;
}
@Override
public String toString() {
return "CarModelListInfo{" +
"sn='" + sn + '\'' +
", enthusiasmIndex=" + enthusiasmIndex +
", imageData=" + imageData +
'}';
}
}

View File

@@ -20,4 +20,13 @@ public class CarModelListResponse extends BaseData {
public void setResult(CarModelListInfo result) {
this.result = result;
}
@Override
public String toString() {
return "CarModelListResponse{" +
"result=" + result +
", code=" + code +
", msg='" + msg + '\'' +
'}';
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/module_ext_share_no_map_click" android:state_pressed="true" />
<item android:drawable="@drawable/module_ext_share_no_map" />
</selector>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#000"
android:endColor="#00000000"
android:angle="-90"/>
</shape>

View File

@@ -0,0 +1,295 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/module_entrance_id_top_motion_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
layout="@layout/module_ext_layout_extensions"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<include
layout="@layout/module_ext_include_seeking_help_notice"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ImageButton
android:id="@+id/module_entrance_id_move2_current_location"
android:layout_width="@dimen/module_ext_operation_panel_width"
android:layout_height="@dimen/module_ext_operation_panel_move2_height"
android:background="@drawable/module_ext_drawable_shadow_bg"
android:scaleType="centerInside"
android:src="@drawable/module_map_ic_move2_current_location"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<LinearLayout
android:id="@+id/module_entrance_id_buttons_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
android:layout_marginBottom="@dimen/module_common_shadow_width_pos"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent">
<TextView
android:id="@+id/module_entrance_id_button1"
android:layout_width="@dimen/module_ext_operation_panel_width"
android:layout_height="@dimen/module_ext_operation_panel_width"
android:layout_marginLeft="@dimen/module_entrance_id_button_marginLeft"
android:background="@drawable/module_ext_shadow_bkg"
android:gravity="center"
android:padding="0dp"
android:text="前方\n实况"
android:textColor="@color/module_commons_FFF_333"
android:textSize="@dimen/v2x_cancel_help_text_size"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/module_entrance_id_button2"
android:layout_width="@dimen/module_ext_operation_panel_width"
android:layout_height="@dimen/module_ext_operation_panel_width"
android:layout_marginLeft="@dimen/module_entrance_id_button_marginLeft"
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
android:background="@drawable/module_ext_shadow_bkg"
android:gravity="center"
android:padding="0dp"
android:text="取消\n求助"
android:textColor="@color/module_commons_FFF_333"
android:textSize="@dimen/v2x_cancel_help_text_size"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/module_entrance_id_exit_navi"
android:layout_width="@dimen/module_ext_navi_exit_width"
android:layout_height="@dimen/module_ext_navi_exit_height"
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center"
android:text="@string/module_ext_str_exit_navi"
android:textColor="@color/module_commons_FFF_333"
android:textSize="@dimen/module_ext_navi_exit_textSize"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="visible" />
<FrameLayout
android:id="@+id/module_entrance_id_upload_road_condition"
android:layout_width="@dimen/module_ext_operation_panel_share_no_map_width"
android:layout_height="@dimen/module_ext_operation_panel_share_no_map_height"
android:layout_marginLeft="@dimen/dp_8"
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
android:layout_marginBottom="@dimen/module_common_btn_bottom"
android:background="@drawable/module_ext_share_no_map_selector">
<TextView
android:id="@+id/module_entrance_id_upload"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/module_map_str_upload_road_condition"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_operation_panel_share_textSize"
android:textStyle="bold"
android:visibility="gone"
tools:visibility="gone" />
<ImageView
android:id="@+id/module_entrance_id_uploading"
android:layout_width="@dimen/module_entrance_id_uploading_width"
android:layout_height="@dimen/module_entrance_id_uploading_height"
android:layout_gravity="center"
android:gravity="center"
android:scaleType="fitCenter"
android:src="@drawable/module_ext_ic_uploading_00010"
android:textColor="#FFFFFF"
android:visibility="gone" />
</FrameLayout>
</LinearLayout>
<FrameLayout
android:id="@+id/module_ext_id_top_container_shader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/module_ext_top_container_shader_bg"
android:visibility="gone"
tools:visibility="visible"/>
<include
layout="@layout/include_navi_info_panle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/module_ext_id_north"
android:layout_width="@dimen/module_ext_button_width"
android:layout_height="@dimen/module_ext_button_height"
android:layout_marginTop="@dimen/module_ext_camera_button_marginTop"
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:drawableTop="@drawable/selector_icon_north_up"
android:gravity="center_horizontal"
android:paddingTop="@dimen/dp_14"
android:text="@string/mode_north_up"
android:textColor="@color/module_ext_color_voice_text"
android:textSize="@dimen/module_ext_north_textSize"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_move2_current_location"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
app:layout_goneMarginTop="@dimen/module_ext_north_goneMarginTop"
tools:visibility="visible" />
<TextView
android:id="@+id/module_ext_id_destination_online_car"
android:layout_width="wrap_content"
android:layout_height="@dimen/module_ext_button_height"
android:layout_marginTop="@dimen/module_ext_camera_button_marginTop"
android:background="@drawable/module_ext_dw_navi_info_panel_bkg"
android:drawableLeft="@drawable/module_ext_destination_online_car_dw"
android:drawablePadding="@dimen/module_ext_destination_online_car_drawablePadding"
android:gravity="center_vertical"
android:paddingLeft="@dimen/module_ext_destination_online_car_paddingLeft"
android:paddingRight="@dimen/module_ext_destination_online_car_paddingRight"
android:text="@string/module_ext_destination_online_car_text"
android:textColor="@color/module_ext_color_voice_text"
android:textSize="@dimen/module_ext_north_textSize"
android:textStyle="bold"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
app:layout_goneMarginTop="@dimen/module_ext_north_goneMarginTop"
tools:visibility="visible" />
<!--关联别的控件的头部容器-->
<com.mogo.module.extensions.navi.TopView
android:id="@+id/module_entrance_id_top_container"
style="@style/NaviViewStyle"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<!--没有关联别的控件的头部弹窗容器-->
<com.mogo.module.extensions.navi.TopView
android:id="@+id/module_entrance_id_top_container_no_linkage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<LinearLayout
android:id="@+id/module_ext_id_display_overview"
android:layout_width="@dimen/module_ext_button_width"
android:layout_height="@dimen/module_ext_button_height"
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
android:layout_marginTop="@dimen/module_ext_camera_button_marginTop"
android:background="@drawable/module_ext_dw_common_corner_bkg"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="@+id/module_map_id_navi_bg"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
tools:visibility="gone">
<ImageView
android:id="@+id/module_ext_id_display_overview_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/module_ext_display_overview_icon_marginTop"
android:src="@drawable/module_ext_ic_display_overview" />
<TextView
android:id="@+id/module_ext_id_display_overview_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_5"
android:text="全览"
android:textColor="@color/module_ext_color_voice_text"
android:textSize="@dimen/module_ext_display_overview_textSize_large"
android:textStyle="bold" />
</LinearLayout>
<Button
android:id="@+id/btnDebugCtrlTopView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="显示隐藏TopView"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/btnDebugCtrlSubView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="显示隐藏SubView"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/btnDebugCtrlTopView"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/btnDebugCtrlNaviView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="显示隐藏导航view"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/btnDebugCtrlSubView"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/btnDebugAddBottomLayerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="增加底层view"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/btnDebugCtrlNaviView"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/btnShowTextTip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="显示文字tip"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/btnDebugAddBottomLayerView"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/btnShowDrawableTip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="显示图文tip"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/btnShowTextTip"
app:layout_constraintLeft_toLeftOf="parent" />
<Button
android:id="@+id/btnShowDrawableTipNoSize"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="显示图文tip没有大小"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@id/btnShowDrawableTip"
app:layout_constraintLeft_toLeftOf="parent" />
<androidx.constraintlayout.widget.Group
android:id="@+id/groupTopViewDebug"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="btnShowDrawableTipNoSize,btnShowDrawableTip,btnShowTextTip,btnDebugCtrlNaviView,btnDebugCtrlSubView,btnDebugCtrlTopView,btnDebugAddBottomLayerView" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -40,6 +40,8 @@
<dimen name="module_ext_operation_panel_move2_height">82px</dimen>
<dimen name="module_ext_operation_panel_share_width">66px</dimen>
<dimen name="module_ext_operation_panel_share_height">66px</dimen>
<dimen name="module_ext_operation_panel_share_no_map_width">120px</dimen>
<dimen name="module_ext_operation_panel_share_no_map_height">120px</dimen>
<dimen name="module_ext_operation_panel_share_marginBottom">8px</dimen>
<dimen name="module_ext_operation_panel_share_textSize">16px</dimen>
<dimen name="module_ext_operation_panel_share_goneMarginBottom">34.5px</dimen>

View File

@@ -219,9 +219,11 @@ public class SchemeIntent implements IMogoStatusChangedListener {
mApis.getOnlineCarPanelApi().showPanel();
}
/*
* 语音打开事件面板
* */
private void handleShowSharePanel(int item) {
Logger.d(TAG, "handleShowSharePanel");
// todo 跳转到热心指数
Logger.d(TAG, "语音打开事件面板");
mApis.getEventPanelManager().showPanelWithSelectedItem(item);
}

View File

@@ -9,7 +9,8 @@
<FrameLayout
android:id="@+id/module_main_id_map_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:background="#000"/>
<FrameLayout
android:id="@+id/module_main_id_map_left_shadow_frame"

View File

@@ -27,4 +27,9 @@
<dimen name="module_main_entrance_fragment_container_width">1313px</dimen>
<dimen name="module_event_fragment_container_padding">20px</dimen>
<dimen name="module_main_apps_fragment_container_paddingTop">20px</dimen>
<dimen name="module_main_event_panel_fragment_paddingTop">18px</dimen>
<dimen name="module_main_event_panel_fragment_paddingBottom">18px</dimen>
<dimen name="module_main_event_panel_fragment_paddingLeft">18px</dimen>
<dimen name="module_main_event_panel_fragment_paddingRight">18px</dimen>
</resources>

View File

@@ -12,11 +12,13 @@ import com.mogo.map.IMogoUiSettings;
import com.mogo.map.MogoMapView;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.common.map.MyLocationUtil;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.storage.SharedPrefsMgr;
/**
* @author congtaowang
@@ -50,6 +52,8 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
mMogoMap = mMogoMapView.getMap();
mMogoMap.getUIController().showMyLocation( true );
mMogoMap.getUIController().recoverLockMode();// 启动锁车
// 根据本地配置设置自车图标
MyLocationUtil.setMyLocationIconUrl(getContext(), SharedPrefsMgr.getInstance(getContext()).getString("MY_LOCATION_CONFIG", ""));
}
@NonNull

View File

@@ -47,7 +47,7 @@ dependencies {
implementation "com.mogo.tencent.wecarflow:mogo-wecarflow:+@aar"
implementation "com.mogo.kwmusic:mogo-kwmusic:+"
implementation rootProject.ext.dependencies.carcallprovider
implementation rootProject.ext.dependencies.callchatprovider
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogomap

View File

@@ -11,7 +11,6 @@ import com.mogo.map.navi.IMogoNavi;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant;
import com.mogo.module.authorize.authprovider.module.IMogoAuthorizeModuleManager;
import com.mogo.module.carchattingprovider.ICarsChattingProvider;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.adas.IMogoADASController;
import com.mogo.service.analytics.IMogoAnalytics;
@@ -27,6 +26,7 @@ import com.mogo.service.module.IMogoRegisterCenter;
import com.mogo.service.network.IMogoNetwork;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.service.windowview.IMogoWindowManager;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
/**
* <p>

View File

@@ -1,6 +1,7 @@
package com.mogo.module.media.listener;
import com.mogo.module.carchattingprovider.ICallProviderResponse;
import com.zhidao.carchattingprovider.ICallProviderResponse;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -24,11 +25,6 @@ abstract class CallProviderResponseAdapter implements ICallProviderResponse {
}
@Override
public void callStatus( int i ) {
}
@Override
public void canCall( boolean b ) {

View File

@@ -12,7 +12,6 @@ import android.widget.TextView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.voice.AIAssist;
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
import com.mogo.module.carchattingprovider.ICallProviderResponse;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.glide.SkinAbleBitmapTarget;
import com.mogo.module.media.MediaConstants;
@@ -34,6 +33,7 @@ import com.mogo.utils.WindowUtils;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.logger.Logger;
import com.tencent.wecarflow.flowoutside.sdk.FlowPlayControl;
import com.zhidao.carchattingprovider.ICallProviderResponse;
/**
* 适配爱趣听和酷我的window通过presenter区分

View File

@@ -52,14 +52,14 @@ class FloatView constructor(
abstract inner class PushView(context: Context) : FrameLayout(context),
PushViewController {
lateinit var appIcon: ImageView
lateinit var titleIconContainer: View
lateinit var pushTitle: TextView
lateinit var pushImage: RoundedImageView
lateinit var pushContent: TextView
lateinit var pushTimer: TextView
lateinit var pushButtonLeft: TextView
lateinit var pushButtonRight: TextView
private lateinit var appIcon: ImageView
private lateinit var titleIconContainer: View
private lateinit var pushTitle: TextView
private lateinit var pushImage: RoundedImageView
private lateinit var pushContent: TextView
private lateinit var pushTimer: TextView
private lateinit var pushButtonLeft: TextView
private lateinit var pushButtonRight: TextView
lateinit var pushButton: View
override fun inflateView(layoutId: Int) {
@@ -96,7 +96,7 @@ class FloatView constructor(
fun hasButtons(bean: PushBean?): Boolean {
bean?.buttons?.forEach {
if (!it.text?.isNullOrEmpty()) {
if (it.text.isNotEmpty()) {
return true
}
}
@@ -104,13 +104,13 @@ class FloatView constructor(
}
fun hasTextContent(bean: PushBean?): Boolean =
bean?.content?.isNullOrEmpty()?.not() ?: false
bean?.content?.isEmpty()?.not() ?: false
fun hasImgContent(bean: PushBean?): Boolean = bean?.QRCode?.isNullOrEmpty()?.not() ?: false
fun hasImgContent(bean: PushBean?): Boolean = bean?.QRCode?.isEmpty()?.not() ?: false
open fun setBean(bean: PushBean) {
// app icon
if (!bean.appIcon.isNullOrEmpty()) {
if (bean.appIcon.isNotEmpty()) {
appIcon.visible()
GlideApp.with(this).load(bean.appIcon).into(appIcon)
} else {
@@ -274,6 +274,7 @@ class FloatView constructor(
init {
@Suppress("DEPRECATION")
params.type = WindowManager.LayoutParams.TYPE_SYSTEM_ALERT
params.flags = (WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
or WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
@@ -282,7 +283,7 @@ class FloatView constructor(
or WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
params.width = WindowManager.LayoutParams.WRAP_CONTENT
params.height = WindowManager.LayoutParams.WRAP_CONTENT
params.gravity = Gravity.LEFT or Gravity.BOTTOM
params.gravity = Gravity.START or Gravity.BOTTOM
params.format = PixelFormat.TRANSLUCENT
params.x = context.resources.getDimensionPixelSize(R.dimen.module_push_window_x)
params.y = context.resources.getDimensionPixelSize(R.dimen.module_push_window_x)

View File

@@ -58,7 +58,7 @@ class PushViewModel(
if (isClick == "2") {
mVoiceClient.speakTTSVoice("好的", voiceCmdCallback)
}
if (!it.mainSchema.isNullOrEmpty()) {
if (it.mainSchema.isNotEmpty()) {
dealSchema(it.mainSchema, mContext)
}
}
@@ -74,7 +74,7 @@ class PushViewModel(
if (isClick == "2") {
mVoiceClient.speakTTSVoice("好的", voiceCmdCallback)
}
if (!it.buttons[0].action.isNullOrEmpty()) {
if (it.buttons[0].action.isNotEmpty()) {
dealSchema(it.buttons[0].action, mContext)
}
}
@@ -90,7 +90,7 @@ class PushViewModel(
if (isClick == "2") {
mVoiceClient.speakTTSVoice("好的", voiceCmdCallback)
}
if (!it.buttons[1].action.isNullOrEmpty()) {
if (it.buttons[1].action.isNotEmpty()) {
dealSchema(it.buttons[1].action, mContext)
}
}
@@ -162,7 +162,7 @@ class PushViewModel(
}
pushBean?.buttons?.forEach {
it?.voiceCmd?.apply {
it.voiceCmd?.apply {
mVoiceClient.registerUnWakeupCommand(
VOICE_ACTION_PUSH_RIGHT,
toTypedArray(),

View File

@@ -192,7 +192,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
SearchApisHolder.getMarkerManager().removeMarkers()
DataConstants.sCmds.entries.filter {
it != null && !TextUtils.isEmpty(it.key) && (it.value?.isNotEmpty() ?: false)
!TextUtils.isEmpty(it.key) && (it.value?.isNotEmpty() ?: false)
}.forEach {
AIAssist.getInstance(mContext).registerUnWakeupCommand(it.key, it.value, this@ChoosePathFragment)
}
@@ -244,7 +244,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
}
DataConstants.sCmds.entries.filter {
it != null && !TextUtils.isEmpty(it.key) && (it.value?.isNotEmpty() ?: false)
!TextUtils.isEmpty(it.key) && (it.value?.isNotEmpty() ?: false)
}.forEach {
AIAssist.getInstance(mContext).unregisterUnWakeupCommand(it.key)
}

View File

@@ -121,14 +121,14 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
rb_navi_no_high_way.setOnCheckedChangeListener(this)
rb_navi_fee.setOnCheckedChangeListener(this)
sb_navi_volume_progress.max = VolumeManager.getInstance(context).getMaxVol()
sb_navi_volume_progress.max = VolumeManager.getInstance(context).maxVol
sb_navi_volume_progress.progress = VolumeManager.getInstance(context).sysVolume
sb_navi_volume_progress.setOnSeekBarChangeListener(object : OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
if (fromUser) {
VolumeManager.getInstance(context).setSysVolume(progress)
VolumeManager.getInstance(context).sysVolume = progress
SettingManager.volume = sb_navi_volume_progress.progress
}
@@ -145,7 +145,7 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
})
rg_navi_day_night.setOnCheckedChangeListener { group, checkedId ->
rg_navi_day_night.setOnCheckedChangeListener { _, checkedId ->
SettingManager.mapType = checkedId
when (checkedId) {
R.id.rb_navi_day -> {
@@ -159,7 +159,7 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
}
}
}
rg_navi_sound_type.setOnCheckedChangeListener { group, checkedId ->
rg_navi_sound_type.setOnCheckedChangeListener { _, checkedId ->
when (checkedId) {
R.id.rb_navi_detail -> {
SearchApisHolder.getSettingManager().speakDetail()
@@ -172,7 +172,7 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
}
}
aimlessModeGroup.setOnCheckedChangeListener { group, checkedId ->
aimlessModeGroup.setOnCheckedChangeListener { _, checkedId ->
when (checkedId) {
R.id.aimlessModeClose -> {
SearchApisHolder.getSettingManager().closeAimlessMode()
@@ -272,14 +272,13 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
/**
* 分享弹框
* @param event
*/
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEventBus(searchPoi: SearchPoi?) {
if (searchPoi == null) {
return
}
if (searchPoi?.type == DataConstants.TYPE_COMPANY_ADDRESS) {
if (searchPoi.type == DataConstants.TYPE_COMPANY_ADDRESS) {
tv_navi_company_address.text = searchPoi.address
tv_navi_clear_company_address.visibility = View.VISIBLE
} else {

View File

@@ -27,6 +27,7 @@ import com.mogo.module.navi.ui.base.BaseFragment
import com.mogo.utils.TipToast
import com.mogo.utils.UiThreadHandler
import kotlinx.android.synthetic.main.fragment_setting_address.*
import kotlin.math.sqrt
/**
* @author zyz
@@ -36,11 +37,11 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
override fun onRegeocodeSearched(regeocodeResult: MogoRegeocodeResult?) {
et_navi_search.setText(regeocodeResult?.regeocodeAddress?.formatAddress)
var formatAddress = regeocodeResult?.regeocodeAddress?.formatAddress
et_navi_search.text = regeocodeResult?.regeocodeAddress?.formatAddress
val formatAddress = regeocodeResult?.regeocodeAddress?.formatAddress
selectPoi?.address = formatAddress
var neighborhood = regeocodeResult?.regeocodeAddress?.neighborhood
val neighborhood = regeocodeResult?.regeocodeAddress?.neighborhood
if (!TextUtils.isEmpty(neighborhood)) {
selectPoi?.name = neighborhood
} else {
@@ -49,10 +50,9 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
}
override fun onGeocodeSearched(geocodeResult: MogoGeocodeResult?) {
//do nothing
}
private val TAG: String = "SettingAddressFragment"
private var type: Int = DataConstants.TYPE_HOME_ADDRESS
var addMarker: IMogoMarker? = null
@@ -66,8 +66,8 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
tilt: Float,
bearing: Float) {
super.onMapChanged(latLng, zoom, tilt, bearing)
selectPoi = EntityConvertUtils.geoToPoi(latLng?.lat ?: 0.0, latLng?.lng ?: 0.0, type)
var mogoRegeocodeQuery = MogoRegeocodeQuery()
selectPoi = EntityConvertUtils.geoToPoi(latLng?.lat ?: 0.0, latLng?.lon ?: 0.0, type)
val mogoRegeocodeQuery = MogoRegeocodeQuery()
mogoRegeocodeQuery.point = latLng
mGeoSearch.getFromLocationAsyn(mogoRegeocodeQuery)
addMarker?.startJumpAnimation(
@@ -77,7 +77,7 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
if (input <= 0.5) {
(0.5f - 2.0 * (0.5 - input) * (0.5 - input)).toFloat()
} else {
(0.5f - Math.sqrt(((input - 0.5f) * (1.5f - input)).toDouble())).toFloat()
(0.5f - sqrt(((input - 0.5f) * (1.5f - input)).toDouble())).toFloat()
}
}, null)
@@ -100,7 +100,7 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
return R.layout.fragment_setting_address
}
fun isHome(): Boolean {
private fun isHome(): Boolean {
return type == DataConstants.TYPE_HOME_ADDRESS
}
@@ -111,9 +111,9 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
if (isHome()) {
tv_set_as_home.text = resources.getString(R.string.set_as_home_navi)
tv_set_as_home.text = resources.getString(string.set_as_home_navi)
} else {
tv_set_as_home.text = resources.getString(R.string.set_as_compony_navi)
tv_set_as_home.text = resources.getString(string.set_as_compony_navi)
}
iv_navi_back.setOnClickListener {
@@ -129,28 +129,28 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
}
et_navi_search.isEnabled = false
et_navi_search.setText(getString(string.drag_map_to_choose))
var location = SearchApisHolder.getUiControllerApis().windowCenterLocation
et_navi_search.text = getString(string.drag_map_to_choose)
val location = SearchApisHolder.getUiControllerApis().windowCenterLocation
UiThreadHandler.postDelayed({
if (!isAdded) {
return@postDelayed
}
var decodeResource = BitmapFactory.decodeResource(resources, R.mipmap.icon_choose_position2)
val decodeResource = BitmapFactory.decodeResource(resources, R.mipmap.icon_choose_position2)
val options = MogoMarkerOptions()
.icon(decodeResource)
.latitude(location?.lat ?: 0.0)
.owner(TAG)
.anchor(0.5f, 1f)
.longitude(location?.lng ?: 0.0)
.longitude(location?.lon ?: 0.0)
addMarker = SearchApisHolder.getMarkerManager().addMarker(AMapConstants.PATH_FRAGMENT_SETTING_HOME, options)
var locationPointInScreen = SearchApisHolder.getUiControllerApis().getLocationPointInScreen(location)
val locationPointInScreen = SearchApisHolder.getUiControllerApis().getLocationPointInScreen(location)
addMarker?.setPositionByPixels(locationPointInScreen)
}, 500L)
}
fun insert(searchPoi: SearchPoi) {
private fun insert(searchPoi: SearchPoi) {
AddressManager.insert(searchPoi)
}
@@ -161,11 +161,14 @@ class SettingAddressFragment : BaseFragment(), IMogoGeoSearchListener {
}
companion object {
private const val TAG: String = "SettingAddressFragment"
fun newInstance(type: Int = DataConstants.TYPE_HOME_ADDRESS): Fragment {
var settingAddressFragment = SettingAddressFragment()
val settingAddressFragment = SettingAddressFragment()
val bundle = Bundle()
bundle.putInt(AMapConstants.KEY_SET_HOME_COMPONY, type)
settingAddressFragment.setArguments(bundle)
settingAddressFragment.arguments = bundle
return settingAddressFragment
}
}

View File

@@ -50,7 +50,7 @@ dependencies {
annotationProcessor rootProject.ext.dependencies.aroutercompiler
implementation rootProject.ext.dependencies.rxjava
implementation rootProject.ext.dependencies.rxandroid
implementation rootProject.ext.dependencies.carcallprovider
implementation rootProject.ext.dependencies.callchatprovider
implementation rootProject.ext.dependencies.androidxrecyclerview
if (Boolean.valueOf(RELEASE)) {

View File

@@ -8,7 +8,6 @@ import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerManager;
import com.mogo.map.navi.IMogoNavi;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.carchattingprovider.ICarsChattingProvider;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.entity.MarkerResponse;
import com.mogo.module.common.entity.MarkerShowEntity;
@@ -29,6 +28,7 @@ import com.mogo.service.module.IMogoRegisterCenter;
import com.mogo.service.statusmanager.IMogoStatusManager;
import com.mogo.utils.logger.Logger;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
/**
* author : donghongyu

View File

@@ -35,7 +35,6 @@ import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.map.navi.MogoCongestionInfo;
import com.mogo.map.navi.MogoTraffic;
import com.mogo.map.uicontroller.IMogoMapUIController;
import com.mogo.module.carchattingprovider.ICarsChattingProvider;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.MogoModule;
import com.mogo.module.common.MogoModulePaths;
@@ -78,6 +77,7 @@ import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.RequestOptions;
import com.mogo.utils.network.utils.GsonUtil;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
import com.zhidao.smartv2x.common.utils.LoggerUtils;
import org.json.JSONObject;
@@ -336,8 +336,6 @@ public class MogoServices implements IMogoMapListener,
playAppTts();
//
} else {
unregisterInternalUnWakeupWords();
stopAutoRefreshStrategy();
@@ -391,20 +389,7 @@ public class MogoServices implements IMogoMapListener,
if (DebugConfig.isLauncher()) {
return;
}
mTtsModle.playTts(new RefreshCallback<TtsConfigEntity>() {
@Override
public void onSuccess(TtsConfigEntity o) {
if (!TextUtils.isEmpty(o.getTtsWord())) {
AIAssist.getInstance(mContext).speakTTSVoice(o.getTtsWord(), null);
}
}
@Override
public void onFail() {
Log.e(TAG, "获取Tts失败");
}
});
mTtsModle.playTts();
}
/**

View File

@@ -1,18 +1,19 @@
package com.mogo.module.service.marker;
import com.mogo.module.carchattingprovider.ICallProviderResponse;
import com.zhidao.carchattingprovider.ICallProviderResponse;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public
/**
* @author congtaowang
* @since 2020/9/28
*
* 描述
*/
abstract class CallProviderResponseImpl implements ICallProviderResponse {
public abstract class CallProviderResponseImpl implements ICallProviderResponse {
@Override
public void addFriend( boolean b ) {
@@ -24,11 +25,6 @@ abstract class CallProviderResponseImpl implements ICallProviderResponse {
}
@Override
public void callStatus( int i ) {
}
@Override
public void callWindowStatus( boolean b ) {

View File

@@ -194,19 +194,13 @@ public class UserDataMarkerInfoWindowAdapter implements IMogoInfoWindowAdapter {
params.put( CallChattingProviderConstant.CCPROVIDER_LON, location.getLon() + "" );
}
Logger.d( TAG, "call parameters: %s", params );
if ( MarkerServiceHandler.getApis().getStatusManagerApi().isV2XShow() ) {
MarkerServiceHandler.getCarChatting().callShowWindow( params );
} else {
MarkerServiceHandler.getCarChatting().call( params );
}
MarkerServiceHandler.getCarChatting().call( params );
}
protected void loadImageHeader( final MarkerShowEntity markerShowEntity ) {
if ( Looper.myLooper() != Looper.getMainLooper() ) {
UiThreadHandler.post( () -> {
runOnUiThread( markerShowEntity );
} );
UiThreadHandler.post( () -> runOnUiThread( markerShowEntity ));
} else {
runOnUiThread( markerShowEntity );
}

View File

@@ -8,13 +8,25 @@ import com.mogo.commons.data.BaseData;
* @desc :分体机tts播报信息返回
*/
public class TtsConfigEntity extends BaseData {
private String ttsWord;
public Result result;
public String getTtsWord() {
return ttsWord;
public Result getResult() {
return result;
}
public void setTtsWord(String ttsWord) {
this.ttsWord = ttsWord;
public void setResult(Result result) {
this.result = result;
}
public static class Result {
private String word;
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
}
}

View File

@@ -12,7 +12,6 @@ import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.android.arouter.launcher.ARouter;
import com.bumptech.glide.request.RequestOptions;
import com.mogo.map.location.MogoLocation;
import com.mogo.module.carchattingprovider.ICarsChattingProvider;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.api.CallChatApi;
import com.mogo.module.common.entity.MarkerLocation;
@@ -23,10 +22,10 @@ import com.mogo.module.service.MarkerServiceHandler;
import com.mogo.module.service.R;
import com.mogo.module.service.Utils;
import com.mogo.utils.ResourcesHelper;
import com.mogo.utils.WindowUtils;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.logger.Logger;
import com.zhidao.carchattingprovider.CallChattingProviderConstant;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
import java.util.HashMap;
import java.util.List;
@@ -67,7 +66,6 @@ class OnlineCarPanelAdapter extends RecyclerView.Adapter<OnlineCarPanelAdapter.V
public void onBindViewHolder(@NonNull OnlineCarPanelAdapter.VH holder, int position) {
holder.bind(mDatums.get(position), mToLon, mToLat);
holder.call.setOnClickListener(view -> {
//TODO 拨打电话
Map<String, String> params = new HashMap<>();
MarkerUserInfo userInfo = mDatums.get(position).getUserInfo();
params.put(CallChattingProviderConstant.CCPROVIDER_SN, userInfo.getSn());
@@ -123,11 +121,6 @@ class OnlineCarPanelAdapter extends RecyclerView.Adapter<OnlineCarPanelAdapter.V
Logger.e(TAG, e, "detail.OnClick");
}
});
// call.setOnClickListener(view -> {
// //TODO 拨打电话
//
//
// });
}
private String getDistanceStr(MarkerLocation location, double lon, double lat) {

View File

@@ -8,6 +8,7 @@ import java.util.Map;
import io.reactivex.Observable;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
/**
@@ -20,7 +21,6 @@ public interface TtsConfigApiService {
* 查询语音Tts 的
*
*/
@FormUrlEncoded
@POST("/yycp-tmcServer/tmcServer/car/reportTraffic/v1")
Observable<TtsConfigEntity> inquireForTts(@FieldMap Map<String, Object> parames);
@GET("/yycp-carDataService/car/ttsWord/no/getTTSWord/v1")
Observable<TtsConfigEntity> inquireForTts();
}

View File

@@ -1,22 +1,18 @@
package com.mogo.module.service.ttsConfig;
import android.text.TextUtils;
import android.util.Log;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.data.BaseData;
import com.mogo.commons.network.ParamsProvider;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.network.SubscribeImpl;
import com.mogo.commons.network.Utils;
import com.mogo.module.service.network.RefreshCallback;
import com.mogo.commons.voice.AIAssist;
import com.mogo.module.service.network.RefreshModel;
import com.mogo.module.service.network.bean.TtsConfigEntity;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.network.IMogoNetwork;
import com.mogo.utils.logger.Logger;
import com.mogo.utils.network.RequestOptions;
import java.util.Map;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
@@ -36,34 +32,37 @@ public class TtsConfigModleData {
IMogoNetwork network = (IMogoNetwork) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_NETWORK).navigation(getApp().getApplicationContext());
mTtsConfigApiService = network.create(TtsConfigApiService.class, RefreshModel.getNetHost());
}
/**
* 独立app根据后台配置 播放tts
* @param
*
* @param
* @param
* @param
*/
public void playTts(RefreshCallback<TtsConfigEntity> ttsCallback) {
public void playTts() {
final ParamsProvider.Builder builder = new ParamsProvider.Builder( getApp().getApplicationContext());
Map<String, Object> parameters = builder.build();
parameters.put("sn", Utils.getSn());
Log.d("zytest","playTts获取语音配置的网络请求");
// parameters.put("data", GsonUtil.jsonFromObject(uploadTrafficEntity));
mTtsConfigApiService.inquireForTts(parameters)
if (DebugConfig.isLauncher()) {
return;
}
mTtsConfigApiService.inquireForTts()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new SubscribeImpl<TtsConfigEntity>(RequestOptions.create( getApp().getApplicationContext())) {
.subscribe(new SubscribeImpl<TtsConfigEntity>(RequestOptions.create(getApp().getApplicationContext())) {
@Override
public void onError(Throwable e) {
super.onError(e);
Log.e("zytest", e.toString());
ttsCallback.onFail();
}
@Override
public void onSuccess(TtsConfigEntity o) {
super.onSuccess(o);
ttsCallback.onSuccess(o);
Log.e("zytest", "播放语音了====" + o.getResult().getWord());
if (!TextUtils.isEmpty(o.getResult().getWord())) {
AIAssist.getInstance(getApp().getApplicationContext()).speakTTSVoice(o.getResult().getWord());
}
}
});

View File

@@ -1,10 +1,12 @@
package com.mogo.module.service.ttsConfig;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.facade.template.IProvider;
import com.mogo.commons.voice.AIAssist;
import com.mogo.module.service.ServiceConst;
import com.mogo.module.service.network.RefreshCallback;
import com.mogo.module.service.network.bean.TtsConfigEntity;
@@ -14,26 +16,20 @@ import com.mogo.module.service.network.bean.TtsConfigEntity;
* @date : 2020/11/16 15:01
* @desc :进入页面的时候 根据配置 播放tts语音
*/
@Route( path = ServiceConst.PATH_TTS_CONFIG )
@Route(path = ServiceConst.PATH_TTS_CONFIG)
public class TtsConfigProvider implements IProvider {
private final String TAG = "TtsConfigProvider";
private Context mContext;
private TtsConfigModleData mTtsModleData;
@Override
public void init(Context context) {
mContext = context;
Log.d(TAG, "TtsConfigProvider provider init……");
if (mTtsModleData==null) {
mTtsModleData=new TtsConfigModleData();
if (mTtsModleData == null) {
mTtsModleData = new TtsConfigModleData();
}
mTtsModleData.playTts(new RefreshCallback< TtsConfigEntity >() {
@Override
public void onSuccess(TtsConfigEntity o) {
}
@Override
public void onFail() {
}
});
mTtsModleData.playTts();
}
}

View File

@@ -72,6 +72,16 @@ public class GlobalUnwakeManager implements IProvider, IMogoIntentListener, IMog
case UNWAKE_UPLOAD_ROAD_CONDITION:
MogoApisHandler.getInstance().getApis().getShareManager().onGlobalUnwake(intentStr, intent);
break;
case VOICE_QUERY_HISTORY_INDEX:
Intent startForHis = new Intent( Intent.ACTION_VIEW );
startForHis.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
startForHis.setData( Uri.parse( "mogo://launcher/main/switch2?type=showHistoryPanel" ) );
context.startActivity( startForHis );
case VOICE_QUERY_SURROUNDING_INDEX:
Intent startForSurrounding = new Intent( Intent.ACTION_VIEW );
startForSurrounding.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
startForSurrounding.setData( Uri.parse( "mogo://launcher/main/switch2?type=showSurroundingPanel" ) );
context.startActivity( startForSurrounding );
case VOICE_QUERY_HEART_INDEX:
Intent start = new Intent( Intent.ACTION_VIEW );
start.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_pannel_call_pressed" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_pannel_call_nomal" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_pannel_call_nomal" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/service_car_pannel_call_pressed_light" android:state_pressed="true" />
<item android:drawable="@drawable/service_car_pannel_call_nomal_light" android:state_pressed="false" />
<item android:drawable="@drawable/service_car_pannel_call_nomal_light" />
</selector>

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