android: Don't print "null" if no user certificate is selected

This commit is contained in:
Tobias Brunner 2025-09-26 13:49:53 +02:00
parent 4918e681ee
commit 1a16b2c0cb

View File

@ -86,7 +86,8 @@ public class VpnProfileAdapter extends ArrayAdapter<VpnProfile>
tv = vpnProfileView.findViewById(R.id.profile_item_certificate);
if (profile.getVpnType().has(VpnTypeFeature.CERTIFICATE))
{
tv.setText(getContext().getString(R.string.profile_user_certificate_label) + ": " + profile.getUserCertificateAlias());
String alias = profile.getUserCertificateAlias();
tv.setText(getContext().getString(R.string.profile_user_certificate_label) + ": " + (alias != null ? alias : ""));
tv.setVisibility(View.VISIBLE);
}
else