- Activity activity = getActivity();
- Context context = getContext();
-
- // Remove the incorrect lint warnings.
- assert activity != null;
- assert context != 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);
- }