title: onActivityResult not getting called when calling java activity from kotlin for result
body: <p>I am using Kotlin and Java in my project. I am opening a Java activity for result from Kotlin but the <code>onActivityResult</code> function written in Kotlin never gets called.</p>
  
  <p>Code (Kotlin):</p>
  
  <pre><code> override fun viewAllNotes() {
          val intent : Intent = Intent(this, ViewAllNotesActivity::class.java)
          intent.putExtra(AppConstants.VIEW_ALL_FLOW, AppConstants.VIEW_ALL_NOTES_FLOW)
          startActivityForResult(intent, VIEW_ALL_REQUEST_CODE)
   }
  
  
  override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
      super.onActivityResult(requestCode, resultCode, data)
      if (resultCode == Activity.RESULT_OK){
          if (requestCode == VIEW_ALL_REQUEST_CODE){
              if (data!!.getParcelableArrayListExtra&lt;ListNote&gt;(AppConstants.NOTES_LIST)!=null){
                  mViewModel.mNotesReminders.listNote = data.getParcelableArrayListExtra(AppConstants.NOTES_LIST)
              }
          }
      }
  }
  </code></pre>
  
  <p>Code (Java):</p>
  
  <pre><code> @Override
   public void onBackPressed() {
          Intent result = new Intent();
          result.putParcelableArrayListExtra(AppConstants.NOTES_LIST, mNotesList);
          setResult(Activity.RESULT_OK, result);
          this.finish();
   }
  </code></pre>
  
  <p>logcat</p>
  
  <pre><code>09-19 23:13:18.343 1552-1843/? I/ActivityManager: START u0 {cmp=com.raj.ifa.debug/com.raj.ifa.ui.viewAllNotesAndReminder.ViewAllNotesActivity (has extras)} from uid 10081 on display 0
  09-19 23:13:18.383 28407-28407/com.raj.ifa.debug I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
  09-19 23:13:18.607 28407-28412/com.raj.ifa.debug I/art: Do partial code cache collection, code=124KB, data=100KB
  09-19 23:13:18.619 28407-28412/com.raj.ifa.debug I/art: After code cache collection, code=123KB, data=100KB
  09-19 23:13:18.619 28407-28412/com.raj.ifa.debug I/art: Increasing code cache capacity to 512KB
  09-19 23:13:18.792 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:18.823 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:18.858 1552-1572/? I/ActivityManager: Displayed com.raj.ifa.debug/com.raj.ifa.ui.viewAllNotesAndReminder.ViewAllNotesActivity: +500ms
  09-19 23:13:18.863 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:18.880 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:18.925 28407-28407/com.raj.ifa.debug W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
  09-19 23:13:18.950 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:18.953 28407-28428/com.raj.ifa.debug D/OpenGLRenderer: endAllActiveAnimators on 0x8e89d080 (RippleDrawable) with handle 0x8e85d6c0
  09-19 23:13:19.240 1552-22693/? I/WindowManager: Destroying surface Surface(name=com.raj.ifa.debug/com.raj.ifa.ui.userDetails.UserDetailsActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.destroyOrSaveSurface:2073 com.android.server.wm.WindowManagerService.tryStartExitingAnimation:3017 com.android.server.wm.WindowManagerService.relayoutWindow:2897 com.android.server.wm.Session.relayout:215 android.view.IWindowSession$Stub.onTransact:286 com.android.server.wm.Session.onTransact:136 
  09-19 23:13:21.707 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:21.767 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:21.800 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:21.831 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  09-19 23:13:21.834 28407-28428/com.raj.ifa.debug D/OpenGLRenderer: endAllActiveAnimators on 0x8ce94e80 (RippleDrawable) with handle 0x8e85d270
  09-19 23:13:22.084 1552-14164/? I/WindowManager: Destroying surface Surface(name=com.raj.ifa.debug/com.raj.ifa.ui.viewAllNotesAndReminder.ViewAllNotesActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1449 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2478 com.android.server.wm.WindowManagerService.removeWindowLocked:2436 com.android.server.wm.WindowManagerService.removeWindowLocked:2305 com.android.server.wm.WindowManagerService.removeWindow:2300 com.android.server.wm.Session.remove:193 
  09-19 23:13:22.261 28407-28428/com.raj.ifa.debug D/EGL_emulation: eglMakeCurrent: 0xa89852a0: ver 2 0 (tinfo 0xa8983630)
  </code></pre>
  
  <p>Can anyone tell me what is wrong with my above code?</p>