Merge branch 'dev' into qa

This commit is contained in:
wangcongtao
2020-06-17 12:21:10 +08:00
42 changed files with 714 additions and 139 deletions

View File

@@ -281,4 +281,3 @@ def getGitCommit() {
assert !gitCommit.isEmpty()
gitCommit
}

View File

@@ -133,9 +133,9 @@ public class AbsMogoApplication extends Application {
} );
}
private static void getTicket(TicketInfoCallback callback){
private static void getTicket( TicketInfoCallback callback ) {
if ( DebugConfig.isLauncher() ) {
AccountClientManager.getTicket(callback);
AccountClientManager.getTicket( callback );
} else {
AccountClientManager.getAppTicket( callback );
}

View File

@@ -0,0 +1,330 @@
package com.mogo.map.impl.amap.marker;
import com.amap.api.maps.AMap;
import com.amap.api.maps.AMapUtils;
import com.amap.api.maps.model.BasePointOverlay;
import com.amap.api.maps.model.LatLng;
import com.autonavi.amap.mapcore.IPoint;
import com.autonavi.amap.mapcore.MapProjection;
import com.mogo.utils.logger.Logger;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @author congtaowang
* @since 2020/6/15
* <p>
*/
class CombineMovingPointOverlay {
private static final String TAG = "CombineMovingPointOverlay";
private AMap mAMap;
private long mDuration = 1_000L;
private long mStepDuration = 20L;
private LinkedList< LatLng > mPoints = new LinkedList<>();
private LinkedList< Double > mEachDistance = new LinkedList<>();
private double mTotalDistance = 0.0D;
private double mRemainDistance = 0.0D;
private ExecutorService mThreadPools;
private Object mLock = new Object();
private BasePointOverlay mBaseOverlay = null;
private int mIndex = 0;
private boolean mUseDefaultDescriptor = false;
AtomicBoolean mExitFlag = new AtomicBoolean( false );
private MoveListener mMoveListener;
private Status mStatus;
private long mPauseMillis;
private long mAnimationBeginTime;
public CombineMovingPointOverlay( AMap amap, BasePointOverlay baseOverlay ) {
mStatus = Status.Status1;
mAnimationBeginTime = System.currentTimeMillis();
if ( amap != null && baseOverlay != null ) {
this.mAMap = amap;
this.mBaseOverlay = baseOverlay;
mThreadPools = new ThreadPoolExecutor( 1, 2, 5L, TimeUnit.SECONDS, new SynchronousQueue(), new ThreadFactoryImpl() );
}
}
public void setMoveListener( MoveListener moveListener ) {
this.mMoveListener = moveListener;
}
public void setPoints( List< LatLng > list ) {
synchronized ( mLock ) {
if ( list != null && list.size() >= 2 ) {
stopMove();
if ( mPoints != null ) {
mPoints.clear();
}
Iterator< LatLng > iterator = list.listIterator();
while ( iterator.hasNext() ) {
LatLng latLng = iterator.next();
if ( latLng != null ) {
mPoints.add( latLng );
}
}
mEachDistance.clear();
mTotalDistance = 0.0D;
for ( int i = 0; i < mPoints.size(); i++ ) {
double distance = AMapUtils.calculateLineDistance( mPoints.get( i ), mPoints.get( i + 1 ) );
mEachDistance.add( distance );
mTotalDistance += distance;
}
mRemainDistance = mTotalDistance;
mBaseOverlay.setPosition( mPoints.get( 0 ) );
reset();
}
}
}
public int getIndex() {
return mIndex;
}
public BasePointOverlay getBaseOverlay() {
return mBaseOverlay;
}
public void destroy() {
try {
removeMarker();
mThreadPools.shutdown();
synchronized ( mLock ) {
mPoints.clear();
mEachDistance.clear();
;
}
} catch ( Exception e ) {
}
}
public void removeMarker() {
try {
reset();
if ( mBaseOverlay != null ) {
mBaseOverlay.remove();
mBaseOverlay = null;
}
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
public void stopMove() {
if ( mStatus == Status.Status3 ) {
mStatus = Status.Status4;
mPauseMillis = System.currentTimeMillis();
}
}
private void reset() {
if ( mStatus == Status.Status3 || mStatus == Status.Status4 ) {
mExitFlag.set( true );
try {
mThreadPools.awaitTermination( mStepDuration + 20L, TimeUnit.MICROSECONDS );
mBaseOverlay.setAnimation( null );
mStatus = Status.Status1;
} catch ( InterruptedException e ) {
Logger.e( TAG, e, "error." );
}
}
}
public void resetIndex() {
mIndex = 0;
}
public void setTotalDuration( int seconds ) {
mDuration = seconds * 1_000L;
}
public void startSmoothMove() {
if ( mStatus == Status.Status4 ) {
mStatus = Status.Status3;
long interval = System.currentTimeMillis() - mPauseMillis;
mAnimationBeginTime += interval;
} else {
if ( mStatus == Status.Status1 || mStatus == Status.Status5 ) {
if ( mPoints.size() <= 0 ) {
return;
}
mIndex = 0;
mThreadPools.execute( new MarkerMovingRunnable() );
}
}
}
public void setVisible( boolean visible ) {
if ( mBaseOverlay != null ) {
try {
mBaseOverlay.setVisible( visible );
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
}
private class MarkerMovingRunnable implements Runnable {
@Override
public void run() {
mAnimationBeginTime = System.currentTimeMillis();
mStatus = Status.Status2;
mExitFlag.set( false );
try {
for ( ; !mExitFlag.get() && mIndex <= mPoints.size() - 1; Thread.sleep( mStepDuration ) ) {
synchronized ( mLock ) {
if ( mExitFlag.get() ) {
return;
}
if ( mStatus == Status.Status4 ) {
long interval = System.currentTimeMillis() - mAnimationBeginTime;
IPoint point = getCurPosition( interval );
mBaseOverlay.setGeoPoint( point );
mStatus = Status.Status3;
}
}
}
mStatus = Status.Status5;
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
}
private IPoint getCurPosition( long interval ) {
if ( interval > mDuration ) {
mExitFlag.set( true );
IPoint point = new IPoint();
mIndex = mPoints.size() - 1;
LatLng latLng = mPoints.get( mIndex );
--mIndex;
mIndex = Math.max( mIndex, 0 );
mRemainDistance = 0.0D;
MapProjection.lonlat2Geo( latLng.longitude, latLng.latitude, point );
if ( mMoveListener != null ) {
mMoveListener.move( mRemainDistance );
}
return point;
} else {
double step = interval * mTotalDistance / mDuration;
mRemainDistance = mTotalDistance - step;
int targetIndex = 0;
double val = 1.0D;
for ( int i = 0; i < mEachDistance.size(); i++ ) {
double distance = mEachDistance.get( i );
if ( step <= distance ) {
if ( distance > 0.0D ) {
val = step / distance;
}
targetIndex = i;
break;
}
step -= distance;
}
if ( targetIndex != mIndex && mMoveListener != null ) {
mMoveListener.move( mRemainDistance );
}
mIndex = targetIndex;
LatLng latLng = mPoints.get( mIndex );
LatLng latLng1 = mPoints.get( mIndex + 1 );
IPoint point = new IPoint();
MapProjection.lonlat2Geo( latLng.longitude, latLng.latitude, point );
IPoint point1 = new IPoint();
MapProjection.lonlat2Geo( latLng1.longitude, latLng1.latitude, point1 );
int xDelta = point1.x - point.x;
int yDelta = point1.y - point.y;
if ( AMapUtils.calculateLineDistance( latLng, latLng1 ) > 1.0F ) {
float rotate = getRotate( point, point1 );
setRotate( rotate );
}
return new IPoint( ( ( int ) ( point.x + ( ( double ) xDelta ) * val ) ), ( ( int ) ( point.y + ( ( double ) yDelta ) * val ) ) );
}
}
private float getRotate( IPoint point, IPoint point1 ) {
if ( point != null && point1 != null ) {
double py1 = ( double ) point1.y;
double py = ( double ) point.y;
double px = ( double ) point.x;
return ( float ) ( Math.atan2( ( double ) point1.x - px, py - py1 ) / 3.141592653589793D * 180.0D );
} else {
return 0.0F;
}
}
public void setPoint( LatLng latLng ) {
if ( mBaseOverlay != null ) {
try {
mBaseOverlay.setPosition( latLng );
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
}
public void setRotate( float rotate ) {
if ( mBaseOverlay == null ) {
return;
}
if ( mAMap == null ) {
return;
}
if ( mAMap.getCameraPosition() == null ) {
return;
}
mBaseOverlay.setRotateAngle( 360.0F - rotate + mAMap.getCameraPosition().bearing );
}
public LatLng getPosition() {
if ( mBaseOverlay != null ) {
return mBaseOverlay.getPosition();
}
return null;
}
private enum Status {
Status1,
Status2,
Status3,
Status4,
Status5
}
public interface MoveListener {
void move( double val );
}
private static class ThreadFactoryImpl implements ThreadFactory {
private static int mCounter = 1;
@Override
public Thread newThread( Runnable r ) {
return new Thread( r, "MoveSmoothThread - " + mCounter++ );
}
}
}

View File

@@ -27,6 +27,8 @@ import com.mogo.service.fragmentmanager.IMogoFragmentManager;
*/
public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresenter > implements AppsListView, FragmentStackTransactionListener {
private static final String TAG = "AppsListActivity";
private BottomSheetBehavior mBottomSheetBehavior;
private IMogoFragmentManager mMogoFragmentManager;
@@ -38,12 +40,13 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
@Override
protected void onCreate( @Nullable Bundle savedInstanceState ) {
overridePendingTransition( R.anim.module_apps_anim_enter, 0);
getWindow().addFlags( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
overridePendingTransition( R.anim.module_apps_anim_enter, 0 );
getWindow().addFlags( WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS );
if ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP ) {
getWindow().setStatusBarColor( Color.BLACK );
}
super.onCreate( savedInstanceState );
AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, true );
}
@Override
@@ -53,8 +56,9 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
@Override
protected void initViews() {
getSupportFragmentManager().beginTransaction()
.add( R.id.module_apps_id_container, new AppsFragment() )
.replace( R.id.module_apps_id_container, new AppsFragment() )
.commitAllowingStateLoss();
mBottomSheetBehavior = BottomSheetBehavior.from( findViewById( R.id.module_apps_id_container ) );
@@ -74,14 +78,14 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
} );
mBottomSheetBehavior.setState( BottomSheetBehavior.STATE_EXPANDED );
mMogoFragmentManager = ( IMogoFragmentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_FRAGMENT_MANAGER ).navigation( this );
mMogoFragmentManager = AppServiceHandler.getApis().getFragmentManagerApi();
mMogoFragmentManager.addMainFragmentStackTransactionListener( this );
}
@NonNull
@Override
protected AppsListPresenter createPresenter() {
return new AppsListPresenter(this);
return new AppsListPresenter( this );
}
@Override
@@ -100,12 +104,13 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
@Override
public void closeAppsPanel() {
finish();
overridePendingTransition( R.anim.module_apps_anim_enter, R.anim.module_apps_anim_exit);
overridePendingTransition( R.anim.module_apps_anim_enter, R.anim.module_apps_anim_exit );
}
@Override
protected void onDestroy() {
super.onDestroy();
AppServiceHandler.getApis().getStatusManagerApi().setAppListUIShow( TAG, false );
mMogoFragmentManager.removeMainFragmentStackTransactionListener( this );
mMogoFragmentManager = null;
mBottomSheetBehavior = null;

View File

@@ -72,7 +72,6 @@ public class AppsPresenter extends Presenter< AppsView > {
mAnalytics = mApis.getAnalyticsApi();
mMogoStatusManager = mApis.getStatusManagerApi();
mMogoStatusManager.setAppListUIShow( TAG, true );
}
private void renderAppsList() {
@@ -202,7 +201,6 @@ public class AppsPresenter extends Presenter< AppsView > {
@Override
public void onDestroy( @NonNull LifecycleOwner owner ) {
super.onDestroy( owner );
mMogoStatusManager.setAppListUIShow( TAG, false );
AppsListChangedLiveData.getInstance().release();
mView = null;
mLauncher.destroy();

View File

@@ -14,6 +14,8 @@ import com.mogo.module.apps.R;
* 基础类均衡器、方控学习、蓝牙、FM、车载设置、AUX
*/
public enum AppEnum {
// 酷我音乐
KwMusic("酷我音乐", "cn.kuwo.kwmusiccar", R.drawable.ic_kuwo),
// 爱趣听
WeCarFlow("爱趣听","com.tencent.wecarflow", R.drawable.module_apps_ic_we_car_flow ),
//"QQ音乐",

View File

@@ -15,7 +15,8 @@ public class NavigatorApps {
private static AppInfo app = new AppInfo( "导航", "com.mogo.launcher.navi.search", "", 0, null, R.drawable.module_apps_ic_navigator_navi, 1 );
private static AppInfo app_ = new AppInfo( "导航", "com.mogo.launcher.navi.search", "", 0, null, R.drawable.module_apps_ic_navigator_navi_disable, 1 );
private static AppInfo app2 = new AppInfo( "音乐", "com.tencent.wecarflow", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
// private static AppInfo app2 = new AppInfo( "音乐", "com.tencent.wecarflow", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
private static AppInfo app2 = new AppInfo( "音乐", "cn.kuwo.kwmusiccar", "", 0, null, R.drawable.module_apps_ic_navigator_media, 2 );
private static AppInfo app3 = new AppInfo( "车聊聊", "com.zhidao.imdemo", "", 0, null, R.drawable.module_apps_ic_navigator_im, 6 );
private static AppInfo app4 = new AppInfo( "全部应用", "com.mogo.launcher.applist", "", 0, null, R.drawable.module_apps_ic_navigator_applist, 4 );

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -24,6 +24,6 @@
<dimen name="module_apps_navigator_icon_width">140px</dimen>
<dimen name="module_apps_navigator_icon_height">140px</dimen>
<dimen name="module_apps_navigator_icon_divider">30px</dimen>
<dimen name="module_apps_voice_icon_width">110px</dimen>
<dimen name="module_apps_voice_icon_height">110px</dimen>
<dimen name="module_apps_voice_icon_width">100px</dimen>
<dimen name="module_apps_voice_icon_height">100px</dimen>
</resources>

View File

@@ -24,6 +24,6 @@
<dimen name="module_apps_navigator_icon_width">78px</dimen>
<dimen name="module_apps_navigator_icon_height">78px</dimen>
<dimen name="module_apps_navigator_icon_divider">17px</dimen>
<dimen name="module_apps_voice_icon_width">70px</dimen>
<dimen name="module_apps_voice_icon_height">70px</dimen>
<dimen name="module_apps_voice_icon_width">60px</dimen>
<dimen name="module_apps_voice_icon_height">60px</dimen>
</resources>

View File

@@ -1,11 +1,13 @@
package com.mogo.module.common.entity;
import com.mogo.commons.data.BaseData;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("unused")
public class MarkerCardResult implements Serializable {
public class MarkerCardResult extends BaseData {
private List<String> dataType; // 要查询的类型
private List<MarkerCarChat> carChat;

View File

@@ -6,11 +6,15 @@ import android.text.TextUtils;
import java.io.Serializable;
/**
* 道路情报V2X预警地图道路事件POI违章停车POI等
*/
@SuppressWarnings("unused")
public class MarkerExploreWayItem implements Serializable {
private String thumbnail;
private String url;
private String content;
public String getThumbnail() {
if (TextUtils.isEmpty(thumbnail)) {
@@ -34,11 +38,20 @@ public class MarkerExploreWayItem implements Serializable {
this.url = url;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public String toString() {
return "MarkerExploreWayItem{" +
"thumbnail='" + thumbnail + '\'' +
", url='" + url + '\'' +
", content='" + content + '\'' +
'}';
}
}

View File

@@ -9,33 +9,35 @@ package com.mogo.module.common.entity;
*/
public interface MarkerPoiTypeEnum {
//加油站
public String GAS_STATION = "10001";
String GAS_STATION = "10001";
//交通检查
public String TRAFFIC_CHECK = "10002";
String TRAFFIC_CHECK = "10002";
//封路
public String ROAD_CLOSED = "10003";
String ROAD_CLOSED = "10003";
//商场打折
public String SHOP_DISCOUNT = "10004";
String SHOP_DISCOUNT = "10004";
//4S店
public String FOURS_4S = "10005";
String FOURS_4S = "10005";
//施工
public String FOURS_ROAD_WORK = "10006";
String FOURS_ROAD_WORK = "10006";
//拥堵
public String FOURS_BLOCK_UP = "10007";
String FOURS_BLOCK_UP = "10007";
//积水
public String FOURS_PONDING = "10008";
String FOURS_PONDING = "10008";
//超市打折
public String FOURS_SHOP_FREE = "10009";
String FOURS_SHOP_FREE = "10009";
//浓雾
public String FOURS_FOG = "10010";
String FOURS_FOG = "10010";
//结冰
public String FOURS_ICE = "10011";
String FOURS_ICE = "10011";
//停车场
public String FOURS_PARKING = "10012";
String FOURS_PARKING = "10012";
//事故
public String FOURS_ACCIDENT = "10013";
String FOURS_ACCIDENT = "10013";
//身边
public String FOURS_NEALY = "10014";
String FOURS_NEALY = "10014";
//实时路况
public String FOURS_LIVING = "10015";
String FOURS_LIVING = "10015";
//违章停车
String ILLEGAL_PARK_LIVING = "10016";
}

View File

@@ -56,9 +56,9 @@ public class MapCenterPointStrategy {
{
// 导航场景 vs 道路事件展示场景,定位视图右下角偏下
Map< Integer, MapCenterPoint > naviWithRoadEvent = new HashMap<>();
naviWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.68333333333D ) );
naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.68333333333D ) );
naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.68333333333D ) );
naviWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.73936170212766D ) );
naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.73936170212766D ) );
naviWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.73936170212766D ) );
naviWithRoadEvent.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.683333333333D ) );
sStrategies.put( Scene.NAVI_WITH_ROAD_EVENT, naviWithRoadEvent );
}
@@ -76,9 +76,9 @@ public class MapCenterPointStrategy {
{
// 巡航场景 vs 道路事件展示场景
Map< Integer, MapCenterPoint > aimlessWithRoadEvent = new HashMap<>();
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.585 ) );
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.585 ) );
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.585 ) );
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_D80X, new MapCenterPoint( 0.669444444444444, 0.68617 ) );
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84X, new MapCenterPoint( 0.734375D, 0.68617 ) );
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_E84XCD, new MapCenterPoint( 0.734375D, 0.68617 ) );
aimlessWithRoadEvent.put( CarSeries.CAR_SERIES_F80X, new MapCenterPoint( 0.705208333D, 0.599074074D ) );
sStrategies.put( Scene.AIMLESS_WITH_ROAD_EVENT, aimlessWithRoadEvent );
}

