diff --git a/.idea/misc.xml b/.idea/misc.xml index cd77a1f062..21e99e2dc0 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 0354ef8f5f..9b10f47377 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -162,7 +162,7 @@ android { buildConfigField 'int', 'CAR_MACHINE_TYPE', '0' } // 比亚迪 - byd{ + bydauto{ dimension "product" // 不使用语音 buildConfigField 'int', 'AIType','0' diff --git a/app/functions/baseservices.gradle b/app/functions/baseservices.gradle index 8a6726e463..0372c05860 100644 --- a/app/functions/baseservices.gradle +++ b/app/functions/baseservices.gradle @@ -2,7 +2,7 @@ project.dependencies { if (Boolean.valueOf(RELEASE)) { - bydImplementation rootProject.ext.dependencies.mogobaseservicesdk + bydautoImplementation rootProject.ext.dependencies.mogobaseservicesdk d82xImplementation rootProject.ext.dependencies.mogobaseserviceapk em1Implementation rootProject.ext.dependencies.mogobaseserviceapk @@ -13,7 +13,7 @@ project.dependencies { f8xxImplementation rootProject.ext.dependencies.mogobaseserviceapk em3Implementation rootProject.ext.dependencies.mogobaseserviceapk } else { - bydImplementation project(':foudations:mogo-base-services-sdk') + bydautoImplementation project(':foudations:mogo-base-services-sdk') d82xImplementation project(':foudations:mogo-base-services-apk') em1Implementation project(':foudations:mogo-base-services-apk') diff --git a/app/functions/eventpanel.gradle b/app/functions/eventpanel.gradle index c1acd256e7..af40aafa69 100644 --- a/app/functions/eventpanel.gradle +++ b/app/functions/eventpanel.gradle @@ -4,7 +4,7 @@ project.dependencies { if (Boolean.valueOf(RELEASE)) { d82xImplementation rootProject.ext.dependencies.moduleventpanelnoop em1Implementation rootProject.ext.dependencies.moduleventpanelnoop - bydImplementation rootProject.ext.dependencies.moduleventpanelnoop + bydautoImplementation rootProject.ext.dependencies.moduleventpanelnoop d8xxImplementation rootProject.ext.dependencies.moduleventpanel em4Implementation rootProject.ext.dependencies.moduleventpanel @@ -14,7 +14,7 @@ project.dependencies { } else { d82xImplementation project(':modules:mogo-module-event-panel-noop') em1Implementation project(':modules:mogo-module-event-panel-noop') - bydImplementation project(':modules:mogo-module-event-panel-noop') + bydautoImplementation project(':modules:mogo-module-event-panel-noop') d8xxImplementation project(':modules:mogo-module-event-panel') em4Implementation project(':modules:mogo-module-event-panel') diff --git a/app/functions/leftpanel.gradle b/app/functions/leftpanel.gradle index 9a1aa18c98..9af57c4e47 100644 --- a/app/functions/leftpanel.gradle +++ b/app/functions/leftpanel.gradle @@ -4,7 +4,7 @@ project.dependencies { if (Boolean.valueOf(RELEASE)) { d82xImplementation rootProject.ext.dependencies.moduleleftpanel em1Implementation rootProject.ext.dependencies.moduleleftpanel - bydImplementation rootProject.ext.dependencies.moduleleftpanel + bydautoImplementation rootProject.ext.dependencies.moduleleftpanel d8xxImplementation rootProject.ext.dependencies.moduleleftpanelnoop em4Implementation rootProject.ext.dependencies.moduleleftpanelnoop @@ -15,7 +15,7 @@ project.dependencies { } else { d82xImplementation project(':modules:mogo-module-left-panel') em1Implementation project(':modules:mogo-module-left-panel') - bydImplementation project(':modules:mogo-module-left-panel') + bydautoImplementation project(':modules:mogo-module-left-panel') d8xxImplementation project(':modules:mogo-module-left-panel-noop') em4Implementation project(':modules:mogo-module-left-panel-noop') diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 3449fdb765..47503f78aa 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -2,6 +2,7 @@ package com.mogo.launcher; import android.content.Context; import android.content.Intent; +import android.os.Build; import android.util.Log; import com.alibaba.android.arouter.launcher.ARouter; @@ -89,6 +90,7 @@ public class MogoApplication extends AbsMogoApplication { DebugConfig.setLauncher( BuildConfig.IS_LAUNCHER ); DebugConfig.setActiveAIAssistFlag( BuildConfig.AI_ASSIST_ACTIVE_STAUTS ); DebugConfig.setCarMachineType( BuildConfig.CAR_MACHINE_TYPE ); + DebugConfig.setProductFlavor( BuildConfig.FLAVOR_product ); } @Override diff --git a/foudations/mogo-base-services-sdk/build.gradle b/foudations/mogo-base-services-sdk/build.gradle index 20fc05604d..31f35d96b5 100644 --- a/foudations/mogo-base-services-sdk/build.gradle +++ b/foudations/mogo-base-services-sdk/build.gradle @@ -34,7 +34,7 @@ dependencies { // 长链 implementation 'com.zhidao.socket:built-in-socket:1.0.13' // passport - implementation 'com.zhidao.tcloginsdk:tclogin:1.0.7' + implementation 'com.zhidao.loginsdk:external:1.0.0' annotationProcessor 'com.elegant.spi:compiler:1.0.3' diff --git a/foudations/mogo-base-services-sdk/src/main/java/com/mogo/base/services/passport/PassportManager.java b/foudations/mogo-base-services-sdk/src/main/java/com/mogo/base/services/passport/PassportManager.java index 184b63c7a6..38c1f2b4be 100644 --- a/foudations/mogo-base-services-sdk/src/main/java/com/mogo/base/services/passport/PassportManager.java +++ b/foudations/mogo-base-services-sdk/src/main/java/com/mogo/base/services/passport/PassportManager.java @@ -12,6 +12,7 @@ import com.mogo.utils.logger.Logger; import com.zhidao.accountsdk.manager.CarPadClientManagerImpl; import com.zhidao.accountsdk.manager.TicketInfoCallback; import com.zhidao.accountsdk.network.NetEnvironManager; +import com.zhidao.tcloginsdk.LoginManagerImpl; import com.zhidao.tcloginsdk.ToCLoginManagerImpl; public @@ -95,7 +96,8 @@ class PassportManager implements IMogoPassportManager { // 演示环境用 qa 的 mode = DebugConfig.NET_MODE_QA; } - ToCLoginManagerImpl.getInstance( context ).setNetEnviron( mode ); - ToCLoginManagerImpl.getInstance( context ).showLoginView(); + LoginManagerImpl.getInstance(mContext).setClientType(DebugConfig.getProductFlavor()); + LoginManagerImpl.getInstance( context ).setNetEnviron( mode ); + LoginManagerImpl.getInstance( context ).showLoginView(); } } diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java index 02050a9be2..4ef12b6383 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/debug/DebugConfig.java @@ -82,6 +82,7 @@ public class DebugConfig { public static final int CAR_MACHINE_TYPE_BYD = 1; private static int sCarMachineType = CAR_MACHINE_TYPE_SELF_INNOVATE; + /** * 获取网络环境类型 * @@ -150,17 +151,19 @@ public class DebugConfig { /** * 设置当前车机类型 + * * @param type {@link #CAR_MACHINE_TYPE_SELF_INNOVATE} {@link #CAR_MACHINE_TYPE_BYD} */ - public static void setCarMachineType(int type) { + public static void setCarMachineType( int type ) { sCarMachineType = type; } /** * 获取当前车机类型 + * * @return {@link #CAR_MACHINE_TYPE_SELF_INNOVATE} {@link #CAR_MACHINE_TYPE_BYD} */ - public static int getCarMachineType(){ + public static int getCarMachineType() { return sCarMachineType; } @@ -209,4 +212,19 @@ public class DebugConfig { public static boolean isUseMockObuData() { return useMockObuData; } + + private static String sProductFlavor; + + public static String getProductFlavor() { + return sProductFlavor; + } + + /** + * 产品线 + * + * @param sProductFlavor + */ + public static void setProductFlavor( String sProductFlavor ) { + DebugConfig.sProductFlavor = sProductFlavor; + } } diff --git a/gradle.properties b/gradle.properties index 9963101c81..3c4c014176 100644 --- a/gradle.properties +++ b/gradle.properties @@ -71,7 +71,6 @@ MOGO_MODULE_GUIDESHOW_VERSION=1.0.2-SNAPSHOT MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT # 在线车辆F MOGO_MODULE_ONLINECAR_VERSION=1.0.3.2 - # 推送 MOGO_MODULE_PUSH_VERSION=1.1.5.7 MOGO_MODULE_PUSH_BASE_VERSION=1.1.5.5 diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java index c373965b87..8935812bcd 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java @@ -10,7 +10,9 @@ import com.amap.api.maps.model.BitmapDescriptorFactory; import com.amap.api.maps.model.LatLng; import com.amap.api.maps.model.Marker; import com.amap.api.maps.model.MarkerOptions; +import com.amap.api.maps.model.animation.AlphaAnimation; import com.amap.api.maps.model.animation.Animation; +import com.amap.api.maps.model.animation.AnimationSet; import com.amap.api.maps.model.animation.ScaleAnimation; import com.amap.api.maps.model.animation.TranslateAnimation; import com.amap.api.maps.utils.overlay.MovingPointOverlay; @@ -382,6 +384,47 @@ public class AMapMarkerWrapper implements IMogoMarker, Observer { mMarker.startAnimation(); } + @Override + public void startScaleAnimationWithAlpha( float fromX, float toX, float fromY, float toY, float fromAlpha, float toAlpha, int duration, Interpolator interpolator, OnMarkerAnimationListener listener ) { + if ( isDestroyed() ) { + return; + } + + ScaleAnimation animationScale = new ScaleAnimation( fromX, toX, fromY, toY ); + animationScale.setFillMode( Animation.FILL_MODE_FORWARDS ); + + AlphaAnimation alphaAnimation = new AlphaAnimation( fromAlpha, toAlpha ); + alphaAnimation.setFillMode( Animation.FILL_MODE_FORWARDS ); + + AnimationSet animationSet = new AnimationSet( true ); + animationSet.setDuration( duration ); + animationSet.setInterpolator( interpolator); + animationSet.setAnimationListener( new Animation.AnimationListener() { + @Override + public void onAnimationStart() { + if ( isDestroyed() ) { + return; + } + if ( listener != null ) { + listener.onAnimStart(); + } + } + + @Override + public void onAnimationEnd() { + if ( isDestroyed() ) { + return; + } + if ( listener != null ) { + listener.onAnimEnd(); + } + } + } ); + + mMarker.setAnimation( animationSet ); + mMarker.startAnimation(); + } + @Override public void startJumpAnimation( float high, long duration, Interpolator interpolator, OnMarkerAnimationListener listener ) { if ( isDestroyed() || high <= 0.0f || interpolator == null || duration < 0 ) { diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java index 7cb519b426..8301124d8b 100644 --- a/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java +++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java @@ -267,9 +267,33 @@ public interface IMogoMarker { Interpolator interpolator, OnMarkerAnimationListener listener ); + /** + * 缩放动画 + * + * @param fromX + * @param toX + * @param fromY + * @param toY + * @param fromAlpha + * @param toAlpha + * @param duration + * @param interpolator + * @param listener + */ + void startScaleAnimationWithAlpha( float fromX, + float toX, + float fromY, + float toY, + float fromAlpha, + float toAlpha, + int duration, + Interpolator interpolator, + OnMarkerAnimationListener listener ); + /** * 弹跳动画 + * * @param high * @param duration * @param interpolator @@ -278,7 +302,7 @@ public interface IMogoMarker { void startJumpAnimation( float high, long duration, Interpolator interpolator, - OnMarkerAnimationListener listener); + OnMarkerAnimationListener listener ); /** * 是否是否可点击 diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml index 9c3715fa3a..a5e236e189 100644 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml +++ b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_common_corner_bkg.xml @@ -1,9 +1,15 @@ + + + + + + - + \ No newline at end of file diff --git a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml index 16e096724d..5fe60723c9 100644 --- a/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml +++ b/modules/mogo-module-extensions/src/main/res/drawable/module_ext_dw_upload_road_condition_bkg.xml @@ -1,5 +1,11 @@ + + + + + + diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java index e606546990..2e3a280d45 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MogoServices.java @@ -715,6 +715,7 @@ public class MogoServices implements IMogoMapListener, break; case ACC_STATUS: if ( isTrue ) { + initLocationServiceProcess( mContext ); mADASController.showADAS(); refreshStrategy(); MarkerServiceHandler.getApis().getMapServiceApi().getSingletonLocationClient( mContext ).stop(); diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java index 43613ad77f..f641febd03 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/marker/MapMarkerManager.java @@ -3,6 +3,8 @@ package com.mogo.module.service.marker; import android.content.Context; import android.graphics.Rect; import android.text.TextUtils; +import android.view.animation.AccelerateInterpolator; +import android.view.animation.LinearInterpolator; import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.debug.DebugConfig; @@ -11,6 +13,7 @@ import com.mogo.map.marker.IMogoMarker; import com.mogo.map.marker.IMogoMarkerClickListener; import com.mogo.map.marker.IMogoMarkerManager; import com.mogo.map.marker.MogoMarkerOptions; +import com.mogo.map.marker.anim.OnMarkerAnimationListener; import com.mogo.module.common.ModuleNames; import com.mogo.module.common.entity.MarkerCarPois; import com.mogo.module.common.entity.MarkerCardResult; @@ -34,6 +37,7 @@ import com.mogo.service.module.IMogoBizActionDoneListener; import com.mogo.utils.ResourcesHelper; import com.mogo.utils.ThreadPoolService; import com.mogo.utils.UiThreadHandler; +import com.mogo.utils.WorkThreadHandler; import com.mogo.utils.logger.Logger; import org.json.JSONArray; @@ -368,15 +372,42 @@ public class MapMarkerManager implements IMogoMarkerClickListener, IMogoMarker mogoMarker = existCarMap.get( sn ); if ( mogoMarker == null || mogoMarker.isDestroyed() ) { Logger.d( TAG, "draw road condition, sn = %s", sn ); - mogoMarker = drawMapMarker( markerShowEntity, ServiceConst.MARKER_Z_INDEX_HIGH ); - } - if ( mogoMarker != null ) { - mogoMarker.setVisible( true ); + try { + post2AddAndStartAnimation( markerShowEntity, i * 100L ); + } catch ( Exception e ) { + e.printStackTrace(); + } } } } } + private void post2AddAndStartAnimation( MarkerShowEntity entity, long delay ) { + if ( entity == null ) { + return; + } + WorkThreadHandler.getInstance().postDelayed( () -> { + if ( entity == null ) { + return; + } + IMogoMarker marker = drawMapMarker( entity, ServiceConst.MARKER_Z_INDEX_HIGH ); + marker.startScaleAnimationWithAlpha( 0, 1.2f, 0, 1.2f, 0f, 1f,300, new LinearInterpolator(), new OnMarkerAnimationListener() { + @Override + public void onAnimStart() { + Logger.d( TAG, " onAnimStart ---1----> " ); + } + + @Override + public void onAnimEnd() { + if ( marker.isDestroyed() ) { + return; + } + marker.startScaleAnimation( 1.2f, 1, 1.2f, 1, 100, new LinearInterpolator(), null ); + } + } ); + }, delay ); + } + /** * S = (A ∩ B) ∪ B * (A ∩ B)作为旧列表需要保留的部分 diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living.png index f66b3e8176..48d2485529 100644 Binary files a/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living.png and b/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living_light.png b/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living_light.png index b52aab6bad..0feeb0f206 100644 Binary files a/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living_light.png and b/modules/mogo-module-service/src/main/res/drawable-ldpi/icon_map_marker_living_light.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living.png b/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living.png index f66b3e8176..48d2485529 100644 Binary files a/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living.png and b/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living_light.png b/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living_light.png index b52aab6bad..0feeb0f206 100644 Binary files a/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living_light.png and b/modules/mogo-module-service/src/main/res/drawable-mdpi/icon_map_marker_living_light.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living.png b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living.png old mode 100755 new mode 100644 index 3780ecf9b9..d6f1dea192 Binary files a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living.png and b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living.png differ diff --git a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living_light.png b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living_light.png old mode 100755 new mode 100644 index ae94e4bc3d..1b87f0ce86 Binary files a/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living_light.png and b/modules/mogo-module-service/src/main/res/drawable-xhdpi/icon_map_marker_living_light.png differ diff --git a/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml index 96071d04a9..341706179d 100644 --- a/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-service/src/main/res/values-xhdpi/dimens.xml @@ -1,7 +1,7 @@ 20dp - 8dp + 4dp 100px 117px 60px diff --git a/modules/mogo-module-service/src/main/res/values/dimens.xml b/modules/mogo-module-service/src/main/res/values/dimens.xml index c527ce9b25..fd1066746d 100644 --- a/modules/mogo-module-service/src/main/res/values/dimens.xml +++ b/modules/mogo-module-service/src/main/res/values/dimens.xml @@ -1,7 +1,7 @@ 16dp - 4dp + 2dp 56px 65px 35px diff --git a/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java b/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java index 0a2e936abb..06a161a806 100644 --- a/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java +++ b/modules/mogo-module-share/src/main/java/com/mogo/module/share/dialog/LaucherShareDialog.java @@ -64,6 +64,8 @@ public class LaucherShareDialog extends BaseFloatDialog implements View.OnClickL public LaucherShareDialog(Context context) { super(context); +// getWindow().setWindowAnimations(R.style.ShareDialogAnim); + this.mContext = context; mApis = (IMogoServiceApis) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation(context); mAnalytics = mApis.getAnalyticsApi(); diff --git a/modules/mogo-module-share/src/main/res/anim/module_share_dialog_enter_anim.xml b/modules/mogo-module-share/src/main/res/anim/module_share_dialog_enter_anim.xml new file mode 100644 index 0000000000..a49af94353 --- /dev/null +++ b/modules/mogo-module-share/src/main/res/anim/module_share_dialog_enter_anim.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/modules/mogo-module-share/src/main/res/anim/module_share_dialog_exit_anim.xml b/modules/mogo-module-share/src/main/res/anim/module_share_dialog_exit_anim.xml new file mode 100644 index 0000000000..e0914a5b11 --- /dev/null +++ b/modules/mogo-module-share/src/main/res/anim/module_share_dialog_exit_anim.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/modules/mogo-module-share/src/main/res/values/styles.xml b/modules/mogo-module-share/src/main/res/values/styles.xml index 389862f71e..b07cecf669 100644 --- a/modules/mogo-module-share/src/main/res/values/styles.xml +++ b/modules/mogo-module-share/src/main/res/values/styles.xml @@ -13,4 +13,9 @@ @color/all_transparent_white @color/all_transparent_white + +