- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Store the download type in the local class variable.
- downloadType = getArguments().getInt("Download_Type");
- }
-
- // The public interface is used to send information back to the parent activity.
- public interface DownloadLocationPermissionDialogListener {
- void onCloseDownloadLocationPermissionDialog(int downloadType);
- }
-
- // `downloadLocationPermissionDialogListener` is used in `onAttach()` and `onCreateDialog()`.
- private DownloadLocationPermissionDialogListener downloadLocationPermissionDialogListener;
-
- @Override
- public void onAttach(Context context) {
- super.onAttach(context);
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ // Remove the incorrect lint warning below that `getArguments().getInt()` might be null.
+ assert getArguments() != null;