Merge remote-tracking branch 'origin/qa' into qa
This commit is contained in:
@@ -6,7 +6,6 @@ import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.map.impl.amap.navi.NaviClient;
|
||||
import com.mogo.map.impl.amap.utils.IconTypeUtils;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.navi.MogoNaviListenerHandler;
|
||||
@@ -81,7 +80,8 @@ public class AutoNaviReceiver extends BroadcastReceiver {
|
||||
int cameraType = intent.getIntExtra( GuideInfoExtraKey.CAMERA_TYPE, 0 );
|
||||
|
||||
if ( type == 0 || type == 1 ) {
|
||||
if ( !MapState.getInstance().isNaving() ) {
|
||||
if ( !MapState.getInstance().isNaving()
|
||||
&& MogoNaviListenerHandler.getInstance().hasDelegateListener() ) {
|
||||
MapState.getInstance().setNaving( true );
|
||||
MogoNaviListenerHandler.getInstance().onStartNavi();
|
||||
}
|
||||
|
||||
@@ -33,6 +33,13 @@ public class MogoNaviListenerHandler implements IMogoNaviListener2, IMogoNaviLis
|
||||
*/
|
||||
private IMogoNaviListener mDelegateListener = null;
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public boolean hasDelegateListener(){
|
||||
return mDelegateListener != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上层模块代理对象
|
||||
*/
|
||||
|
||||
@@ -454,7 +454,13 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
if ( naviinfo == null ) {
|
||||
return;
|
||||
}
|
||||
mNaviInfo.notifyChanged( naviinfo );
|
||||
if ( mNaviInfo != null ) {
|
||||
if ( !mNaviInfo.isVisible() ) {
|
||||
// 避免导航先开启,再开启app的情况
|
||||
onStartNavi();
|
||||
}
|
||||
mNaviInfo.notifyChanged( naviinfo );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ public class NaviInfoView extends BaseNaviInfoView {
|
||||
private TextView remainingTimeUnit;
|
||||
private TextView arriveTime;
|
||||
|
||||
public void inflate(View view){
|
||||
public void inflate( View view ) {
|
||||
turnIcon = view.findViewById( R.id.module_map_id_navi_next_info_road_turn_icon );
|
||||
distance = view.findViewById( R.id.module_map_id_navi_next_info_distance );
|
||||
distanceUnit = view.findViewById( R.id.module_map_id_navi_next_info_distance_unit );
|
||||
@@ -39,6 +39,11 @@ public class NaviInfoView extends BaseNaviInfoView {
|
||||
arriveTime = view.findViewById( R.id.module_map_id_arrive_time );
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return turnIcon != null && turnIcon.getVisibility() == View.VISIBLE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void notifyChanged( MogoNaviInfo naviInfo ) {
|
||||
super.notifyChanged( naviInfo );
|
||||
|
||||
@@ -62,6 +62,9 @@ public class MapBroadCastHelper implements IMogoStatusChangedListener {
|
||||
|
||||
|
||||
public void notifyXizhiNavStatus( int status ) {
|
||||
if ( CustomNaviInterrupter.getInstance().interrupt() ) {
|
||||
return;
|
||||
}
|
||||
Intent intent = new Intent( ACTION_NAV_SEND );
|
||||
intent.putExtra( "KEY_TYPE", 10019 );
|
||||
intent.putExtra( "EXTRA_STATE", status );
|
||||
|
||||
@@ -333,8 +333,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
if ( DebugConfig.isLaunchLocationService() ) {
|
||||
initLocationServiceProcess( context );
|
||||
}
|
||||
|
||||
requestAutoNaviLastStatus();
|
||||
}
|
||||
|
||||
private void initLocationServiceProcess( Context context ) {
|
||||
@@ -703,12 +701,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
restartAutoRefreshAtTime( 2_000L );
|
||||
}
|
||||
mIsMainPageFirstResume = false;
|
||||
try {
|
||||
// 请求地图最后一次保存的状态
|
||||
requestAutoNaviLastStatus();
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
unregisterInternalUnWakeupWords();
|
||||
stopAutoRefreshStrategy();
|
||||
@@ -721,13 +713,6 @@ public class MogoServices implements IMogoMapListener,
|
||||
}
|
||||
}
|
||||
|
||||
private void requestAutoNaviLastStatus(){
|
||||
Intent intent = new Intent();
|
||||
intent.setAction("AUTONAVI_STANDARD_BROADCAST_RECV");
|
||||
intent.putExtra("KEY_TYPE", 10061);
|
||||
mContext.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
private void notifySeekHelpingStatusChanged( boolean seekHelpingStatus ) {
|
||||
Intent intent = new Intent( "com.mogo.launcher.adas.app" );
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user