This commit is contained in:
wangcongtao
2020-11-27 09:58:14 +08:00
parent deda295b83
commit 7d83dd58b9

View File

@@ -527,9 +527,18 @@ class LauncherCardRefresher {
} else if ( datum instanceof TtsConfigData.NearRoads ) {
result = handleNearRoadsTtsConfig( ( ( TtsConfigData.NearRoads ) datum ) );
} else if ( datum instanceof TtsConfigData.OnlineCarVsExplorerWay ) {
result = handleExplorerWayTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
if ( !result ) {
if ( node.type == LauncherCardRefreshType.ExplorerWay ) {
result = handleExplorerWayTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
if ( !result ) {
node.type = LauncherCardRefreshType.OnlineCar;
result = handleOnlineCarTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
}
} else if( node.type == LauncherCardRefreshType.OnlineCar ){
result = handleOnlineCarTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
if ( !result ) {
node.type = LauncherCardRefreshType.ExplorerWay;
result = handleExplorerWayTtsConfig( ( ( TtsConfigData.OnlineCarVsExplorerWay ) datum ) );
}
}
}
if ( result ) {
@@ -595,7 +604,7 @@ class LauncherCardRefresher {
String tts = mContext.getString( R.string.module_service_launcher_card_tips );
String info = mContext.getString( R.string.module_service_launcher_card_info );
speakTTS( String.format( tts, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay.getDesc() ), false );
notifyRefreshChanged( String.format( info, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay ), explorerWay.poiTotal, tts );
notifyRefreshChanged( String.format( info, explorerWay.poiTotal, LauncherCardRefreshType.ExplorerWay.getDesc() ), explorerWay.poiTotal, tts );
return true;
}
@@ -612,7 +621,7 @@ class LauncherCardRefresher {
String tts = mContext.getString( R.string.module_service_launcher_card_tips );
String info = mContext.getString( R.string.module_service_launcher_card_info );
speakTTS( String.format( tts, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar.getDesc() ), false );
notifyRefreshChanged( String.format( info, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar ), onlineCar.carTotal, tts );
notifyRefreshChanged( String.format( info, onlineCar.carTotal, LauncherCardRefreshType.OnlineCar.getDesc() ), onlineCar.carTotal, tts );
return true;
}