Android-期待成员声明错误

时间:2018-04-04 08:36:24

标签: android kotlin

class FingerprintHandler(private val appContext: Context) : FingerprintManager.AuthenticationCallback() {

private var cancellationSignal: CancellationSignal? = null



@RequiresApi(Build.VERSION_CODES.M)
fun startAuth(manager: FingerprintManager,
              cryptoObject: FingerprintManager.CryptoObject) {

    cancellationSignal = CancellationSignal()

    if (ActivityCompat.checkSelfPermission(appContext,
            Manifest.permission.USE_FINGERPRINT) !=
            PackageManager.PERMISSION_GRANTED) {
        return
    }
    manager.authenticate(cryptoObject, cancellationSignal, 0, this, null)
}}

尝试实施指纹身份验证时出现此错误.IDE未显示错误的确切位置。

0 个答案:

没有答案