+ // Use an alert dialog builder to create the alert dialog.
+ AlertDialog.Builder dialogBuilder;
+
+ // Get a handle for the activity.
+ Activity activity = getActivity();
+
+ // Remove the incorrect lint warning below that the activity might be null.
+ assert activity != null;
+