- // Get handles for layout items in the `AlertDialog`.
- final Button editButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
- final RadioButton currentIconRadioButton = (RadioButton) alertDialog.findViewById(R.id.edit_folder_current_icon_radiobutton);
- RadioGroup iconRadioGroup = (RadioGroup) alertDialog.findViewById(R.id.edit_folder_icon_radio_group);
+ // Get handles for the views in the alert dialog.
+ RadioGroup iconRadioGroup = alertDialog.findViewById(R.id.edit_folder_icon_radio_group);
+ RadioButton currentIconRadioButton = alertDialog.findViewById(R.id.edit_folder_current_icon_radiobutton);
+ ImageView currentIconImageView = alertDialog.findViewById(R.id.edit_folder_current_icon_imageview);
+ ImageView webPageFavoriteIconImageView = alertDialog.findViewById(R.id.edit_folder_web_page_favorite_icon_imageview);
+ EditText folderNameEditText = alertDialog.findViewById(R.id.edit_folder_name_edittext);
+ Button editButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
+
+ // Remove the incorrect lint warnings below that the views might be null.
+ assert iconRadioGroup != null;
+ assert currentIconRadioButton != null;
+ assert currentIconImageView != null;
+ assert webPageFavoriteIconImageView != null;
+ assert folderNameEditText != null;