mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 14:15:14 +00:00
Remove unneeded null check
This commit is contained in:
@@ -178,7 +178,6 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
|
||||
<string name="error_canceled_by_user">Canceled by user</string>
|
||||
<string name="error_canceled_by_other_peer">Canceled by other peer</string>
|
||||
<string name="encryption_info_title">Encryption Info</string>
|
||||
<string name="encryption_info_msg_no_ssl">The other device doesn\'t use a recent version of KDE Connect, using the legacy encryption method.</string>
|
||||
<string name="my_device_fingerprint">SHA256 fingerprint of your device certificate is:</string>
|
||||
<string name="remote_device_fingerprint">SHA256 fingerprint of remote device certificate is:</string>
|
||||
<string name="pair_requested">Pair requested</string>
|
||||
|
@@ -204,21 +204,17 @@ class DeviceFragment : Fragment() {
|
||||
builder.setPositiveButton(requireContext().resources.getString(R.string.ok)) { dialog, _ ->
|
||||
dialog.dismiss()
|
||||
}
|
||||
if (device.certificate == null) {
|
||||
builder.setMessage(R.string.encryption_info_msg_no_ssl)
|
||||
} else {
|
||||
builder.setMessage(
|
||||
"${
|
||||
requireContext().resources.getString(R.string.my_device_fingerprint)
|
||||
} \n ${
|
||||
SslHelper.getCertificateHash(SslHelper.certificate)
|
||||
} \n\n ${
|
||||
requireContext().resources.getString(R.string.remote_device_fingerprint)
|
||||
} \n ${
|
||||
SslHelper.getCertificateHash(device.certificate)
|
||||
}"
|
||||
)
|
||||
}
|
||||
builder.setMessage(
|
||||
"${
|
||||
requireContext().resources.getString(R.string.my_device_fingerprint)
|
||||
} \n ${
|
||||
SslHelper.getCertificateHash(SslHelper.certificate)
|
||||
} \n\n ${
|
||||
requireContext().resources.getString(R.string.remote_device_fingerprint)
|
||||
} \n ${
|
||||
SslHelper.getCertificateHash(device.certificate)
|
||||
}"
|
||||
)
|
||||
menu.add(R.string.encryption_info_title).setOnMenuItemClickListener {
|
||||
builder.show()
|
||||
true
|
||||
|
Reference in New Issue
Block a user