2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

Fix breaking APIs in ActivityResultHandler

This commit is contained in:
Jonathan Almeida 2021-01-23 00:54:17 +04:00 committed by Jonathan Almeida
parent a0fa01155b
commit 65c69c6b9f
2 changed files with 3 additions and 2 deletions

View File

@ -1035,7 +1035,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler,
listOf(
promptsFeature,
webAuthnFeature
).any { it.onActivityResult(requestCode, resultCode, data) }
).any { it.onActivityResult(requestCode, data, resultCode) }
}
/**

View File

@ -12,6 +12,7 @@ import mozilla.components.concept.engine.activity.ActivityDelegate
import mozilla.components.support.base.feature.ActivityResultHandler
import mozilla.components.support.base.feature.LifecycleAwareFeature
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.FeatureFlags
/**
* This implementation of the WebAuthnFeature is only for testing in a nightly signed build.
@ -44,7 +45,7 @@ class WebAuthnFeature(
engine.unregisterActivityDelegate()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?): Boolean {
override fun onActivityResult(requestCode: Int, data: Intent?, resultCode: Int): Boolean {
logger.info("Received activity result with code: $requestCode\ndata: $data")
if (this.requestCode == requestCode) {
logger.info("Invoking callback!")