View File

@@ -484,9 +484,9 @@ public class TopViewAnimHelper {
arriveTimeGroup.setVisibility(View.GONE);
int scene = 0;
if (isTopViewOut) {
scene = Scene.AIMLESS_WITH_ROAD_EVENT;
} else {
scene = Scene.AIMLESS;
} else {
scene = Scene.AIMLESS_WITH_ROAD_EVENT;
}
Logger.d(TAG, "hide navi setMapCenterPointByScene: " + scene);
MapCenterPointStrategy.setMapCenterPointByScene(mogoMapUIController, scene);

View File

@@ -2,7 +2,6 @@ package com.mogo.module.main;
import android.content.Intent;
import android.location.Location;
import android.text.TextUtils;
import android.view.MotionEvent;
import com.mogo.map.MogoLatLng;
@@ -21,20 +20,14 @@ import com.mogo.map.navi.MogoCongestionInfo;
import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
import com.mogo.map.uicontroller.EnumMapUI;
import com.mogo.module.common.entity.MarkerNoveltyInfo;
import com.mogo.module.common.entity.MarkerShareMusic;
import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.main.registercenter.MogoRegisterCenterHandler;
import com.mogo.module.service.MarkerServiceHandler;
import com.mogo.module.service.receiver.MogoReceiver;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.intent.IMogoIntentManager;
import com.mogo.service.module.IMogoModuleLifecycle;
import com.mogo.utils.logger.Logger;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
* @author congtaowang
@@ -83,7 +76,6 @@ public class EventDispatchCenter implements
IMogoMarkerClickListener listener = MogoRegisterCenterHandler.getInstance().getMarkerListener( marker.getOwner() );
if ( listener != null ) {
try {
trackMarkerClickEvent( marker );
return listener.onMarkerClicked( marker );
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
@@ -92,28 +84,6 @@ public class EventDispatchCenter implements
return false;
}
/**
* marker 点击埋点
*
* @param marker
*/
private void trackMarkerClickEvent( IMogoMarker marker ) {
if ( marker == null || TextUtils.isEmpty( marker.getOwner() ) ) {
return;
}
// 数据统计代码
final Map< String, Object > properties = new HashMap<>();
properties.put( "poitype", marker.getOwner() );
MarkerShowEntity showEntity = ( MarkerShowEntity ) marker.getObject();
Object bindObj = showEntity.getBindObj();
if ( bindObj instanceof MarkerNoveltyInfo ) {
properties.put( "contenttype", ( ( MarkerNoveltyInfo ) bindObj ).getPoiType() );
} else if ( bindObj instanceof MarkerShareMusic ) {
properties.put( "contenttype", ( ( MarkerShareMusic ) bindObj ).getShareType() + "" );
}
MarkerServiceHandler.getMogoAnalytics().track( "Launcher_Icon_Click", properties );
}
@Override
public void onUpdateTraffic2( MogoTraffic traffic ) {
Iterator< IMogoAimlessModeListener > iterator = MogoRegisterCenterHandler.getInstance().getAimlessModeListeners();

View File

@@ -147,6 +147,8 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
// 启动一些基本的服务:定位等
startBaseService();
Log.i( "timer", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
} );
MogoModulesManager.getInstance().loadMapModule( R.id.module_main_id_map_fragment_container );
@@ -159,8 +161,6 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
hideLayout();
}
} );
Log.i( "timer", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
}
private void startBaseService() {

View File

@@ -9,7 +9,7 @@
<FrameLayout
android:id="@+id/module_main_id_map_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"/>
<FrameLayout
android:id="@+id/module_main_id_map_left_shadow_frame"
@@ -60,4 +60,6 @@
android:background="@drawable/module_main_launcher_bg"
android:visibility="visible"
tools:visibility="gone" />
</FrameLayout>

View File

@@ -46,6 +46,7 @@ dependencies {
// 爱趣听sdk上传到了公司的maven用来规避RELEASE时ClassDefNotFound异常后续若爱趣听有新的sdk也需要上传maven
implementation "com.mogo.tencent.wecarflow:mogo-wecarflow:+@aar"
implementation "com.mogo.kwmusic:mogo-kwmusic:+"
if (Boolean.valueOf(RELEASE)) {
implementation rootProject.ext.dependencies.mogomap

View File

@@ -11,6 +11,7 @@ import com.mogo.map.listener.IMogoMapListener;
import com.mogo.map.location.IMogoLocationListener;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.module.media.window.MediaWindow2;
import com.mogo.service.module.IMogoModuleLifecycle;
import com.mogo.service.module.IMogoModuleProvider;
import com.mogo.service.module.ModuleType;

View File

@@ -50,4 +50,9 @@ public abstract class BaseMediaPresenter<V extends IView> extends Presenter<V> {
* 下一首
*/
public abstract void next();
/**
* 打开对应的应用
*/
public abstract void openApp();
}

View File

@@ -0,0 +1,196 @@
package com.mogo.module.media.presenter;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.module.media.MediaConstants;
import com.mogo.module.media.constants.MusicConstant;
import com.mogo.module.media.model.MediaInfoData;
import com.mogo.module.media.view.IMusicView;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.logger.Logger;
import cn.kuwo.autosdk.api.KWAPI;
import cn.kuwo.autosdk.api.OnGetSongImgUrlListener;
import cn.kuwo.autosdk.api.PlayState;
import cn.kuwo.autosdk.api.PlayerStatus;
import cn.kuwo.base.bean.Music;
/**
* 适配酷我的presenter
*
* @author tongchenfei
*/
public class KwPresenter extends BaseMediaPresenter<IMusicView> {
private static final String TAG = "KwPresenter";
private KWAPI kwapi;
private boolean isBind = false;
private MediaInfoData currentMedia = new MediaInfoData();
public KwPresenter(IMusicView view) {
super(view);
}
@Override
public void init(Context context) {
kwapi = KWAPI.createKWAPI(context, "auto");
kwapi.registerConnectedListener(b -> {
Logger.d(TAG, "onConnected: " + b);
isBind = b;
if (!isBind) {
mView.onMusicStopped();
}else{
PlayerStatus currentState = kwapi.getPlayerStatus();
Logger.d(TAG, "check current status: " + currentState);
if(currentState == PlayerStatus.BUFFERING||currentState == PlayerStatus.PLAYING){
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
kwapi.getSongPicUrl(kwapi.getNowPlayingMusic(), onGetSongImgUrlListener);
startTrackTrackProgress();
mView.onMusicPlaying();
}
}
});
kwapi.registerExitListener(() -> {
Logger.d(TAG, "onExit===");
mView.onAppExit();
});
kwapi.registerPlayerStatusListener((playerStatus, music) -> {
Logger.d(TAG, "onPlayerStatusListener: " + playerStatus);
switch (playerStatus) {
case BUFFERING:
kwapi.getSongPicUrl(music, onGetSongImgUrlListener);
break;
case PLAYING:
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PLAYING);
kwapi.getSongPicUrl(music, onGetSongImgUrlListener);
startTrackTrackProgress();
mView.onMusicPlaying();
break;
case INIT:
case PAUSE:
case STOP:
currentMedia.setPlayState(MusicConstant.PLAY_STATE_PAUSE_OR_STOP);
stopTrackTrackProgress();
mView.onMusicPause();
break;
default:
break;
}
});
IMogoServiceApis serviceApis =
(IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(context);
serviceApis.getStatusManagerApi().registerStatusChangedListener(MediaConstants.MODULE_TYPE, StatusDescriptor.MAIN_PAGE_RESUME, new IMogoStatusChangedListener() {
@Override
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
if (isTrue) {
Logger.d(TAG, "onResume, isBind: " + isBind);
// 需要在resume时候判断绑定关系是否正常
if (!isBind) {
// 未绑定,需要重新绑定,同时第一次绑定初始化也是在此处
kwapi.bindAutoSdkService();
}
}
}
});
kwapi.bindAutoSdkService();
}
@Override
public void play(MediaInfoData mediaInfoData) {
// if (kwapi.isKuwoRunning()) {
kwapi.setPlayState(PlayState.STATE_PLAY);
// } else {
// kwapi.randomPlayMusic();
// }
}
@Override
public void pause(MediaInfoData mediaInfoData) {
if (kwapi.isKuwoRunning()) {
kwapi.setPlayState(PlayState.STATE_PAUSE);
}
}
@Override
public void stop(MediaInfoData mediaInfoData) {
}
@Override
public void pre() {
if (kwapi.isKuwoRunning()) {
kwapi.setPlayState(PlayState.STATE_PRE);
}
}
@Override
public void next() {
if (kwapi.isKuwoRunning()) {
kwapi.setPlayState(PlayState.STATE_NEXT);
}
}
private Handler.Callback callback = new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
if (isTrackingProgress) {
mView.onMusicProgress(kwapi.getCurrentPos(), kwapi.getCurrentMusicDuration());
msg.getTarget().sendEmptyMessageDelayed(MSG_TRACK_PROGRESS,
MSG_TRACK_PROGRESS_DELAY);
}
return false;
}
};
private Handler handler = new Handler(callback);
private static final int MSG_TRACK_PROGRESS = 1001;
private static final long MSG_TRACK_PROGRESS_DELAY = 1000;
private boolean isTrackingProgress = false;
private void startTrackTrackProgress() {
if(!isTrackingProgress) {
isTrackingProgress = true;
handler.sendEmptyMessageDelayed(MSG_TRACK_PROGRESS, MSG_TRACK_PROGRESS_DELAY);
}
}
private void stopTrackTrackProgress() {
if(isTrackingProgress) {
isTrackingProgress = false;
handler.removeMessages(MSG_TRACK_PROGRESS);
}
}
private OnGetSongImgUrlListener onGetSongImgUrlListener = new OnGetSongImgUrlListener() {
@Override
public void onGetSongImgUrlSucessed(Music music, String s) {
currentMedia.setMediaName(music.name);
currentMedia.setMediaImg(s);
Logger.d(TAG,
"onGetSongImgUrlSucessed: " + currentMedia);
handler.post(() -> mView.onMediaInfoChanged(currentMedia));
}
@Override
public void onGetSongImgUrlFailed(Music music, int i) {
Logger.e(TAG, "onGetSongImgUrlFailed: " + i);
}
};
@Override
public void openApp(){
kwapi.startAPP(true);
}
}

