Fixes #1037: Fix back button crasher

Java has nulls, and any object reference in Java can be null, but in Kotlin parameters default to not null unless the type is specified as `Type?`; our override of onActivityResult was specifying the type of the intent parameter as `Intent` instead of `Intent?`, causing an exception before our code was called. Figuring out how to turn on "break on all exceptions" in Android Studio (which is non-trivial for some reason) finally showed me the stack trace.
This commit is contained in:
Donovan Preston 2019-01-23 10:28:57 -05:00
parent 16ba74e959
commit d1ea261dea
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
super.onDestroy()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent) {
override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent?) {
super.onActivityResult(requestCode, resultCode, intent)
mWebView!!.onActivityResult(requestCode, resultCode, intent)
// ...