add light mode res

This commit is contained in:
wangcongtao
2020-09-02 10:26:08 +08:00
parent 5673ec457f
commit bc4dd4547d
96 changed files with 555 additions and 69 deletions

View File

@@ -277,6 +277,9 @@ public class MapPresenter extends Presenter< MapView > implements
for ( String cmd : VoiceConstants.sUnUnRegisterCmds ) {
mMogoIntentManager.registerIntentListener( cmd, this );
}
for ( Map.Entry< String, String[] > entry : VoiceConstants.sUnRegisterVoiceCmds.entrySet() ) {
AIAssist.getInstance( getContext() ).registerUnWakeupCommand( entry.getKey(), entry.getValue(), this );
}
initBroadcast();
mCustomVoiceCommandHandler = new MapControlCommandHandler();
@@ -313,6 +316,13 @@ public class MapPresenter extends Presenter< MapView > implements
}
mRegisterCenter.unregisterMogoNaviListener( TAG );
mRegisterCenter.unregisterADASControlStatusChangedListener( TAG );
for ( String cmd : VoiceConstants.sUnUnRegisterCmds ) {
mMogoIntentManager.unregisterIntentListener( cmd, this );
}
for ( Map.Entry< String, String[] > entry : VoiceConstants.sUnRegisterVoiceCmds.entrySet() ) {
AIAssist.getInstance( getContext() ).unregisterUnWakeupCommand( entry.getKey(), this );
}
}
private void registerVoiceCmd() {
@@ -365,4 +375,5 @@ public class MapPresenter extends Presenter< MapView > implements
public void onStopNavi() {
MapBroadCastHelper.getInstance( getContext() ).stopNavi();
}
}

View File

@@ -158,8 +158,13 @@ public class VoiceConstants {
public static final String CMD_MAP_SPEAK_REMAIN_UN_WAKEUP = "CMD_MAP_SPEAK_REMAIN_UN_WAKEUP";
public static final String[] CMD_MAP_SPEAK_REMAIN_TRIGGER_WORDS = {"还有多久", "多久到", "还有多远"};
// 免唤醒
public static final Map< String, String[] > sVoiceCmds = new HashMap<>();
// 不注销的免唤醒
public static final Map< String, String[] > sUnRegisterVoiceCmds = new HashMap<>();
// 唤醒
public static final List< String > sCmds = new ArrayList<>();
// 不注销的唤醒
public static final List< String > sUnUnRegisterCmds = new ArrayList<>();
static {
@@ -168,9 +173,6 @@ public class VoiceConstants {
sVoiceCmds.put( VoiceConstants.CMD_MAP_ZOOM_OUT_UN_WAKEUP, VoiceConstants.CMD_MAP_ZOOM_OUT_TRIGGER_WORDS );
//sVoiceCmds.put( VoiceConstants.CMD_MAP_2D_UN_WAKEUP, VoiceConstants.CMD_MAP_2D_TRIGGER_WORDS );
//sVoiceCmds.put( VoiceConstants.CMD_MAP_3D_UN_WAKEUP, VoiceConstants.CMD_MAP_3D_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_DAY_TIME_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NIGHT_MODE_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_TRAFFIC_MODE_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE_TRIGGER_WORDS );
//sVoiceCmds.put( VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE_TRIGGER_WORDS );
@@ -185,16 +187,18 @@ public class VoiceConstants {
sVoiceCmds.put( VoiceConstants.CMD_MAP_SPEAK_DETAIL_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_SPEAK_DETAIL_MODE_TRIGGER_WORDS );
sVoiceCmds.put( VoiceConstants.CMD_MAP_SPEAK_DRAFT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_SPEAK_DRAFT_MODE_TRIGGER_WORDS );
//sVoiceCmds.put( VoiceConstants.CMD_MAP_SPEAK_REMAIN_UN_WAKEUP, VoiceConstants.CMD_MAP_SPEAK_REMAIN_TRIGGER_WORDS );
sUnRegisterVoiceCmds.put( VoiceConstants.CMD_MAP_DAY_TIME_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_DAY_TIME_MODE_TRIGGER_WORDS );
sUnRegisterVoiceCmds.put( VoiceConstants.CMD_MAP_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_NIGHT_MODE_TRIGGER_WORDS );
sUnRegisterVoiceCmds.put( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_UN_WAKEUP, VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE_TRIGGER_WORDS );
// 唤醒
sCmds.add( VoiceConstants.CMD_MAP_ZOOM_IN );
sCmds.add( VoiceConstants.CMD_MAP_ZOOM_OUT );
sCmds.add( VoiceConstants.CMD_MAP_2D );
sCmds.add( VoiceConstants.CMD_MAP_3D );
sCmds.add( VoiceConstants.CMD_MAP_DAY_TIME_MODE );
sCmds.add( VoiceConstants.CMD_MAP_NIGHT_MODE );
sCmds.add( VoiceConstants.CMD_MAP_TRAFFIC_MODE );
sCmds.add( VoiceConstants.CMD_MAP_UN_TRAFFIC_MODE );
sCmds.add( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE );
sCmds.add( VoiceConstants.CMD_MAP_CAR_UP_MODE );
sCmds.add( VoiceConstants.CMD_MAP_NORTH_UP_MODE );
sCmds.add( VoiceConstants.CMD_MAP_STOP_NAVI_MODE );
@@ -206,5 +210,8 @@ public class VoiceConstants {
sUnUnRegisterCmds.add( VoiceConstants.CMD_MAP_CONTINUE_NAVI_MODE );
sUnUnRegisterCmds.add( VoiceConstants.CMD_MAP_DISPLAY_OVERVIEW_MODE );
sUnUnRegisterCmds.add( VoiceConstants.CMD_MAP_HISTORY );
sUnUnRegisterCmds.add( VoiceConstants.CMD_MAP_DAY_TIME_MODE );
sUnUnRegisterCmds.add( VoiceConstants.CMD_MAP_NIGHT_MODE );
sUnUnRegisterCmds.add( VoiceConstants.CMD_MAP_AUTO_LIGHT_NIGHT_MODE );
}
}