Merge "Fix NPE crash in TextToSpeechSettings" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-11-08 03:34:11 +00:00
committed by Android (Google) Code Review

View File

@@ -228,7 +228,9 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
// them to resize, which results in the recyclerview smoothly animating them at inopportune
// times. Disable the animation so widgets snap to their positions rather than sliding
// around while the user is interacting with it.
if (getListView().getItemAnimator() != null) {
getListView().getItemAnimator().setMoveDuration(0);
}
if (mTts == null || mCurrentDefaultLocale == null) {
return;