Merge "Fix crash on KeyboardLayoutDialogFragment"

This commit is contained in:
TreeHugger Robot
2018-10-11 20:31:44 +00:00
committed by Android (Google) Code Review

View File

@@ -215,7 +215,7 @@ public class KeyboardLayoutDialogFragment extends InstrumentedDialogFragment
private void updateSwitchHintVisibility() { private void updateSwitchHintVisibility() {
AlertDialog dialog = (AlertDialog)getDialog(); AlertDialog dialog = (AlertDialog)getDialog();
if (dialog != null) { if (dialog != null) {
View customPanel = dialog.findViewById(com.android.internal.R.id.customPanel); View customPanel = dialog.findViewById(R.id.customPanel);
customPanel.setVisibility(mAdapter.getCount() > 1 ? View.VISIBLE : View.GONE); customPanel.setVisibility(mAdapter.getCount() > 1 ? View.VISIBLE : View.GONE);
} }
} }