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