Skip to content

Commit 8c811d8

Browse files
committed
Tests caught stuff; good tests
1 parent c3283a6 commit 8c811d8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ matrix:
2323
components:
2424
- tools
2525
- platform-tools
26-
- build-tools-28.0.3
27-
- android-28
26+
- build-tools-29.0.2
27+
- android-29
2828
sudo: true
2929
before_install:
3030
- nvm install --lts

android/src/main/java/com/hieuvp/fingerprint/ReactNativeFingerprintScannerModule.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private int currentAndroidVersion() {
7070
}
7171

7272
private boolean requiresLegacyAuthentication() {
73-
return currentAndroidVersion < 23;
73+
return currentAndroidVersion() < 23;
7474
}
7575

7676
public class AuthCallback extends BiometricPrompt.AuthenticationCallback {
@@ -269,6 +269,8 @@ private String legacyGetErrorMessage() {
269269
} else if (!getFingerprintIdentify().isFingerprintEnable()) {
270270
return "FingerprintScannerNotAvailable";
271271
}
272+
273+
return null;
272274
}
273275

274276

@@ -299,7 +301,7 @@ public void onFailed(boolean isDeviceLocked) {
299301
if(isDeviceLocked){
300302
promise.reject("AuthenticationFailed", "DeviceLocked");
301303
} else {
302-
promise.reject("AuthenticationFailed", TYPE_FINGERPRINT);
304+
promise.reject("AuthenticationFailed", TYPE_FINGERPRINT_LEGACY);
303305
}
304306
ReactNativeFingerprintScannerModule.this.release();
305307
}

0 commit comments

Comments
 (0)