Files
react-native/ReactAndroid/src/main/java/com/facebook/react/module
Ramanpreet Nara d43059d0b8 Correct ReactModuleSpecProcessor TurboModule detection logic
Summary:
## Problem
For efficiency reasons, we'd only check whether the current class or its superclass implemented the `TurboModule` interface. However, it's possible for NativeModules to exist that use inheritance, and have their base class extend a code-generated spec. In this case, the superclass of the superclass of the NativeModule will implement `TurboModule`.

## Solution
To fix this problem, I'm relying on the `Types.isAssignable` API and checking whether the NativeModule can be assigned to the `TurboModule` interface. This is a more reliable way of knowing whether a NativeModule is a TurboModule or not.

**Note:** Had to adjust the buck dependencies of FrescoModule to make the `mTypes.isAssignable` check work.

Changelog:
[Android][Fixed] - Correct TurboModule detection logic in ReactModuleSpecProcessor

Reviewed By: fkgozali

Differential Revision: D19183671

fbshipit-source-id: ad21881453fe7027d9432048108f6ba344fd7e63
2019-12-20 08:49:05 -08:00
..
2019-10-16 10:06:34 -07:00
2019-10-16 10:06:33 -07:00