Merge remote-tracking branch 'origin/feature/v1.0.5' into feature/v1.0.5
This commit is contained in:
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -27,29 +27,29 @@ PASSWORD=xintai2018
|
||||
RELEASE=false
|
||||
# 模块版本
|
||||
## 工程内模块
|
||||
MOGO_COMMONS_VERSION=1.0.3.9
|
||||
MOGO_UTILS_VERSION=1.0.3.9
|
||||
MAP_AMAP_VERSION=1.0.3.9
|
||||
MOGO_MAP_VERSION=1.0.3.9
|
||||
MOGO_MAP_API_VERSION=1.0.3.9
|
||||
MOGO_SERVICE_VERSION=1.0.3.9
|
||||
MOGO_SERVICE_API_VERSION=1.0.3.9
|
||||
MOGO_CONNECTION_VERSION=1.0.3.9
|
||||
MOGO_MODULE_APPS_VERSION=1.0.3.9
|
||||
MOGO_MODULE_NAVI_VERSION=1.0.3.9
|
||||
MOGO_MODULE_SHARE_VERSION=1.0.3.9
|
||||
MOGO_MODULE_COMMON_VERSION=1.0.3.9
|
||||
MOGO_MODULE_MAIN_VERSION=1.0.3.9
|
||||
MOGO_MODULE_MAP_VERSION=1.0.3.9
|
||||
MOGO_MODULE_SERVICE_VERSION=1.0.3.9
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=1.0.3.9
|
||||
MOGO_MODULE_SEARCH_VERSION=1.0.3.9
|
||||
MOGO_MODULE_BACK_VERSION=1.0.3.9
|
||||
MOGO_MODULE_GPS_SIMULATOR_VERSION=1.0.3.9
|
||||
MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.0.3.9
|
||||
MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.0.3.9
|
||||
MOGO_MODULE_AUTHORIZE_VERSION=1.0.3.9
|
||||
MOGO_MODULE_GUIDE_VERSION=1.0.3.9
|
||||
MOGO_COMMONS_VERSION=1.0.3.11
|
||||
MOGO_UTILS_VERSION=1.0.3.11
|
||||
MAP_AMAP_VERSION=1.0.3.11
|
||||
MOGO_MAP_VERSION=1.0.3.11
|
||||
MOGO_MAP_API_VERSION=1.0.3.11
|
||||
MOGO_SERVICE_VERSION=1.0.3.11
|
||||
MOGO_SERVICE_API_VERSION=1.0.3.11
|
||||
MOGO_CONNECTION_VERSION=1.0.3.11
|
||||
MOGO_MODULE_APPS_VERSION=1.0.3.11
|
||||
MOGO_MODULE_NAVI_VERSION=1.0.3.11
|
||||
MOGO_MODULE_SHARE_VERSION=1.0.3.11
|
||||
MOGO_MODULE_COMMON_VERSION=1.0.3.11
|
||||
MOGO_MODULE_MAIN_VERSION=1.0.3.11
|
||||
MOGO_MODULE_MAP_VERSION=1.0.3.11
|
||||
MOGO_MODULE_SERVICE_VERSION=1.0.3.11
|
||||
MOGO_MODULE_EXTENSIONS_VERSION=1.0.3.11
|
||||
MOGO_MODULE_SEARCH_VERSION=1.0.3.11
|
||||
MOGO_MODULE_BACK_VERSION=1.0.3.11
|
||||
MOGO_MODULE_GPS_SIMULATOR_VERSION=1.0.3.11
|
||||
MOGO_MODULE_GPS_SIMULATOR_DEBUG_VERSION=1.0.3.11
|
||||
MOGO_MODULE_GPS_SIMULATOR_NOOP_VERSION=1.0.3.11
|
||||
MOGO_MODULE_AUTHORIZE_VERSION=1.0.3.11
|
||||
MOGO_MODULE_GUIDE_VERSION=1.0.3.11
|
||||
|
||||
|
||||
## 工程外部模块
|
||||
@@ -66,7 +66,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
|
||||
# 在线车辆F
|
||||
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.1
|
||||
# v2x
|
||||
MOGO_MODULE_V2X_VERSION=1.0.5-SNAPSHOT
|
||||
MOGO_MODULE_V2X_VERSION=1.0.6-SNAPSHOT
|
||||
# 媒体卡片
|
||||
MOGO_MODULE_MEDIA_VERSION=1.0.4.3
|
||||
# 推送
|
||||
|
||||
@@ -49,6 +49,7 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
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.WindowUtils;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -862,4 +863,13 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
}
|
||||
mMapView.getMap().setMyLocationStyle( style );
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapCameraPosition getMapCameraPosition() {
|
||||
if ( checkAMapView() ) {
|
||||
CameraPosition cameraPosition = mMapView.getMap().getCameraPosition();
|
||||
return ObjectUtils.fromAMap( cameraPosition );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
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.logger.Logger;
|
||||
|
||||
@@ -260,4 +261,12 @@ public class AMapUIController implements IMogoMapUIController {
|
||||
mClient.setCarCursorOption( option );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapCameraPosition getMapCameraPosition() {
|
||||
if ( mClient != null ) {
|
||||
return mClient.getMapCameraPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.view.View;
|
||||
import com.amap.api.location.AMapLocation;
|
||||
import com.amap.api.maps.model.BitmapDescriptor;
|
||||
import com.amap.api.maps.model.BitmapDescriptorFactory;
|
||||
import com.amap.api.maps.model.CameraPosition;
|
||||
import com.amap.api.maps.model.LatLng;
|
||||
import com.amap.api.maps.model.MarkerOptions;
|
||||
import com.amap.api.maps.model.Poi;
|
||||
@@ -69,6 +70,7 @@ import com.mogo.map.search.inputtips.query.MogoInputtipsQuery;
|
||||
import com.mogo.map.search.poisearch.MogoPoiResult;
|
||||
import com.mogo.map.search.poisearch.MogoSearchBound;
|
||||
import com.mogo.map.search.poisearch.query.MogoPoiSearchQuery;
|
||||
import com.mogo.map.uicontroller.MapCameraPosition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
@@ -199,7 +201,7 @@ public class ObjectUtils {
|
||||
return new MogoLatLng( point.getLatitude(), point.getLongitude() );
|
||||
}
|
||||
|
||||
public static MogoLatLng fromAMap( LatLng point ) {
|
||||
public static MogoLatLng CameraPositionfromAMap( LatLng point ) {
|
||||
if ( point == null ) {
|
||||
return null;
|
||||
}
|
||||
@@ -736,4 +738,18 @@ public class ObjectUtils {
|
||||
target.setDottedLineType( PolylineOptions.DOTTEDLINE_TYPE_CIRCLE );
|
||||
return target;
|
||||
}
|
||||
|
||||
public static MogoLatLng fromAMap( LatLng latLng ) {
|
||||
if ( latLng == null ) {
|
||||
return null;
|
||||
}
|
||||
return new MogoLatLng( latLng.latitude, latLng.longitude );
|
||||
}
|
||||
|
||||
public static MapCameraPosition fromAMap( CameraPosition position ) {
|
||||
if ( position == null ) {
|
||||
return null;
|
||||
}
|
||||
return new MapCameraPosition( fromAMap( position.target ), position.bearing, position.tilt, position.zoom );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,4 +202,11 @@ public interface IMogoMapUIController {
|
||||
* @param option 为空时使用默认配置
|
||||
*/
|
||||
void setCarCursorOption( @Nullable CarCursorOption option );
|
||||
|
||||
/**
|
||||
* 获取地图视图描述快照
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
MapCameraPosition getMapCameraPosition();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.mogo.map.uicontroller;
|
||||
|
||||
import com.mogo.map.MogoLatLng;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-26
|
||||
* <p>
|
||||
* 地图视图描述
|
||||
*/
|
||||
public class MapCameraPosition {
|
||||
|
||||
private final MogoLatLng mLonLat;
|
||||
private final float mBearing;
|
||||
private final float mTilt;
|
||||
private final float mZoom;
|
||||
|
||||
public MapCameraPosition( MogoLatLng lonLat, float bearing, float tilt, float zoom ) {
|
||||
this.mLonLat = lonLat;
|
||||
this.mBearing = bearing;
|
||||
this.mTilt = tilt;
|
||||
this.mZoom = zoom;
|
||||
}
|
||||
|
||||
public MogoLatLng getLonLat() {
|
||||
return mLonLat;
|
||||
}
|
||||
|
||||
public float getBearing() {
|
||||
return mBearing;
|
||||
}
|
||||
|
||||
public float getTilt() {
|
||||
return mTilt;
|
||||
}
|
||||
|
||||
public float getZoom() {
|
||||
return mZoom;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
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 java.util.List;
|
||||
@@ -253,4 +254,12 @@ public class MogoMapUIController implements IMogoMapUIController {
|
||||
mDelegate.setCarCursorOption( option );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MapCameraPosition getMapCameraPosition() {
|
||||
if ( mDelegate != null ) {
|
||||
return mDelegate.getMapCameraPosition();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
./gradlew :services:mogo-service-api:clean :services:mogo-service-api:uploadArchives
|
||||
./gradlew :services:mogo-service:clean :services:mogo-service:uploadArchives
|
||||
./gradlew :modules:mogo-module-extensions:clean :modules:mogo-module-extensions:uploadArchives
|
||||
./gradlew :libraries:mogo-map-api:clean :libraries:mogo-map-api:uploadArchives
|
||||
./gradlew :libraries:map-amap:clean :libraries:map-amap:uploadArchives
|
||||
./gradlew :libraries:mogo-map:clean :libraries:mogo-map:uploadArchives
|
||||
|
||||
@@ -517,7 +517,9 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
doFrameAnimOnUploadButton();
|
||||
} else {
|
||||
mCurrentUploadFrame = 0;
|
||||
mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM );
|
||||
if ( mUploadFrameAnimHandler != null ) {
|
||||
mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM );
|
||||
}
|
||||
mUploading.setVisibility( View.GONE );
|
||||
mUpload.setVisibility( View.VISIBLE );
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
|
||||
android:background="@drawable/module_ext_dw_common_corner_bkg"
|
||||
android:gravity="center"
|
||||
android:text="退出\n导航"
|
||||
android:text="@string/module_ext_str_exit_navi"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_navi_exit_textSize"
|
||||
android:visibility="gone"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
<string name="module_map_str_search_hint">搜索目的地</string>
|
||||
<string name="module_map_str_upload_road_condition">分享</string>
|
||||
<string name="module_ext_str_exit_navi">退出导航</string>
|
||||
<string name="module_ext_str_continue_navi">继续导航</string>
|
||||
<string name="module_ext_str_exit_navi">退出\n导航</string>
|
||||
<string name="module_ext_str_continue_navi">继续\n导航</string>
|
||||
<string name="module_ext_str_exit_path">退出全览</string>
|
||||
<string name="mode_car_up">车头</string>
|
||||
<string name="mode_north_up">正北</string>
|
||||
|
||||
@@ -241,7 +241,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
|
||||
MogoModulePaths.addModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) );
|
||||
|
||||
mMogoModuleHandler = new MogoModulesManager( this );
|
||||
mMogoModuleHandler = new MogoModulesManager( this, getApis() );
|
||||
mMogoMapService = mServiceApis.getMapServiceApi();
|
||||
if ( mMogoMapService != null ) {
|
||||
mMogoMapService.getHostListenerRegister().registerHostMapListener( EventDispatchCenter.getInstance() );
|
||||
|
||||
@@ -4,7 +4,9 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.VoicePreemptType;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.CommonUtils;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
@@ -32,6 +34,7 @@ public class CardIntroduceConfigs {
|
||||
|
||||
public static Map< String, CardIntroduceConfig > sConfigs = new HashMap<>();
|
||||
private static IMogoStatusManager sStatusManager;
|
||||
private static IMogoNavi sNaiv;
|
||||
|
||||
static {
|
||||
sConfigs.put( ModuleNames.CARD_TYPE_BUSINESS_OPERATION, new CardIntroduceConfig( ModuleNames.CARD_TYPE_BUSINESS_OPERATION, "", 3 ) );
|
||||
@@ -42,8 +45,9 @@ public class CardIntroduceConfigs {
|
||||
sConfigs.put( ModuleNames.CARD_TYPE_NOVELTY, new CardIntroduceConfig( ModuleNames.CARD_TYPE_NOVELTY, "新鲜事,邀你给同城车友分享沿途封路、拥堵消息", 0 ) );
|
||||
}
|
||||
|
||||
public static void init( Context context, IMogoStatusManager manager ) {
|
||||
sStatusManager = manager;
|
||||
public static void init( Context context, IMogoServiceApis apis ) {
|
||||
sStatusManager = apis.getStatusManagerApi();
|
||||
sNaiv = apis.getMapServiceApi().getNavi( context );
|
||||
WorkThreadHandler.getInstance().post( () -> {
|
||||
sBroadcastConfigKey = KEY_VOICE_BROADCAST_CONFIG + CommonUtils.getVersionCode( context );
|
||||
String configsStr = SharedPrefsMgr.getInstance( context ).getString( sBroadcastConfigKey );
|
||||
@@ -78,6 +82,11 @@ public class CardIntroduceConfigs {
|
||||
}
|
||||
}
|
||||
|
||||
if ( sNaiv.isNaviing() ) {
|
||||
Logger.d( TAG, "do not broadcastCardIntroduce cause naving" );
|
||||
return;
|
||||
}
|
||||
|
||||
CardIntroduceConfig config = sConfigs.get( type );
|
||||
config.broadcastAmount++;
|
||||
|
||||
|
||||
@@ -53,18 +53,13 @@ public class MogoModulesManager implements MogoModulesHandler{
|
||||
public static final String KEY_SORTED_CARD_MODULES = "sortedCards";
|
||||
private List< String > mSortedCards = new ArrayList<>();
|
||||
|
||||
private IMogoIntentManager mMogoIntentManager;
|
||||
|
||||
public MogoModulesManager( MainActivity activity ) {
|
||||
public MogoModulesManager( MainActivity activity , IMogoServiceApis apis) {
|
||||
if ( activity == null ) {
|
||||
throw new NullPointerException( "activity can't be null." );
|
||||
}
|
||||
this.mActivity = activity;
|
||||
IMogoServiceApis apis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
|
||||
mMogoIntentManager = apis.getIntentManagerApi();
|
||||
|
||||
EventDispatchCenter.getInstance().registerReceiver(mMogoIntentManager);
|
||||
CardIntroduceConfigs.init( getContext(), apis.getStatusManagerApi() );
|
||||
EventDispatchCenter.getInstance().registerReceiver(apis.getIntentManagerApi());
|
||||
CardIntroduceConfigs.init( getContext(), apis );
|
||||
}
|
||||
|
||||
private Context getContext() {
|
||||
|
||||
Reference in New Issue
Block a user