title: When using registerForActivityResult in a fragment the callback is never called
body: <p>I'm using registerForActivityResult as the StartActivityForResult function is deprecated. So we are migrating toward the new way using registerForActivityResult. This works perfectly in Activities. However when using this in a fragment the callback is never called. I must also mention that the parent activity and other child fragments handles some results in the old way. When I debug the code i see that the onActivityResult or onRequestPermissionsResult of the parent is called but never the callback.
  This is the code in the parent activity:</p>
  <pre><code>override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
      when (resultCode) {
          Activity.RESULT_OK -&gt; {
              when (requestCode) {
                  RC_ONBOARDING_COMPLETE -&gt; {
                      HomeActivity.start(this)
                      finish()
                  }
                  else -&gt; super.onActivityResult(requestCode, resultCode, data)
              }
          }
          else -&gt; super.onActivityResult(requestCode, resultCode, data)
      }
  }
  </code></pre>
  <p>The child fragment:</p>
  <pre><code>val requestPermissionsLauncher: ActivityResultLauncher&lt;Array&lt;String&gt;&gt; =
      registerForActivityResult(
          ActivityResultContracts.RequestMultiplePermissions()
      ) { grantMap -&gt;
          accessLocationRequested(!grantMap.containsValue(false) &amp;&amp; grantMap.isNotEmpty())
      }
  </code></pre>
  <p>and behind a button :</p>
  <pre><code>requestPermissionsLauncher.launch(
                  arrayOf(
                      Manifest.permission.ACCESS_FINE_LOCATION,
                      Manifest.permission.ACCESS_COARSE_LOCATION
                  )
              )
  </code></pre>
  <p>I also use appcompat 1.3.0-rc01 the latest version available.
  Any ideas why the parent doesnt forward the result to the child?
  Oh yeah i checked this in the activity and i returns true:</p>
  <pre><code>activityResultRegistry.dispatchResult(
          requestCode, Activity.RESULT_OK, Intent()
              .putExtra(EXTRA_PERMISSIONS, permissions)
              .putExtra(EXTRA_PERMISSION_GRANT_RESULTS, grantResults)
      )
  </code></pre>