|
26 | 26 | import com.smartdevicelink.managers.screen.menu.VoiceCommandSelectionListener; |
27 | 27 | import com.smartdevicelink.protocol.enums.FunctionID; |
28 | 28 | import com.smartdevicelink.proxy.RPCNotification; |
29 | | -import com.smartdevicelink.proxy.TTSChunkFactory; |
30 | 29 | import com.smartdevicelink.proxy.rpc.Alert; |
31 | 30 | import com.smartdevicelink.proxy.rpc.OnButtonEvent; |
32 | 31 | import com.smartdevicelink.proxy.rpc.OnButtonPress; |
33 | 32 | import com.smartdevicelink.proxy.rpc.OnHMIStatus; |
34 | 33 | import com.smartdevicelink.proxy.rpc.Speak; |
| 34 | +import com.smartdevicelink.proxy.rpc.TTSChunk; |
35 | 35 | import com.smartdevicelink.proxy.rpc.enums.AppHMIType; |
36 | 36 | import com.smartdevicelink.proxy.rpc.enums.ButtonName; |
37 | 37 | import com.smartdevicelink.proxy.rpc.enums.FileType; |
|
40 | 40 | import com.smartdevicelink.proxy.rpc.enums.Language; |
41 | 41 | import com.smartdevicelink.proxy.rpc.enums.MenuLayout; |
42 | 42 | import com.smartdevicelink.proxy.rpc.enums.PredefinedWindows; |
| 43 | +import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities; |
43 | 44 | import com.smartdevicelink.proxy.rpc.enums.TriggerSource; |
44 | 45 | import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener; |
45 | 46 | import com.smartdevicelink.transport.BaseTransportConfig; |
@@ -202,11 +203,6 @@ public void onDestroy() { |
202 | 203 | public void onError(String info, Exception e) { |
203 | 204 | } |
204 | 205 |
|
205 | | - @Override |
206 | | - public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language language) { |
207 | | - return null; |
208 | | - } |
209 | | - |
210 | 206 | @Override |
211 | 207 | public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language language, Language hmiLanguage) { |
212 | 208 | boolean isNeedUpdate = false; |
@@ -237,7 +233,8 @@ public LifecycleConfigurationUpdate managerShouldUpdateLifecycle(Language langua |
237 | 233 | break; |
238 | 234 | } |
239 | 235 | if (isNeedUpdate) { |
240 | | - return new LifecycleConfigurationUpdate(appName, null, TTSChunkFactory.createSimpleTTSChunks(ttsName), null); |
| 236 | + Vector<TTSChunk> chunks = new Vector<>(Collections.singletonList(new TTSChunk(ttsName, SpeechCapabilities.TEXT))); |
| 237 | + return new LifecycleConfigurationUpdate(appName, null, chunks, null); |
241 | 238 | } else { |
242 | 239 | return null; |
243 | 240 | } |
@@ -352,7 +349,8 @@ public void onTriggered(TriggerSource trigger) { |
352 | 349 | * Will speak a sample welcome message |
353 | 350 | */ |
354 | 351 | private void performWelcomeSpeak(){ |
355 | | - sdlManager.sendRPC(new Speak(TTSChunkFactory.createSimpleTTSChunks(WELCOME_SPEAK))); |
| 352 | + List<TTSChunk> chunks = Collections.singletonList(new TTSChunk(WELCOME_SPEAK, SpeechCapabilities.TEXT)); |
| 353 | + sdlManager.sendRPC(new Speak(chunks)); |
356 | 354 | } |
357 | 355 |
|
358 | 356 | /** |
@@ -414,7 +412,8 @@ private void showTest(){ |
414 | 412 | sdlManager.getScreenManager().setTextField2(""); |
415 | 413 | sdlManager.getScreenManager().commit(null); |
416 | 414 |
|
417 | | - sdlManager.sendRPC(new Speak(TTSChunkFactory.createSimpleTTSChunks(TEST_COMMAND_NAME))); |
| 415 | + List<TTSChunk> chunks = Collections.singletonList(new TTSChunk(TEST_COMMAND_NAME, SpeechCapabilities.TEXT)); |
| 416 | + sdlManager.sendRPC(new Speak(chunks)); |
418 | 417 | } |
419 | 418 |
|
420 | 419 | private void showAlert(String text){ |
|
0 commit comments