combine nested ifs

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-26 22:58:43 +02:00
parent 46a18ca3a0
commit faf9ce2884
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B

View File

@ -158,11 +158,12 @@ class LockedController : NewBaseController(R.layout.controller_locked) {
super.onActivityResult(requestCode, resultCode, data) super.onActivityResult(requestCode, resultCode, data)
if (requestCode == REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS) { if (requestCode == REQUEST_CODE_CONFIRM_DEVICE_CREDENTIALS) {
if (resultCode == Activity.RESULT_OK) { if (resultCode == Activity.RESULT_OK) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (
if (SecurityUtils.checkIfWeAreAuthenticated(appPreferences!!.screenLockTimeout)) { Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
Log.d(TAG, "All went well, dismiss locked controller") SecurityUtils.checkIfWeAreAuthenticated(appPreferences!!.screenLockTimeout)
router.popCurrentController() ) {
} Log.d(TAG, "All went well, dismiss locked controller")
router.popCurrentController()
} }
} else { } else {
Log.d(TAG, "Authorization failed") Log.d(TAG, "Authorization failed")