mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-05 00:02:27 -08:00
Merge branch 'master' into develop
This commit is contained in:
commit
0a21772e75
6 files changed
+109
-32
No files matched your search
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
* Copyright 2017 Hans Cappelle
|
||||
*
|
||||
* This file is part of KeePassDroid.
|
||||
*
|
||||
* KeePassDroid is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* KeePassDroid is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with KeePassDroid. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package com.keepassdroid.fingerprint;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
@@ -40,7 +59,6 @@ public class FingerPrintHelper {
|
||||
this.authenticationCallback = authenticationCallback;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public void startListening() {
|
||||
// no need to start listening when not initialised
|
||||
if (!isFingerprintInitialized()) {
|
||||
@@ -59,7 +77,6 @@ public class FingerPrintHelper {
|
||||
null);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public void stopListening() {
|
||||
if (!isFingerprintInitialized()) {
|
||||
return;
|
||||
@@ -80,6 +97,8 @@ public class FingerPrintHelper {
|
||||
|
||||
void onException();
|
||||
|
||||
void onException(boolean showWarningMessage);
|
||||
|
||||
}
|
||||
|
||||
@TargetApi(BuildCompat.VERSION_CODE_M)
|
||||
@@ -119,7 +138,6 @@ public class FingerPrintHelper {
|
||||
return hasEnrolledFingerprints() && initOk;
|
||||
}
|
||||
|
||||
@SuppressWarnings("NewApi")
|
||||
public void initEncryptData() {
|
||||
|
||||
if (!isFingerprintInitialized()) {
|
||||
@@ -144,7 +162,6 @@ public class FingerPrintHelper {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("NewApi")
|
||||
public void encryptData(final String value) {
|
||||
|
||||
if (!isFingerprintInitialized()) {
|
||||
@@ -169,12 +186,11 @@ public class FingerPrintHelper {
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings("NewApi")
|
||||
public void initDecryptData(final String ivSpecValue) {
|
||||
|
||||
if (!isFingerprintInitialized()) {
|
||||
if (fingerPrintCallback != null) {
|
||||
fingerPrintCallback.onException();
|
||||
fingerPrintCallback.onException(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -198,7 +214,6 @@ public class FingerPrintHelper {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("NewApi")
|
||||
public void decryptData(final String encryptedValue) {
|
||||
|
||||
if (!isFingerprintInitialized()) {
|
||||
@@ -256,7 +271,6 @@ public class FingerPrintHelper {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public boolean isHardwareDetected() {
|
||||
return FingerPrintUtils.isFingerprintSupported()
|
||||
&& fingerprintManager != null
|
||||
|
||||
Reference in new issue
Block a user