View File

@@ -195,4 +195,9 @@ public class WeCarFlowPresenter extends BaseMediaPresenter<IMusicView> {
public void next() {
FlowPlayControl.getInstance().doNext();
}
@Override
public void openApp() {
FlowPlayControl.getInstance().startPlayActivity(context);
}
}

View File

@@ -18,4 +18,6 @@ public interface IMusicView extends IView {
void onMusicStopped();
void onMusicProgress(long current,long total);
void onAppExit();
}

View File

@@ -79,7 +79,9 @@ public class AnimCircleImageView extends ImageView {
}
public void startAnim() {
if (isRotating == true) return;
if (isRotating){
return;
}
isRotateEnable = true;
isRotating = true;
currentDegree = savedDegree;

View File

@@ -1,4 +1,4 @@
package com.mogo.module.media;
package com.mogo.module.media.window;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -8,12 +8,14 @@ import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.mogo.map.marker.IMogoMarker;
import com.mogo.module.common.entity.MarkerShareMusic;
import com.mogo.module.common.entity.MarkerShowEntity;
import com.mogo.module.media.MediaConstants;
import com.mogo.module.media.R;
import com.mogo.module.media.ServiceMediaHandler;
import com.mogo.module.media.constants.LeTingFieldConstants;
import com.mogo.module.media.constants.QQMusicFieldConstants;
import com.mogo.module.media.listener.NoDoubleClickListener;
@@ -30,7 +32,6 @@ import com.mogo.module.media.view.MediaView;
import com.mogo.module.media.widget.AnimCircleImageView;
import com.mogo.module.media.widget.NoScrollSeekBar;
import com.mogo.module.media.widget.ScrollingTextView;
import com.mogo.module.service.marker.MapMarkerManager;
import com.mogo.utils.ActivityLifecycleManager;
import com.mogo.utils.ThreadPoolService;
import com.mogo.utils.UiThreadHandler;
@@ -65,15 +66,9 @@ public class MediaWindow implements MediaView{
private boolean mTwoChange = false;
private boolean isFirstPlay = false;
private Runnable mRunnable = new Runnable() {
@Override
public void run() {
MusicControlBroadCast.sendGetMusicPlayStateBroadcast();
}
};
private Runnable mRunnable = MusicControlBroadCast::sendGetMusicPlayStateBroadcast;
public void initMedia(Context context){
mContext = context;
mPresenter = new MediaPresenter(this);
registerMediaReceiver();

View File

@@ -1,7 +1,6 @@
package com.mogo.module.media;
package com.mogo.module.media.window;
import android.content.Context;
import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
@@ -11,16 +10,17 @@ import android.widget.TextView;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.voice.AIAssist;
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
import com.mogo.module.media.R;
import com.mogo.module.media.ServiceMediaHandler;
import com.mogo.module.media.constants.MusicConstant;
import com.mogo.module.media.listener.NoDoubleClickListener;
import com.mogo.module.media.model.MediaInfoData;
import com.mogo.module.media.presenter.WeCarFlowPresenter;
import com.mogo.module.media.presenter.KwPresenter;
import com.mogo.module.media.utils.Utils;
import com.mogo.module.media.view.IMusicView;
import com.mogo.module.media.widget.AnimCircleImageView;
import com.mogo.module.media.widget.NoScrollSeekBar;
import com.mogo.module.media.widget.ScrollingTextView;
import com.mogo.utils.LaunchUtils;
import com.mogo.utils.WindowUtils;
import com.mogo.utils.glide.GlideApp;
import com.mogo.utils.logger.Logger;
@@ -35,7 +35,7 @@ public class MediaWindow2 implements IMusicView {
public static final String TAG = MediaWindow2.class.getName();
private Context mContext;
private WeCarFlowPresenter mPresenter;
private KwPresenter mPresenter;
private MediaInfoData mMediaInfoData = new MediaInfoData();
@@ -54,7 +54,7 @@ public class MediaWindow2 implements IMusicView {
public void initMedia(Context context) {
mContext = context;
mPresenter = new WeCarFlowPresenter(this);
mPresenter = new KwPresenter(this);
mPresenter.init(context);
if(DebugConfig.isLauncher()) {
@@ -108,7 +108,7 @@ public class MediaWindow2 implements IMusicView {
mWindowView.setOnClickListener(new NoDoubleClickListener() {
@Override
public void onClicks(View view) {
openAqtApp();
mPresenter.openApp();
}
});
@@ -123,7 +123,7 @@ public class MediaWindow2 implements IMusicView {
mPresenter.pause(mMediaInfoData);
}
} else {
openAqtApp();
mPresenter.openApp();
}
}
});
@@ -169,6 +169,16 @@ public class MediaWindow2 implements IMusicView {
if (mWindowCurrTime != null) {
mWindowCurrTime.setText(Utils.calculateTime((int) mMediaInfoData.getCurTime()));
}
if( mMediaInfoData.getPlayState() == MusicConstant.PLAY_STATE_PLAYING) {
// kw音乐做的容错
if (mWindowPlayPause != null) {
mWindowPlayPause.setImageResource(R.drawable.module_media_window_pop_play);
}
if (mCircleImg != null) {
mCircleImg.startAnim();
}
}
}
if (mCircleImg != null) {
@@ -221,6 +231,8 @@ public class MediaWindow2 implements IMusicView {
if (mCircleImg != null) {
mCircleImg.stopAnim();
}
}
@Override
@@ -253,11 +265,8 @@ public class MediaWindow2 implements IMusicView {
}
}
private void openAqtApp() {
try {
LaunchUtils.launchByPkg(mContext, "com.tencent.wecarflow");
} catch (Exception e) {
e.printStackTrace();
}
@Override
public void onAppExit() {
mWindowView.setVisibility(View.GONE);
}
}

View File

@@ -647,6 +647,10 @@ public class MogoServices implements IMogoMapListener,
return;
}
if ( !mStatusManager.isMainPageOnResume() ) {
return;
}
if ( mStatusManager.isSearchUIShow() ) {
return;
}

View File

@@ -66,7 +66,7 @@ public class Utils {
}
public static void main( String[] args ) {
double calculateLineDistance = calculateLineDistance( new MogoLatLng( 39.955533, 116.423262 ), new MogoLatLng( 39.955385, 116.414604 ) );
double calculateLineDistance = calculateLineDistance( new MogoLatLng( 39.968598, 116.411121 ), new MogoLatLng( 39.968598, 116.411121 ) );
System.out.println( "距离点 calculateLineDistance" + calculateLineDistance );
}
}

View File

@@ -135,6 +135,9 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
case MarkerPoiTypeEnum.FOURS_LIVING:
ivIcon.setImageResource( R.drawable.icon_map_marker_living_light );
break;
case MarkerPoiTypeEnum.ILLEGAL_PARK_LIVING:
ivIcon.setImageResource( R.drawable.module_service_ic_rc_illegal_park_light );
break;
default:
ivIcon.setImageResource( R.drawable.icon_map_marker_road_block_up2_light );
break;

View File

@@ -120,7 +120,11 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
Map< String, Object > properties = new HashMap<>();
if ( marker.getObject() instanceof MarkerShowEntity ) {
properties.put( "sn", getCarSnFromMarker( marker ) );
final String sn = getCarSnFromMarker( marker );
if ( TextUtils.isEmpty( sn ) ) {
return false;
}
properties.put( "sn", sn );
if ( ( ( MarkerShowEntity ) marker.getObject() ).getBindObj() instanceof MarkerExploreWay ) {
MarkerExploreWay exploreWay = ( MarkerExploreWay ) ( ( MarkerShowEntity ) marker.getObject() ).getBindObj();
properties.put( "dbid", exploreWay.getInfoId() );
@@ -482,7 +486,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
} else if ( entity instanceof MarkerNoveltyInfo ) {
return ( ( MarkerNoveltyInfo ) entity ).getSn();
} else if ( entity instanceof MarkerExploreWay ) {
return ( ( MarkerExploreWay ) entity ).getInfoId();
return ( ( MarkerExploreWay ) entity ).getUserInfo().getSn();
}
} catch ( Exception e ) {
@@ -844,6 +848,10 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
}
List< MogoLatLng > points = new ArrayList<>();
double lastLat = 0.0d;
double lastLon = 0.0d;
for ( int j = 0; j < poiList.size(); j++ ) {
MarkerCarPois poi = poiList.get( j );
if ( poi == null || poi.getCoordinates() == null && poi.getCoordinates().size() != 2 ) {
@@ -852,6 +860,14 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
try {
double lat = Double.valueOf( poi.getCoordinates().get( 1 ) + "" );
double lng = Double.valueOf( poi.getCoordinates().get( 0 ) + "" );
float distance = Utils.calculateLineDistance( lastLon, lastLat, lng, lat );
lastLon = lng;
lastLat = lat;
if ( distance < 0.2f ) {// 距离过短,认为静止不动
continue;
}
points.add( new MogoLatLng( lat, lng ) );
} catch ( Exception e ) {
}
@@ -859,6 +875,8 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
if ( points.size() >= 1 ) {
points.add( new MogoLatLng( markerLocation.getLat(), markerLocation.getLon() ) );
iMogoMarker.startSmooth( points, SMOOTH_DURATION );
} else {
Logger.d( TAG, "静止小车,但是有相同的连续坐标" );
}
}
@@ -892,7 +910,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
return MarkerServiceHandler.getMogoStatusManager().isSearchUIShow()
|| MarkerServiceHandler.getMogoStatusManager().isV2XShow()
|| !MarkerServiceHandler.getMogoStatusManager().isMainPageLaunched()
|| !MarkerServiceHandler.getMogoStatusManager().isMainPageLaunched();
|| !MarkerServiceHandler.getMogoStatusManager().isMainPageOnResume();
}
private void runOnTargetThread( Runnable runnable ) {

View File

@@ -24,8 +24,6 @@ import com.mogo.module.service.ServiceConst;
public class MapMarkerView extends MapMarkerBaseView {
private String TAG = "MapMarkerView";
private ImageView ivBg;
public MapMarkerView( Context context ) {
super( context );
}
@@ -48,7 +46,6 @@ public class MapMarkerView extends MapMarkerBaseView {
LayoutInflater.from( context ).inflate( R.layout.view_map_marker, this );
ivIcon = findViewById( R.id.ivIcon );
ivCar = findViewById( R.id.ivCar );
ivBg = findViewById( R.id.ivBg );
}
public void updateView( MarkerShowEntity markerShowEntity ) {
@@ -101,6 +98,9 @@ public class MapMarkerView extends MapMarkerBaseView {
case MarkerPoiTypeEnum.FOURS_LIVING:
ivIcon.setImageResource( R.drawable.icon_map_marker_living );
break;
case MarkerPoiTypeEnum.ILLEGAL_PARK_LIVING:
ivIcon.setImageResource( R.drawable.module_service_ic_rc_illegal_park );
break;
case MarkerPoiTypeEnum.FOURS_PARKING:
default:
ivIcon.setImageResource( R.drawable.icon_map_marker_road_block_up2 );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -7,14 +7,12 @@
android:background="@android:color/transparent"
android:gravity="center"
android:orientation="vertical"
android:paddingStart="@dimen/dp_5"
android:paddingEnd="@dimen/dp_5"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/module_service_id_marker_content"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_90"
android:layout_height="@dimen/module_services_info_window_height"
android:background="@drawable/module_services_driver_blue_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -22,8 +20,9 @@
<com.mogo.service.imageloader.MogoImageView
android:id="@+id/module_service_id_user_header"
android:layout_width="@dimen/dp_76"
android:layout_height="@dimen/dp_76"
android:layout_width="@dimen/module_service_user_header_width"
android:layout_height="@dimen/module_service_user_header_height"
android:layout_marginLeft="2.5px"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@@ -38,10 +37,10 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_10"
android:ellipsize="end"
android:minWidth="@dimen/module_service_content_minWidth"
android:singleLine="true"
android:minWidth="@dimen/dp_100"
android:textColor="#ffffff"
android:textSize="@dimen/sp_32"
android:textSize="@dimen/module_service_content_textSize"
app:layout_constraintStart_toEndOf="@+id/module_service_id_user_header"
app:layout_constraintTop_toTopOf="@+id/module_service_id_user_header"
app:layout_goneMarginRight="@dimen/dp_30"
@@ -51,19 +50,21 @@
android:id="@+id/module_service_id_tag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:background="@drawable/module_services_driver_type_blue_info"
android:textColor="#ffffff"
android:textSize="@dimen/sp_20"
android:textSize="@dimen/module_service_tag_textSize"
app:layout_constraintStart_toStartOf="@+id/module_service_id_content"
app:layout_constraintTop_toBottomOf="@+id/module_service_id_content"
tools:text="老司机" />
<ImageView
android:id="@+id/module_service_id_call"
android:layout_width="@dimen/dp_85"
android:layout_height="@dimen/dp_85"
android:layout_width="@dimen/module_service_user_header_width"
android:layout_height="@dimen/module_service_user_header_height"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="2.5px"
android:scaleType="fitXY"
android:src="@drawable/module_service_ic_call"
app:layout_constraintBottom_toBottomOf="parent"

View File

@@ -12,22 +12,16 @@
<FrameLayout
android:id="@+id/clMarkerTopView"
android:layout_width="@dimen/module_service_marker_bubble_width"
android:background="@drawable/bg_map_marker_dark"
android:layout_height="@dimen/module_service_marker_bubble_height">
<ImageView
android:id="@+id/ivBg"
android:id="@+id/ivIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/bg_map_marker_dark" />
<ImageView
android:id="@+id/ivIcon"
android:layout_width="@dimen/module_service_marker_bubble_icon_width"
android:layout_height="@dimen/module_service_marker_bubble_icon_height"
android:layout_marginTop="@dimen/module_service_marker_bubble_icon_marginTop"
android:layout_gravity="center_horizontal"
tools:src="@drawable/icon_map_marker_road_block_up"/>
android:layout_marginBottom="@dimen/module_service_marker_bubble_icon_marginBottom"
tools:src="@drawable/icon_map_marker_road_block_up" />
</FrameLayout>

View File

@@ -7,8 +7,6 @@
android:gravity="center"
android:orientation="vertical"
android:padding="1px"
android:paddingStart="@dimen/dp_5"
android:paddingEnd="@dimen/dp_5"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<androidx.constraintlayout.widget.ConstraintLayout
@@ -34,8 +32,8 @@
<ImageView
android:id="@+id/ivIcon"
android:layout_width="@dimen/dp_60"
android:layout_height="@dimen/dp_60"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/dp_15"
android:visibility="invisible"

View File

@@ -6,11 +6,19 @@
<dimen name="module_service_marker_bubble_height">117px</dimen>
<dimen name="module_service_marker_bubble_icon_width">50px</dimen>
<dimen name="module_service_marker_bubble_icon_height">50px</dimen>
<dimen name="module_service_marker_bubble_icon_marginTop">24px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">8px</dimen>
<!-- 导航查看全程显示范围-->
<dimen name="module_service_marker_bounds_leftMargin">1000px</dimen>
<dimen name="module_service_marker_bounds_topMargin">390px</dimen>
<dimen name="module_service_marker_bounds_bottomMargin">200px</dimen>
<dimen name="module_service_marker_bounds_rightMargin">200px</dimen>
<dimen name="module_services_info_window_paddingStart">10px</dimen>
<dimen name="module_services_info_window_paddingEnd">10px</dimen>
<dimen name="module_services_info_window_height">100px</dimen>
<dimen name="module_service_user_header_width">80px</dimen>
<dimen name="module_service_user_header_height">80px</dimen>
<dimen name="module_service_content_textSize">24px</dimen>
<dimen name="module_service_tag_textSize">20px</dimen>
<dimen name="module_service_content_minWidth">120px</dimen>
</resources>

View File

@@ -1,15 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="module_service_marker_anchor_size">16dp</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">56px</dimen>
<dimen name="module_service_marker_bubble_height">65px</dimen>
<dimen name="module_service_marker_bubble_icon_width">27px</dimen>
<dimen name="module_service_marker_bubble_icon_height">27px</dimen>
<dimen name="module_service_marker_bubble_icon_marginTop">14px</dimen>
<dimen name="module_service_marker_bubble_icon_marginBottom">4px</dimen>
<dimen name="module_service_marker_bounds_leftMargin">550px</dimen>
<dimen name="module_service_marker_bounds_topMargin">208px</dimen>
<dimen name="module_service_marker_bounds_bottomMargin">100px</dimen>
<dimen name="module_service_marker_bounds_rightMargin">100px</dimen>
<dimen name="module_services_info_window_paddingStart">100px</dimen>
<dimen name="module_services_info_window_paddingEnd">10px</dimen>
<dimen name="module_services_info_window_height">54px</dimen>
<dimen name="module_service_user_header_width">44px</dimen>
<dimen name="module_service_user_header_height">44px</dimen>
<dimen name="module_service_content_textSize">14px</dimen>
<dimen name="module_service_tag_textSize">12px</dimen>
<dimen name="module_service_content_minWidth">64px</dimen>
</resources>

View File

@@ -74,16 +74,17 @@ public class MogoADASController implements IMogoADASController {
init( AbsMogoApplication.getApp() );
}
if ( mStatusManager.isSearchUIShow() ) {
return;
}
if ( !mStatusManager.isMainPageOnResume() ) {
return;
}
int delay = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 0 : 100;
UiThreadHandler.postDelayed( () -> {
if ( mStatusManager.isSearchUIShow() ) {
return;
}
if ( !mStatusManager.isMainPageOnResume() ) {
return;
}
try {
AutopilotServiceManage.getInstance().showAdas();
} catch ( Exception e ) {