diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index 381aa2c9b2..230145ae80 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -9,7 +9,6 @@ import android.util.Log; import com.alibaba.android.arouter.launcher.ARouter; import com.auto.zhidao.logsdk.CrashSystem; import com.bytedance.boost_multidex.BoostMultiDex; -import com.elegant.utils.WindowUtil; import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.network.Utils; @@ -18,7 +17,6 @@ import com.mogo.module.back.BackToLauncherConst; import com.mogo.module.carchatting.card.CallChatConstant; import com.mogo.module.common.MogoModule; import com.mogo.module.common.MogoModulePaths; -import com.mogo.module.guide.GuideConstant; import com.mogo.module.main.service.MogoMainService; import com.mogo.module.media.MediaConstants; import com.mogo.module.push.base.PushUIConstants; @@ -67,7 +65,7 @@ public class MogoApplication extends AbsMogoApplication { Logger.init( BuildConfig.DEBUG ? LogLevel.DEBUG : LogLevel.OFF ); if ( DebugConfig.isLoadGuideModule() ) { - MogoModulePaths.addModule(new MogoModule(PATH_GUIDE_FRAGMENT, PATH_GUIDE_MODULE_NAME)); + MogoModulePaths.addModule( new MogoModule( PATH_GUIDE_FRAGMENT, PATH_GUIDE_MODULE_NAME ) ); } MogoModulePaths.addModule( new MogoModule( MogoServicePaths.PATH_AGREEMENT, AuthorizeConstant.PATH_AGREEMENT_MODULE_NAME ) ); diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java index 7b33644b91..de0604c38f 100644 --- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java +++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapViewWrapper.java @@ -19,6 +19,7 @@ import com.amap.api.maps.CameraUpdateFactory; import com.amap.api.maps.MapView; import com.amap.api.maps.model.BitmapDescriptorFactory; import com.amap.api.maps.model.CameraPosition; +import com.amap.api.maps.model.CameraPositionCreator; import com.amap.api.maps.model.LatLng; import com.amap.api.maps.model.LatLngBounds; import com.amap.api.maps.model.Marker; @@ -477,16 +478,41 @@ public class AMapViewWrapper implements IMogoMapView, Logger.d( TAG, Log.getStackTraceString( new Throwable() ) ); } Logger.d( TAG, "锁车" ); - MyLocationStyle style = getMyLocationStyle(); - if ( style == null ) { - style = new MyLocationStyle(); + Location target = NaviClient.getInstance( getContext() ).getCarLocation2(); + if ( target != null ) { + mMapView.getMap().animateCamera( CameraUpdateFactory.newCameraPosition( + new CameraPosition( new LatLng( target.getLatitude(), target.getLongitude() ), + mDefaultZoomLevel, + 0, + 0 + ) + ), new AMap.CancelableCallback() { + @Override + public void onFinish() { + changeMyLocationStyle(); + } + + @Override + public void onCancel() { + changeMyLocationStyle(); + } + } ); + } else { + changeMyLocationStyle(); } - style.myLocationType( MyLocationStyle.LOCATION_TYPE_FOLLOW ); - mMapView.getMap().setMyLocationStyle( style ); mIsCarLocked = true; } } + private void changeMyLocationStyle() { + MyLocationStyle style = getMyLocationStyle(); + if ( style == null ) { + style = new MyLocationStyle(); + } + style.myLocationType( MyLocationStyle.LOCATION_TYPE_FOLLOW ); + mMapView.getMap().setMyLocationStyle( style ); + } + @Override public void loseLockMode() { if ( DebugConfig.isDebug() ) { diff --git a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java index 0d9a233eaf..3ff0dcbb02 100644 --- a/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java +++ b/modules/mogo-module-extensions/src/main/java/com/mogo/module/extensions/entrance/EntranceFragment.java @@ -198,13 +198,6 @@ public class EntranceFragment extends MvpFragment { - if (!mStatusManager.isV2XShow()) { - mStatusManager.setUserInteractionStatus(TAG, true, false); - mMApUIController.setLockZoom(16); - mMApUIController.changeZoom(16.0f); - } - }, 1_000L); } });