Merge branch 'dev' into dev_1.1

This commit is contained in:
董宏宇
2020-07-22 14:32:05 +08:00
32 changed files with 194 additions and 44 deletions

View File

@@ -6,8 +6,6 @@ import com.mogo.module.authorize.authprovider.module.IMogoAcquireAuthorizeListen
import com.mogo.module.authorize.model.proxy.AuthorizeProxy
import com.mogo.module.authorize.model.proxy.toAuthorizeType
import com.mogo.module.authorize.util.SharedPreferenceUtil.needAuthorization
import com.mogo.module.authorize.util.SharedPreferenceUtil.setAuthorizeStatus
import com.mogo.module.authorize.util.isDeviceOfD
import com.mogo.utils.logger.Logger
open abstract class MogoAuthorizeManagerImpl : IMogoAuthorizeInvoke {
@@ -19,13 +17,9 @@ open abstract class MogoAuthorizeManagerImpl : IMogoAuthorizeInvoke {
private val baseController: IMogoAuthorizeController by lazy { IMogoAuthorizeController() }
override fun needAuthorize(tag: String): Boolean {
return if (isDeviceOfD()) {
Logger.d(TAG, "===== needAuthorize update agreement in background")
baseController.checkIfNeedAuthorize(tag.toAuthorizeType())
needAuthorization(tag.toAuthorizeType())
} else {
false
}
Logger.d(TAG, "===== needAuthorize update agreement in background")
baseController.checkIfNeedAuthorize(tag.toAuthorizeType())
return needAuthorization(tag.toAuthorizeType())
}
override fun updateAuthorizeStatus(tag: String) {

View File

@@ -13,8 +13,6 @@ import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant.Companion
import com.mogo.module.authorize.authprovider.invoke.AuthorizeConstant.Companion.PATH_AGREEMENT_MODULE_NAME
import com.mogo.module.authorize.authprovider.invoke.AuthorizeInvokerConstant.Companion.AUTHORIZE_TYPE_LAUNCHER_MAIN
import com.mogo.module.authorize.authprovider.launcher.MogoMainAuthorize.Companion.mogoAuthShow
import com.mogo.module.authorize.util.SharedPreferenceUtil.hasGuide
import com.mogo.module.authorize.util.isDeviceOfD
import com.mogo.service.module.IMogoModuleLifecycle
import com.mogo.service.module.IMogoModuleProvider
import com.mogo.service.module.ModuleType
@@ -66,7 +64,8 @@ class MogoAuthorizeProvider : IMogoModuleProvider {
override fun init(context: Context) {
//todo 引导判断暂时去掉 后续引导流程更改完再放开
// todo if (isDeviceOfD() && hasGuide() && mogoAuthShow.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
if (isDeviceOfD() && mogoAuthShow.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
// todo F系列暂时没有授权功能 1.1需求中添加 全量上
if (mogoAuthShow.needAuthorize(AUTHORIZE_TYPE_LAUNCHER_MAIN)) {
mogoAuthShow.invokeAuthorizeForShow(context)
} else {
//首次进入Launcher同步一下授权状态防止由于用户清除数据造成首次加载还会出现授权状态不同步问题

View File

@@ -1,10 +0,0 @@
package com.mogo.module.authorize.util
import com.mogo.module.common.utils.CarSeries.*
fun isDeviceOfD(): Boolean {
return when (getSeries()) {
CAR_SERIES_D80X, CAR_SERIES_D81X, CAR_SERIES_D82X, CAR_SERIES_D84X -> true
else -> false
}
}

View File

@@ -1,9 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<corners android:radius="@dimen/module_ext_common_corner" />
<gradient android:angle="135" android:endColor="#1C1E28" android:startColor="#242737" />
</shape>
</item>
<item>
<shape>
<corners android:radius="@dimen/module_ext_common_corner" />
<gradient android:angle="135" android:endColor="#3F435F" android:startColor="#2E3141" />
<gradient android:angle="135" android:endColor="#48495E" android:startColor="#616381" />
</shape>
</item>
</selector>

View File

@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#ff113361" android:startColor="#ff124B98" android:type="linear" />
<corners android:radius="@dimen/module_ext_common_corner" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<gradient android:angle="135" android:endColor="#ff1e57a4" android:startColor="#ff1f7eff" android:type="linear" />

View File

@@ -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();

View File

@@ -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)作为旧列表需要保留的部分

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 941 B

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">20dp</dimen>
<dimen name="module_service_marker_dot_marginTop">8dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_bubble_width">100px</dimen>
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_bubble_icon_width">60px</dimen>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">16dp</dimen>
<dimen name="module_service_marker_dot_marginTop">4dp</dimen>
<dimen name="module_service_marker_dot_marginTop">2dp</dimen>
<dimen name="module_service_marker_bubble_width">56px</dimen>
<dimen name="module_service_marker_bubble_height">65px</dimen>
<dimen name="module_service_marker_bubble_icon_width">35px</dimen>

View File

@@ -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();

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:interpolator="@android:anim/overshoot_interpolator"
android:fromXScale="0.0"
android:toXScale="1.0"
android:fromYScale="0.0"
android:toYScale="1.0"
android:pivotX="50%"
android:pivotY="50%"
android:fillAfter="true"
android:duration="400"/>
</set>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:interpolator="@android:anim/anticipate_overshoot_interpolator"
android:fromXScale="1.0"
android:toXScale="0.0"
android:fromYScale="1.0"
android:toYScale="0.0"
android:pivotX="50%"
android:pivotY="50%"
android:fillAfter="true"
android:duration="400"/>
</set>

View File

@@ -13,4 +13,9 @@
<item name="android:topDark">@color/all_transparent_white</item>
<item name="android:borderlessButtonStyle">@color/all_transparent_white</item>
</style>
<style name="ShareDialogAnim" parent="android:Animation" mce_bogus="1" >
<item name="android:windowEnterAnimation">@anim/module_share_dialog_enter_anim</item>
<item name="android:windowExitAnimation">@anim/module_share_dialog_exit_anim</item>
</style>
</resources>