opt
This commit is contained in:
@@ -423,7 +423,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