- 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;
-
- // Set the style according to the theme.
- if (darkTheme) {
- dialogBuilder = new AlertDialog.Builder(activity, R.style.PrivacyBrowserAlertDialogDark);
- } else {
- dialogBuilder = new AlertDialog.Builder(activity, R.style.PrivacyBrowserAlertDialogLight);
- }
-