Repository: react-native
Issue: NullPointerException: Attempt to invoke virtual method 'void android.view.View.dispatchCancelPendingInputEvents()
Labels: Platform: Android,Needs: Triage :mag:,Needs: Repro,Newer Patch Available,Needs: Attention

### Description

[Android]
An exception is thrown periodically when requesting permissions:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.dispatchCancelPendingInputEvents()' on a null object reference
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.ViewGroup.dispatchCancelPendingInputEvents(ViewGroup.java:3893)
    at android.view.View.cancelPendingInputEvents(View.java:15729)
    at android.app.Activity.cancelInputsAndStartExitTransition(Activity.java:4337)
    at android.app.Activity.startActivityForResult(Activity.java:4956)
    at android.app.Activity.requestPermissions(Activity.java:4193)
    at com.facebook.react.ReactActivityDelegate.requestPermissions(ReactActivityDelegate.java:191)
    at com.facebook.react.ReactActivity.requestPermissions(ReactActivity.java:110)
    at com.facebook.react.modules.permissions.PermissionsModule.requestPermission(PermissionsModule.java:126)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
    at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
    at android.os.Looper.loop(Looper.java:154)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
    at java.lang.Thread.run(Thread.java:761)

### React Native Version

0.72.5

### Output of `npx react-native info`

System:
  OS: macOS 13.5.2
  CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 50.72 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.17.1
    path: /private/var/folders/7m/rj94pv291918l94_rmpgg9jm0000gn/T/xfs-7be70c02/node
  Yarn:
    version: 3.2.1
    path: /private/var/folders/7m/rj94pv291918l94_rmpgg9jm0000gn/T/xfs-7be70c02/yarn
  npm:
    version: 9.6.7
    path: /usr/local/bin/npm
  Watchman:
    version: 2023.10.09.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods: Not Found
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 21.4
      - iOS 16.0
      - macOS 12.3
      - tvOS 16.0
      - watchOS 9.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10811636
  Xcode:
    version: 14.0.1/14A400
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.6.5
    path: /Users/user/.rvm/rubies/ruby-2.6.5/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.5
    wanted: 0.72.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: false
  newArchEnabled: false

### Steps to reproduce

call https://reactnative.dev/docs/next/permissionsandroid#request

### Snack, screenshot, or link to a repository

-