This commit is contained in:
wangcongtao
2020-03-27 17:24:47 +08:00
parent df3e26615f
commit 7a86206fd7
20 changed files with 208 additions and 83 deletions

View File

@@ -13,12 +13,14 @@ import android.os.Looper;
import android.os.Message;
import android.os.Trace;
import android.text.TextUtils;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import androidx.annotation.NonNull;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.voice.AIAssist;
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
import com.mogo.map.MogoLatLng;
@@ -451,6 +453,9 @@ public class MogoServices implements IMogoMapListener,
}
private void stopAutoRefreshStrategy() {
if ( DebugConfig.isDebug() ) {
Logger.d( TAG, Log.getStackTraceString( new Throwable() ) );
}
Logger.d( TAG, "stop auto refresh strategy" );
mHandler.removeMessages( ServiceConst.MSG_TYPE_REFRESH_DECREASE );
}
@@ -814,6 +819,7 @@ public class MogoServices implements IMogoMapListener,
}
} else if ( MogoReceiver.ACTION_VOICE_READY.equals( command ) ) {
AIAssist.getInstance( mContext ).flush();
mStatusManager.setAIAssistReady( TAG, true );
} else if ( ServiceConst.COMMAND_MY_LOCATION.equals( command ) ) {
if ( mStatusManager.isSearchUIShow() ) {
return;
@@ -907,12 +913,12 @@ public class MogoServices implements IMogoMapListener,
return;
}
mInternalUnWakeupRegisterStatus = true;
AIAssist.getInstance( mContext )
.registerUnWakeupCommand( ServiceConst.CMD_UN_WAKE_PREV,
ServiceConst.CMD_UN_WAKE_PREV_UN_WAKE_WORDS, this );
AIAssist.getInstance( mContext )
.registerUnWakeupCommand( ServiceConst.CMD_UN_WAKE_NEXT,
ServiceConst.CMD_UN_WAKE_NEXT_UN_WAKE_WORDS, this );
// AIAssist.getInstance( mContext )
// .registerUnWakeupCommand( ServiceConst.CMD_UN_WAKE_PREV,
// ServiceConst.CMD_UN_WAKE_PREV_UN_WAKE_WORDS, this );
// AIAssist.getInstance( mContext )
// .registerUnWakeupCommand( ServiceConst.CMD_UN_WAKE_NEXT,
// ServiceConst.CMD_UN_WAKE_NEXT_UN_WAKE_WORDS, this );
AIAssist.getInstance( mContext )
.registerUnWakeupCommand( ServiceConst.CMD_UN_WAKEUP_MY_LOCATION,
ServiceConst.CMD_UN_WAKEUP_WORDS_MY_LOCATION, this );
@@ -926,10 +932,10 @@ public class MogoServices implements IMogoMapListener,
return;
}
mInternalUnWakeupRegisterStatus = false;
AIAssist.getInstance( mContext )
.unregisterUnWakeupCommand( ServiceConst.CMD_UN_WAKE_PREV, this );
AIAssist.getInstance( mContext )
.unregisterUnWakeupCommand( ServiceConst.CMD_UN_WAKE_NEXT, this );
// AIAssist.getInstance( mContext )
// .unregisterUnWakeupCommand( ServiceConst.CMD_UN_WAKE_PREV, this );
// AIAssist.getInstance( mContext )
// .unregisterUnWakeupCommand( ServiceConst.CMD_UN_WAKE_NEXT, this );
AIAssist.getInstance( mContext )
.unregisterUnWakeupCommand( ServiceConst.CMD_UN_WAKEUP_MY_LOCATION, this );
}
@@ -974,7 +980,11 @@ public class MogoServices implements IMogoMapListener,
@Override
public void onTransaction( int size ) {
if ( size == 0 ) {
mUiController.setPointToCenter( 0.66145, 0.661094 );
if ( mNavi.isNaviing() ) {
mUiController.setPointToCenter( 0.675926, 0.77552 );
} else {
mUiController.setPointToCenter( 0.66145, 0.661094 );
}
mUiController.showMyLocation( !mNavi.isNaviing() );
AIAssist.getInstance( mContext ).unregisterUnWakeupCommand( ServiceConst.CMD_BACK );
} else {