Merge "Add null check for voiceInteractorComponentName." into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot
2020-02-12 18:23:06 +00:00
committed by Android (Google) Code Review

View File

@@ -641,9 +641,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
if (previewBefore != null) {
mPreviewContainer.removeView(previewBefore);
}
if (mLeftIsVoiceAssist) {
mLeftPreview = mPreviewInflater.inflatePreviewFromService(
mAssistManager.getVoiceInteractorComponentName());
ComponentName voiceInteractorComponentName =
mAssistManager.getVoiceInteractorComponentName();
if (mLeftIsVoiceAssist && voiceInteractorComponentName != null) {
mLeftPreview = mPreviewInflater.inflatePreviewFromService(voiceInteractorComponentName);
} else {
mLeftPreview = mPreviewInflater.inflatePreview(mLeftButton.getIntent());
}