mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix warnings
This commit is contained in:
@@ -330,7 +330,7 @@ class FileDatabaseSelectActivity : StylishActivity(),
|
||||
*/
|
||||
private fun createDatabaseFile(path: Uri): Boolean {
|
||||
|
||||
val pathString = URLDecoder.decode(path.path)
|
||||
val pathString = URLDecoder.decode(path.path, "UTF-8")
|
||||
// Make sure file name exists
|
||||
if (pathString.isEmpty()) {
|
||||
Log.e(TAG, getString(R.string.error_filename_required))
|
||||
|
||||
@@ -158,7 +158,7 @@ class ImporterV3 : Importer<PwDatabaseV3>() {
|
||||
throw InvalidPasswordException()
|
||||
}
|
||||
|
||||
var md: MessageDigest? = null
|
||||
val md: MessageDigest
|
||||
try {
|
||||
md = MessageDigest.getInstance("SHA-256")
|
||||
} catch (e: NoSuchAlgorithmException) {
|
||||
@@ -169,7 +169,7 @@ class ImporterV3 : Importer<PwDatabaseV3>() {
|
||||
val dos = DigestOutputStream(nos, md)
|
||||
dos.write(filebuf, PwDbHeaderV3.BUF_SIZE, encryptedPartSize)
|
||||
dos.close()
|
||||
val hash = md!!.digest()
|
||||
val hash = md.digest()
|
||||
|
||||
if (!Arrays.equals(hash, hdr.contentsHash)) {
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ import com.kunzisoft.keepass.activities.dialogs.UnavailableFeatureDialogFragment
|
||||
import com.kunzisoft.keepass.activities.dialogs.UnderDevelopmentFeatureDialogFragment
|
||||
import com.kunzisoft.keepass.activities.helpers.ReadOnlyHelper
|
||||
import com.kunzisoft.keepass.activities.stylish.Stylish
|
||||
import com.kunzisoft.keepass.app.App
|
||||
import com.kunzisoft.keepass.database.element.Database
|
||||
import com.kunzisoft.keepass.education.Education
|
||||
import com.kunzisoft.keepass.fileselect.database.FileDatabaseHistory
|
||||
@@ -177,8 +176,7 @@ class NestedSettingsFragment : PreferenceFragmentCompat(), Preference.OnPreferen
|
||||
context?.let { context ->
|
||||
AlertDialog.Builder(context)
|
||||
.setMessage(resources.getString(R.string.fingerprint_delete_all_warning))
|
||||
.setIcon(resources.getDrawable(
|
||||
android.R.drawable.ic_dialog_alert))
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setPositiveButton(resources.getString(android.R.string.yes)
|
||||
) { _, _ ->
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
|
||||
Reference in New Issue
Block a user