Merge branch 'qa_byd' into qa_1.1
This commit is contained in:
@@ -30,7 +30,7 @@ public class ParamsUtil {
|
||||
public static Map< String, Object > getDynamicParams() {
|
||||
Map< String, Object > params = new ArrayMap();
|
||||
|
||||
final Map<String,Object> location = LocationHelper.getInstance().getLocationProperties();
|
||||
final Map< String, Object > location = LocationHelper.getInstance().getLocationProperties();
|
||||
if ( location != null ) {
|
||||
params.putAll( location );
|
||||
}
|
||||
@@ -71,7 +71,8 @@ public class ParamsUtil {
|
||||
public static Map< String, Object > getAnalyticsCustomParams() {
|
||||
Map< String, Object > map = new ArrayMap<>();
|
||||
map.put( "debug", DebugConfig.isDebug() ? 1 : 0 );
|
||||
map.put( "systemversion", Utils.getFotaVersion() );
|
||||
String fota = Utils.getFotaVersion();
|
||||
map.put( "systemversion", TextUtils.isEmpty( fota ) ? DebugConfig.getProductFlavor() : fota );
|
||||
map.put( "sn", Utils.getSn() );
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -321,6 +321,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
@Override
|
||||
public void onNaviMapMode( int mode ) {
|
||||
Logger.i( TAG, "mode=" + mode );
|
||||
MogoMapListenerHandler.getInstance().onMapModeChanged( mode == 0 ? EnumMapUI.CarUp_2D : EnumMapUI.NorthUP_2D );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,6 @@ dependencies {
|
||||
annotationProcessor rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.rxjava
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.tanluupload
|
||||
|
||||
if (Boolean.valueOf(RELEASE)) {
|
||||
api rootProject.ext.dependencies.mogomap
|
||||
|
||||
@@ -3,13 +3,11 @@ package com.mogo.module.extensions.entrance;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.text.TextUtils;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -18,6 +16,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
@@ -58,7 +57,6 @@ import com.mogo.utils.ResourcesHelper;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.glide.GlideApp;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
import com.zhidao.roadcondition.service.DelayService;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -168,15 +166,18 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mDisplayOverviewText = findViewById(R.id.module_ext_id_display_overview_text);
|
||||
mDisplayOverviewIcon = findViewById(R.id.module_ext_id_display_overview_icon);
|
||||
mDisplayOverview.setOnClickListener(view -> {
|
||||
if (!mStatusManager.isDisplayOverview()) {
|
||||
mMApUIController.displayOverview(mDisplayOverviewBounds);
|
||||
UiThreadHandler.removeCallbacks(mLockCarRunnable);
|
||||
UiThreadHandler.postDelayed(mLockCarRunnable, 20_000);
|
||||
} else {
|
||||
mMApUIController.recoverLockMode();
|
||||
UiThreadHandler.removeCallbacks(mLockCarRunnable);
|
||||
if (getContext() != null) {
|
||||
// 加此判断是解决下面setDisplayOverview后,本Fragment回调中出现not attached to a context问题
|
||||
if (!mStatusManager.isDisplayOverview()) {
|
||||
mMApUIController.displayOverview(mDisplayOverviewBounds);
|
||||
UiThreadHandler.removeCallbacks(mLockCarRunnable);
|
||||
UiThreadHandler.postDelayed(mLockCarRunnable, 20_000);
|
||||
} else {
|
||||
mMApUIController.recoverLockMode();
|
||||
UiThreadHandler.removeCallbacks(mLockCarRunnable);
|
||||
}
|
||||
mStatusManager.setDisplayOverview(TAG, !mStatusManager.isDisplayOverview());
|
||||
}
|
||||
mStatusManager.setDisplayOverview(TAG, !mStatusManager.isDisplayOverview());
|
||||
});
|
||||
|
||||
mMove2CurrentLocation = findViewById(R.id.module_entrance_id_move2_current_location);
|
||||
@@ -239,9 +240,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
} else {
|
||||
mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
}
|
||||
mCameraMode.setSelected(!mCameraMode.isSelected());
|
||||
mCameraMode.setText(getString(mCameraMode.isSelected() ? R.string.mode_car_up :
|
||||
R.string.mode_north_up));
|
||||
// mCameraMode.setSelected(!mCameraMode.isSelected());
|
||||
// mCameraMode.setText(getString(mCameraMode.isSelected() ? R.string.mode_car_up :
|
||||
// R.string.mode_north_up));
|
||||
});
|
||||
|
||||
|
||||
@@ -463,23 +464,18 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
if (isTrue) {
|
||||
mDisplayOverviewText.setText("退出全览");
|
||||
mDisplayOverviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||
getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize));
|
||||
AbsMogoApplication.getApp().getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize));
|
||||
mCameraMode.setVisibility(View.GONE);
|
||||
} else {
|
||||
mDisplayOverviewText.setText("全览");
|
||||
mDisplayOverviewText.setTextSize(TypedValue.COMPLEX_UNIT_PX,
|
||||
getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize_large));
|
||||
AbsMogoApplication.getApp().getResources().getDimensionPixelSize(R.dimen.module_ext_display_overview_textSize_large));
|
||||
if (CustomNaviInterrupter.getInstance().interrupt()) {
|
||||
mCameraMode.setVisibility(View.GONE);
|
||||
} else {
|
||||
mCameraMode.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
} else if (descriptor == StatusDescriptor.ACC_STATUS) {
|
||||
Log.d(TAG, " onStatusChanged isTrue = " + isTrue);
|
||||
if (isTrue) {
|
||||
DelayService.Companion.launchService(getContext());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,8 +511,9 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
}
|
||||
|
||||
private int[] heights = new int[]{100,200,300};
|
||||
private int[] heights = new int[]{100, 200, 300};
|
||||
private int currentHeight;
|
||||
|
||||
private void debugTopView() {
|
||||
findViewById(R.id.btnDebugCtrlNaviView).setOnClickListener(view -> {
|
||||
if (!toggle) {
|
||||
@@ -585,4 +582,13 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapModeChanged( EnumMapUI ui ) {
|
||||
if ( mCameraMode == null ) {
|
||||
return;
|
||||
}
|
||||
mCameraMode.setSelected(ui == EnumMapUI.NorthUP_2D);
|
||||
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up : R.string.mode_north_up));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +63,6 @@ public class MarkerServiceHandler {
|
||||
private static ICarsChattingProvider sCarChatting;
|
||||
private static IMogoGpsSimulatorManager sGpsSimulatorManager;
|
||||
|
||||
private static MapMarkerManager sMapMarkerManager;
|
||||
|
||||
public static synchronized void init( final Context context ) {
|
||||
|
||||
if ( sGpsSimulatorManager != null ) {
|
||||
@@ -92,8 +90,7 @@ public class MarkerServiceHandler {
|
||||
|
||||
sCarChatting = ( ICarsChattingProvider ) ARouter.getInstance().build( CallChattingProviderConstant.CAR_CALL_PROVIDER ).navigation( context );
|
||||
|
||||
sMapMarkerManager = MapMarkerManager.getInstance();
|
||||
sMapMarkerManager.init( context );
|
||||
MapMarkerManager.getInstance().init( context );
|
||||
|
||||
sGpsSimulatorManager = ARouter.getInstance().navigation( IMogoGpsSimulatorManager.class );
|
||||
}
|
||||
@@ -143,7 +140,7 @@ public class MarkerServiceHandler {
|
||||
}
|
||||
|
||||
public static MapMarkerManager getMapMarkerManager() {
|
||||
return sMapMarkerManager;
|
||||
return MapMarkerManager.getInstance();
|
||||
}
|
||||
|
||||
public static IMogoRegisterCenter getRegisterCenter() {
|
||||
|
||||
@@ -77,6 +77,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
private Rect mMarkerDisplayBounds;
|
||||
|
||||
private MapMarkerManager() {
|
||||
mContext = AbsMogoApplication.getApp();
|
||||
}
|
||||
|
||||
public static synchronized MapMarkerManager getInstance() {
|
||||
@@ -95,7 +96,6 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
|
||||
* @param context
|
||||
*/
|
||||
public void init( Context context ) {
|
||||
mContext = context;
|
||||
mRefreshModel = new RefreshModel( mContext );
|
||||
|
||||
// 长连接
|
||||
|
||||
@@ -34,12 +34,14 @@ class BydSplashFragment :MvpFragment<BydSplashFragment,BydSplashPresenter>(),Han
|
||||
|
||||
override fun handleMessage(msg: Message): Boolean {
|
||||
if (msg.what == MSG_COUNT_DOWN) {
|
||||
countDownTime--
|
||||
if(countDownTime>0) {
|
||||
tvCountDown.text = countDownTime.toString()
|
||||
handler.sendEmptyMessageDelayed(MSG_COUNT_DOWN, DEFAULT_COUNT_DOWN_DELAY)
|
||||
}else{
|
||||
hideSplash()
|
||||
tvCountDown?.also {
|
||||
countDownTime--
|
||||
if(countDownTime>0) {
|
||||
it.text = countDownTime.toString()
|
||||
handler.sendEmptyMessageDelayed(MSG_COUNT_DOWN, DEFAULT_COUNT_DOWN_DELAY)
|
||||
}else{
|
||||
hideSplash()
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -157,7 +157,6 @@ public class V2XFatigueDrivingWindow extends RelativeLayout
|
||||
|
||||
@Override
|
||||
public void onCalculateSuccess() {
|
||||
V2XServiceManager.getMogoRegisterCenter().unregisterMogoNaviListener( "test");
|
||||
V2XServiceManager.getNavi().startNavi(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user