return thisSslCertificateErrorDialog;
}
- // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
+ // `@SuppressLint("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
@SuppressLint("InflateParams")
@Override
@NonNull
blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.blue_700));
redColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.red_a700));
} else {
- blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.violet_500));
+ blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.violet_700));
redColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.red_900));
}
// This must run asynchronously because it involves a network request. `String` declares the parameters. `Void` does not declare progress units. `SpannableStringBuilder` contains the results.
private static class GetIpAddresses extends AsyncTask<String, Void, SpannableStringBuilder> {
// The weak references are used to determine if the activity or the alert dialog have disappeared while the AsyncTask is running.
- private WeakReference<Activity> activityWeakReference;
- private WeakReference<AlertDialog> alertDialogWeakReference;
+ private final WeakReference<Activity> activityWeakReference;
+ private final WeakReference<AlertDialog> alertDialogWeakReference;
GetIpAddresses(Activity activity, AlertDialog alertDialog) {
// Populate the weak references.