Fix NPE when press ttsEngines settings icon
settingsIntent is obtained by method getSettingsIntent in TtsEngines.java, and it has the chance to return null directly in which case will lead to NPE crash when we startActivity in TextToSpeechSettings.java with a null intent. So, a judgement here makes sense. Bug:https://issuetracker.google.com/issues/70266990 Test: 1) Install the apk "partner-BaiduSpeechService.apk" offered in the Bug link above. 2) Go to Settings -> Languages & input -> Advance -> Text-to-speech output 3) Choose "Duer voice engine 3.0" as the preferred engine 4) Press the settings icon in the right Change-Id: I497a745ce62989f3ff1aee661648e90af25fb99e Signed-off-by:tiansiming <tiansiming@xiaomi.com>
Loading
Please register or sign in to comment