Commit Graph

12270 Commits

Author SHA1 Message Date
Vojtech Novak e414713e4c chore: stricter TS check for transform style (#38348)
Summary:
This improves the strictness of TS typings for `transform` on `View`'s `style` prop. Consider the following example, with what TS reports in case of errors, using RN 0.72.3. The  /  symbols indicate whether TS is happy with the code

```tsx
 <View style={{ transform: [{ scale: undefined }] }} />              //  TS2769: No overload matches this call.
 <View style={{ transform: [{ something: 1 }] }} />                  //  TS2769: No overload matches this call.
 <View style={{ transform: [{ scale: 1 }, { rotate: '90deg' }] }} />
 <View style={{ transform: [{ scale: 1, translateX: 1 }] }} /> // this is WRONG, corrected in the next row
 <View style={{ transform: [{ scale: 1 }, { translateX: 1 }] }} />
```

With this change, TS will report an error even for line 4

```tsx
 <View style={{ transform: [{ scale: undefined }] }} />              //  TS2769: No overload matches this call.
 <View style={{ transform: [{ something: 1 }] }} />                  //  TS2769: No overload matches this call.
 <View style={{ transform: [{ scale: 1 }, { rotate: '90deg' }] }} />
 <View style={{ transform: [{ scale: 1, translateX: 1 }] }} />      //  TS2769: No overload matches this call.
 <View style={{ transform: [{ scale: 1 }, { translateX: 1 }] }} />
```

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

[GENERAL] [CHANGED] - stricter TS check for transform style

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/38348

Test Plan: tested locally with the example given above; also added a TS type test

Reviewed By: rshest

Differential Revision: D47526366

Pulled By: NickGerleman

fbshipit-source-id: 5bd007ce29509ccdfce74c3864dee24290d9a175
2023-07-18 15:35:56 -07:00
MO-Lewis 0cdb9e6a52 - added: Websocket Module setCustomClientBuilder (#37798)
Summary:
Added code previously added in the following PR: https://github.com/facebook/react-native/pull/28659.

The above PR was accidentally scrapped due to the renaming of the master branch on the React Native repo. As advised in this comment: https://github.com/facebook/react-native/issues/37770#issuecomment-1582476332, I'm opening a new PR with the same code to get this merged into master / main.

Currently, we need to run a local fork of React Native and manually apply these changes ourselves. This then causes additional issues, as it's currently _**impossible**_ to build React Native from source when running on a Windows machine, as evidenced in https://github.com/facebook/react-native/issues/37770 and the other linked issues nested inside of this issue.

**Original summary is as follows:**
With `NetworkModule.setCustomClientBuilder` we can customize our OkHttpClient to all requests made by react-native, it's very useful when you do `SSL Pinning` or change some OkHttpClient configuration at all. I've added a similar function to websocket, it allow us do some configurations on Websocket OkHttpClient.

## Changelog:
[Android] [Added] - Websocket Module setCustomClientBuilder

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/37798

Test Plan:
**From the original PR:**

You can just set a custom `CustomClientBuilder` on `MainActivity` `onCreate`:

```
import okhttp3.OkHttpClient;
import java.util.concurrent.TimeUnit;
import com.facebook.react.modules.network.CustomClientBuilder;
import com.facebook.react.modules.websocket.WebsocketModule;

public class MainActivity extends ReactFragmentActivity {

    Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        RNBootSplash.init(R.drawable.launch_screen, MainActivity.this);

        WebsocketModule.setCustomClientBuilder(new CustomClientBuilder() {
            Override
            public void apply(OkHttpClient.Builder builder) {
              builder.connectTimeout(0, TimeUnit.MILLISECONDS);
            }
          });
    }

   ...
```

Reviewed By: cortinico

Differential Revision: D47468613

Pulled By: javache

fbshipit-source-id: ad97fb18ba5784d8abe157f5ccd29201b8b0fe84
2023-07-18 13:56:08 -07:00
Constantine Fry b8d60a834f Move RCTSurfaceHostingComponent and RCTSurfaceBackedComponent (#38213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38213

Pull Request resolved: https://github.com/facebook/react-native/pull/38183

Changelog: [iOS][Removed] Remove RCTSurfaceHostingComponent and RCTSurfaceBackedComponent, needed only for ComponentKit integration.

Reviewed By: motiz88

Differential Revision: D47255482

fbshipit-source-id: 11db6f37a69a6f1e76ee7744a92f85c232342bd5
2023-07-18 13:21:14 -07:00
Harry Yu ff1972daba Wrap NullPointerExceptions and throw new Error in dispatchViewManagerCommand for easier debugging (#38444)
Summary:
This PR is a modified version of https://github.com/facebook/react-native/issues/38060 which was reverted because it may sometimes cause sensitive info to be logged. This version no longer includes any parameters in the thrown errors.

### Motivation

I had a crash-causing error in our error reporting console (Bugsnag) that was extremely hard to debug due to the lack of specificity in the thrown error.

```
java.lang.NullPointerException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference
        at com.facebook.react.bridge.ReadableNativeArray.getDouble(ReadableNativeArray.java:92)
        at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:64)
        at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:60)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:356)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
        at com.facebook.jni.NativeRunnable.run(NativeRunnable.java:-2)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:214)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:919)
```

I noticed that `invoke` in `JavaMethodWrapper` tacks on the JS method name on other errors, so wanted to change this to handle NullPointerExceptions more gracefully too.

This helps make it easier to debug issues like https://github.com/facebook/react-native/issues/23126, https://github.com/facebook/react-native/issues/19413, https://github.com/facebook/react-native/issues/27633, https://github.com/facebook/react-native/issues/23378, https://github.com/facebook/react-native/issues/29250, https://github.com/facebook/react-native/issues/28262, https://github.com/facebook/react-native/issues/34001 and likely many more.

### After adding NullPointerException

Even after adding the NullPointerException, I got errors like this:

```
com.facebook.react.bridge.NativeArgumentsParseException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference (constructing arguments for UIManager.dispatchViewManagerCommand at argument index 0) with parameters [null, 4.0, []]
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
        at com.facebook.jni.NativeRunnable.run(NativeRunnable.java:-2)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:1012)
```

This helped, but still didn't help me easily find which library calling `dispatchViewManagerCommand` was causing this.

## Changelog:

[ANDROID] [CHANGED] - Wrap NullPointerExceptions when thrown by native code called from JS for readability
[GENERAL] [CHANGED] - Throw Error in dispatchViewManagerCommand when non-numeric tag is passed for easier debugging

Pull Request resolved: https://github.com/facebook/react-native/pull/38444

Test Plan:
Test change on our app via a beta release.

With these changes, we got better stacktraces like these:

### Java stacktrace

```
com.facebook.react.bridge.NativeArgumentsParseException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference (constructing arguments for UIManager.dispatchViewManagerCommand at argument index 0) with parameters [null, 4.0, []]
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:371)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
        at com.facebook.jni.NativeRunnable.run(NativeRunnable.java:-2)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
        at java.lang.Thread.run(Thread.java:1012)
```

### JS stacktrace (after dispatchViewManagerCommand change)

```
Error dispatchViewManagerCommand: found null reactTag with args []
    node_modules/react-native/Libraries/ReactNative/PaperUIManager.js:120:21 dispatchViewManagerCommand
    node_modules/react-native-maps/lib/MapMarker.js:68:67 _runCommand
    node_modules/react-native-maps/lib/MapMarker.js:60:24 redraw
    templates/Components/MapViewWithMarkers/PlaceMarker.tsx:88:32 anonymous
    (native) apply
    node_modules/react-native/Libraries/Core/Timers/JSTimers.js:213:22 anonymous
    node_modules/react-native/Libraries/Core/Timers/JSTimers.js:111:14 _callTimer
    node_modules/react-native/Libraries/Core/Timers/JSTimers.js:359:16 callTimers
    (native) apply
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:427:31 __callFunction
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:25 anonymous
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:10 __guard
    node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:16 callFunctionReturnFlushedQueue
```

Reviewed By: javache

Differential Revision: D47546672

Pulled By: cortinico

fbshipit-source-id: 68379561d84d0ef2ed5c6d66f3f49943c5d7cb7e
2023-07-18 10:37:57 -07:00
Nicola Corti 5dce2e470f Better Incremental build for :ReactAndroid:hermes-engine (#38497)
Summary:
This fixes an issue we had with incremental compilation of `:ReactAndroid:hermes-engine`
Practically the `buildHermesC` and `configureBuildForHermes` would re-run every time as they had no input/output configured.

This breaks incremental compilation, meaning that when you want to rebuild RN-Tester, you would rebuild hermesc every time.

This fixes it for good, so we won't be rebuilding `hermesc` unless needed.

## Changelog:

[INTERNAL] - Better Incremental build for :ReactAndroid:hermes-engine

Pull Request resolved: https://github.com/facebook/react-native/pull/38497

Test Plan:
Will wait for CI to be green. Plus I've verified that those tasks don't get re-executed on subsequent builds:

```bash
$ gw :packages:rn-tester:android:app:assembleHermesDebug --console=plain
> Task :react-native-gradle-plugin:compileKotlin UP-TO-DATE
> Task :react-native-gradle-plugin:compileJava NO-SOURCE
> Task :react-native-gradle-plugin:pluginDescriptors UP-TO-DATE
> Task :react-native-gradle-plugin:processResources UP-TO-DATE
> Task :react-native-gradle-plugin:classes UP-TO-DATE
> Task :react-native-gradle-plugin:jar UP-TO-DATE
> Task :react-native-gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:preBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:preDebugBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugResValues UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:buildCodegenCLI SKIPPED
> Task :packages:react-native:ReactAndroid:flipper-integration:packageDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:parseDebugLocalResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:processDebugManifest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugRFile UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:javaPreCompileDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugLibraryResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:writeDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:extractDeepLinksDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:mergeDebugShaders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugShaders NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:generateDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:packageDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:processDebugJavaRes NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:mergeDebugJniLibFolders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:mergeDebugNativeLibs NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:copyDebugJniLibsProjectOnly UP-TO-DATE
> Task :packages:rn-tester:android:app:buildCodegenCLI SKIPPED
> Task :packages:react-native:ReactAndroid:generateCodegenSchemaFromJavaScript UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateCodegenArtifactsFromSchema UP-TO-DATE
> Task :packages:react-native:ReactAndroid:createNativeDepsDirectories UP-TO-DATE
> Task :packages:rn-tester:android:app:generateCodegenSchemaFromJavaScript UP-TO-DATE
> Task :packages:rn-tester:android:app:generateCodegenArtifactsFromSchema UP-TO-DATE
> Task :packages:rn-tester:android:app:preBuild UP-TO-DATE
> Task :packages:rn-tester:android:app:preHermesDebugBuild UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugNativeDebugMetadata NO-SOURCE

> Task :packages:react-native:ReactAndroid:downloadBoost UP-TO-DATE
Download https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz

> Task :packages:rn-tester:android:app:generateHermesDebugBuildConfig UP-TO-DATE
> Task :packages:rn-tester:android:app:javaPreCompileHermesDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareBoost UP-TO-DATE
> Task :packages:rn-tester:android:app:generateHermesDebugResValues UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadDoubleConversion UP-TO-DATE
Download https://github.com/google/double-conversion/archive/v1.1.6.tar.gz

> Task :packages:rn-tester:android:app:generateHermesDebugResources UP-TO-DATE
> Task :packages:rn-tester:android:app:packageHermesDebugResources UP-TO-DATE
> Task :packages:rn-tester:android:app:parseHermesDebugLocalResources UP-TO-DATE
> Task :packages:rn-tester:android:app:createHermesDebugCompatibleScreenManifests UP-TO-DATE
> Task :packages:rn-tester:android:app:extractDeepLinksHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugShaders UP-TO-DATE
> Task :packages:rn-tester:android:app:compileHermesDebugShaders NO-SOURCE
> Task :packages:rn-tester:android:app:generateHermesDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareDoubleConversion UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadFmt UP-TO-DATE
Download https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz

> Task :packages:react-native:ReactAndroid:downloadFolly UP-TO-DATE
Download https://github.com/facebook/folly/archive/v2021.07.22.00.tar.gz

> Task :packages:rn-tester:android:app:checkHermesDebugDuplicateClasses UP-TO-DATE
> Task :packages:rn-tester:android:app:desugarHermesDebugFileDependencies UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareFmt UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeExtDexHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugJavaRes NO-SOURCE
> Task :packages:rn-tester:android:app:preJscDebugBuild UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugJniLibFolders UP-TO-DATE
> Task :packages:rn-tester:android:app:validateSigningHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:writeHermesDebugAppMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareFolly UP-TO-DATE
> Task :packages:rn-tester:android:app:writeHermesDebugSigningConfigVersions UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadGlog UP-TO-DATE
Download https://github.com/google/glog/archive/v0.3.5.tar.gz

> Task :packages:react-native:ReactAndroid:downloadGtest UP-TO-DATE
Download https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz

> Task :packages:react-native:ReactAndroid:prepareGlog UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareGtest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareJSC UP-TO-DATE

> Task :packages:react-native:ReactAndroid:downloadLibevent UP-TO-DATE
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

> Task :packages:react-native:ReactAndroid:preparePrefab UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prepareLibevent UP-TO-DATE
> Task :packages:react-native:ReactAndroid:preBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:preDebugBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugBuildConfig UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugResValues UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:packageDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:parseDebugLocalResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:processDebugManifest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:generateDebugRFile UP-TO-DATE
> Task :packages:react-native:ReactAndroid:javaPreCompileDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:compileDebugLibraryResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:writeDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:extractDeepLinksDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:mergeDebugShaders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:compileDebugShaders NO-SOURCE
> Task :packages:react-native:ReactAndroid:generateDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:packageDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:processDebugJavaRes NO-SOURCE
> Task :packages:react-native:ReactAndroid:mergeDebugJniLibFolders UP-TO-DATE

> Task :packages:react-native:ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/main

> Task :packages:react-native:ReactAndroid:hermes-engine:unzipHermes UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:configureBuildForHermes UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:buildHermesC UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:prepareHeadersForPrefab UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:preBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:preDebugBuild UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugResValues UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:packageDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:parseDebugLocalResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:processDebugManifest UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugRFile UP-TO-DATE
> Task :packages:rn-tester:android:app:mapHermesDebugSourceSetPaths UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:javaPreCompileDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:compileDebugJavaWithJavac UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:bundleLibCompileToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:compileDebugLibraryResources UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:writeDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:extractDeepLinksDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:mergeDebugShaders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:compileDebugShaders NO-SOURCE
> Task :packages:react-native:ReactAndroid:hermes-engine:generateDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:packageDebugAssets UP-TO-DATE
> Task :packages:rn-tester:android:app:checkHermesDebugAarMetadata UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:processDebugJavaRes NO-SOURCE
> Task :packages:react-native:ReactAndroid:hermes-engine:bundleLibResDebug NO-SOURCE
> Task :packages:rn-tester:android:app:processHermesDebugMainManifest UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugManifest UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugManifestForPackage UP-TO-DATE
> Task :packages:rn-tester:android:app:processHermesDebugResources UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugAssets UP-TO-DATE
> Task :packages:rn-tester:android:app:compressHermesDebugAssets UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:configureCMakeRelease[arm64-v8a]
> Task :packages:react-native:ReactAndroid:hermes-engine:generateJsonModelDebug
> Task :packages:react-native:ReactAndroid:hermes-engine:prefabDebugConfigurePackage UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:buildCMakeRelease[arm64-v8a][libhermes]
> Task :packages:react-native:ReactAndroid:compileDebugKotlin UP-TO-DATE
> Task :packages:react-native:ReactAndroid:compileDebugJavaWithJavac UP-TO-DATE
> Task :packages:react-native:ReactAndroid:bundleLibCompileToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:bundleLibResDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugKotlin UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:compileDebugJavaWithJavac NO-SOURCE
> Task :packages:react-native:ReactAndroid:flipper-integration:bundleLibCompileToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:flipper-integration:bundleLibResDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:compileHermesDebugJavaWithJavac UP-TO-DATE
> Task :packages:rn-tester:android:app:dexBuilderHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugGlobalSynthetics UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeHermesDebugJavaResource UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeLibDexHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:mergeProjectDexHermesDebug UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:externalNativeBuildDebug
> Task :packages:react-native:ReactAndroid:hermes-engine:prefabDebugPackage UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:mergeDebugJniLibFolders UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:mergeDebugNativeLibs UP-TO-DATE
> Task :packages:react-native:ReactAndroid:hermes-engine:copyDebugJniLibsProjectOnly UP-TO-DATE
> Task :packages:react-native:ReactAndroid:configureCMakeDebug[arm64-v8a]
> Task :packages:react-native:ReactAndroid:buildCMakeDebug[arm64-v8a][bridgeless,fabricjni,etc]
> Task :packages:react-native:ReactAndroid:mergeDebugNativeLibs UP-TO-DATE
> Task :packages:react-native:ReactAndroid:copyDebugJniLibsProjectOnly UP-TO-DATE
> Task :packages:react-native:ReactAndroid:externalNativeBuildDebug
> Task :packages:react-native:ReactAndroid:generateJsonModelDebug
> Task :packages:react-native:ReactAndroid:prefabDebugConfigurePackage UP-TO-DATE
> Task :packages:react-native:ReactAndroid:prefabDebugPackage UP-TO-DATE
> Task :packages:rn-tester:android:app:configureCMakeDebug[arm64-v8a]
> Task :packages:rn-tester:android:app:buildCMakeDebug[arm64-v8a]
> Task :packages:rn-tester:android:app:mergeHermesDebugNativeLibs UP-TO-DATE
> Task :packages:rn-tester:android:app:stripHermesDebugDebugSymbols UP-TO-DATE
> Task :packages:rn-tester:android:app:packageHermesDebug UP-TO-DATE
> Task :packages:rn-tester:android:app:createHermesDebugApkListingFileRedirect UP-TO-DATE
> Task :packages:rn-tester:android:app:assembleHermesDebug UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.2.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 3s
130 actionable tasks: 8 executed, 122 up-to-date
```

Reviewed By: mdvacca

Differential Revision: D47551640

Pulled By: cortinico

fbshipit-source-id: 8eaf5e189f85f323bc41f23f744c724bd6dd4262
2023-07-18 10:03:23 -07:00
Ken Tominaga ba6dc35337 chore: Replace 'M1' with 'Apple Silicon' in the doc (#38344)
Summary:
Use Apple Silicon instead of M1 because we have M2 and other variations too.

I did not change the name of `__apply_Xcode_12_5_M1_post_install_workaround` as it's in use.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[GENERAL] [FIXED] - Use Apple Silicon instead of M1

Pull Request resolved: https://github.com/facebook/react-native/pull/38344

Test Plan: None as no behavioral changes

Reviewed By: christophpurrer

Differential Revision: D47466540

Pulled By: javache

fbshipit-source-id: d770189e065899181a8b4ea17465beef09607d2f
2023-07-18 09:56:25 -07:00
Ramanpreet Nara 01594cae47 Interop: Fix regression test (#38476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38476

The TurboModule interop layer test asserts that SampleLegacyModule.const2 == 390.

But SampleLegacyModule.const2 was actually the screen size of device, which is different locally vs sandcastle.

So, while the test passed locally (b/c screen size = 390), it failed on Sandcastle (b/c screen size = 375).

So, this diff hardcodes const2 to be 390.

Created from CodeHub with https://fburl.com/edit-in-codehub

Reviewed By: christophpurrer

Differential Revision: D47379531

fbshipit-source-id: 0abf079400d376d4816fecf1e7dac6db6fc688c1
2023-07-18 09:11:23 -07:00
Pieter De Baets 67e33ebd01 Align usage of JSPointerDispatcher across ReactSurfaceView and ReactRootView (#38350)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38350

Found subtle differences between how JSPointerDispatcher is configured across bridgeless.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D47468666

fbshipit-source-id: 730cd93ea426e50eb67a71feacc8d3eb477c4c96
2023-07-18 08:30:41 -07:00
Dmitry Rykun 47557ae781 iOS: Add Commands and Constants properties to native view config (#38221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38221

View configs are supposed to have `Commands` and `Constants`. See [ReactNativeTypes.js](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js#L68-L69).
Android sets them in native: see [UIManagerModuleConstantsHelper.java](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.java#L172-L179).
ut iOS doesn't: see [RCTUIManager.m](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Modules/RCTUIManager.m#L1484-L1487)
Instead there is code for that in [PaperUIManager.js](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L117-L160).
It accesses viewManagers like this: `const viewManager = NativeModules[viewConfig.Manager]`. But `NativeModules` object is not available in the bridgeless mode. So we fail to provide complete native view configs in the New Architecture.

This diff implements `Commands` and `Constants` in native in iOS.
This change should have no effect in the old architecture because these properties are overwritten by `lazifyViewManagerConfig`.

Changelog: [Internal] - Add Commands and Constants properties to native view config.

Reviewed By: sammy-SC

Differential Revision: D47096624

fbshipit-source-id: e3b3183ba5e3d1d2fb3f3ff5d6ff89ad86095a6c
2023-07-18 08:15:13 -07:00
Intl Scheduler 080a3d300d translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907924283078
Sandcastle Job Instance ID: 9007200249360092
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47549385

fbshipit-source-id: 3721ea2b2e51ab354917904ae79a1415a6e8a335
2023-07-18 06:17:30 -07:00
Ruslan Shestopalyuk 04ad34d6ad Decouple isTesting Platform flag from disabling/enabling animations when testing (#38490)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38490

## Changelog
[Internal] -

The internal `Platform.isTesting` is tightly coupled to animations being disabled, which in turn can lead to subtle problems in some of the corner cases:
* Since `isTesting` is force override to `false` on JS side in non-dev builds, it means that e2e tests, that would like to use release builds, are out of luck when animation disabling is desired
* Conversely, some of the e2e tests may actually rely on animations being enabled in order to work, which means they are also out of luck if trying to test a dev build
* Finally, we have cases of hybrid builds, which are build in release on native side, but also have `__DEV__=true` on the native side

To both cover the above scenarios, but also to be backwards compatible to all the existing once, this change introduces another flag, `Platform.isDisableAnimations`.

The way it works is:
* If it's not specified, the e2e tests behaviour will be exactly the same as before, since by default `isDisableAnimations` will be true when `isTesting` is true
* If it's specified and is equal to `false`, it means that animations will be still enabled, even if `isTesting` is true (for those e2e tests that rely on animations being enabled)
* If it's specified and is equal to 'true', it means that animations will be force disabled, no matter whether we test a release or a dev build

Note that this only specifies the JS side of things, defaulting `Platform.isDisableAnimations` to "not specified" (i.e. all the tests will behave as before).

Pulling it through for different platforms is done as a separate follow-up.

Differential Revision: D47516800

fbshipit-source-id: efcb78f68f9102fec025ecce9a475c9c0bc1ecca
2023-07-17 22:07:53 -07:00
Xin Chen 777934ec3a Reenable scrollEventThrottle prop for ScrollView and HorizontalScrollView (#38475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38475

We added `scrollEventThrottle` for android in D35735978, but the experiment was never executed and the flag got removed in D39449184.

Since the same feature is on iOS and the implementation here is the same to iOS (https://fburl.com/code/htcuhq4w), it should be safe to support.

Changelog:
[Android][Add] - Add scrollEventThrottle prop support for android

Reviewed By: cortinico

Differential Revision: D47492259

fbshipit-source-id: 09a2bead652bfef4a2c70b996cf66f6983604db2
2023-07-17 16:42:03 -07:00
Gergely Hegedus ab3c00de2c Fix issue#11068 of duplicating characters when replacing letters to lowercase or uppercase in TextInput (#35929)
Summary:
These changes are intended to resolve https://github.com/facebook/react-native/issues/11068.

## Changelog:

[Android] [Fixed] - Fix letters duplication when using autoCapitalize

Pull Request resolved: https://github.com/facebook/react-native/pull/35929

Test Plan:
I took the `RewriteExample` from `TextInputSharedExamples.js` duplicated it, updated the labels, attached to the same screen. Modified its `onChangeText` function, from `text = text.replace(/ /g, '_');` to `text = text.toLowerCase();` then tested via rn-tester as shown in the video:
- No duplicate characters
- Characters are updated to be lowercase
- Long pressing delete properly deletes, doesn’t stop after deleting one character
- Suggestions (selected from keyboard) work and are updated to lowercase when it becomes part of the input text
- Moving the cursor and typing works, cursor position is kept as it should
- Moving the cursor and deleting works
- Selection portion and deleting it works, cursor position is kept as it should

https://user-images.githubusercontent.com/14225329/213890296-2f194e21-2cf9-493f-a516-5e0212ed070e.mp4

Note: I have tested manually with 0.67.4, because later versions failed on my machine with cmake and argument errors when building the rn-tester from Android Studio to any device.
Help regarding that would be appreciated.

## Possible Future Improvements

As it can be seen the video, the letter duplication is resolved, however since the lowercase modification happens on the Javascript side, it takes a couple milliseconds and the Uppercase can still be shown momentarily while typing.

## Technical details, why the solution works

I've debugged a simple AppCompatEditText with calling the same `getText().replace` in `doAfterTextChanged` with a bit of delay and noticed a difference to the `ReactEditText`.

The ReactEditText removes the `android.view.inputmethod.ComposingText` Span in `manageSpans` before calling replace (ComposingText is `Spanned.SPAN_EXCLUSIVE_EXCLUSIVE`).
That `ComposingText` Span is used in `android.view.inputmethod.BaseInputConnection` `private replaceText` to find from what point the text should be replaced from when applying suggestions or typing new letters. Without that Span, it defaults to the selection position, which is usually the end of the text causing duplication of the old "word".

**In simple terms, while typing with suggestions on the keyboard, each new letter is handled similarly as clicking a suggestion would be, aka replacing the current "word" with the new "word". (let's say "Ar" word with "Are" word)**

Another way to describe it:
While typing with suggestions, with the ComposingText Span the TextView keeps track of what word completions are suggested for on the keyboard UI. When receiving a new letter input, it replaces the current "word" with a new "word", and without the Span, it replaces nothing at the end (selection point) with the new word which results in character duplication.

It also seems to make sense then why without suggestions (like password-visible and secureTextEntry) the issue hasn't occurred.

### Examples

How the issue happened:
> - User types: A (ComposingText Span becomes (0,1), composingWord: "A")
> - Javascript replaced A with a, ComposingText Span was removed from getText()
> - User types a new character: r (ComposingText, defaulting to selection, from selection, empty string is replaced with word "Ar")
> => Complete text: aAr => letter duplication.

How it works with the changes applied:
> - User types: A (ComposingText Span becomes (0,1), composingWord: "A")
> - Javascript replaces A with a, (ComposingText Span (0,1) is re-set after replace)
> - User types a new character: r (ComposingText (0,1), "a" word is replaced with word "Ar". ComposingText becomes (0,2) "Ar")
> - Javascript replaced Ar with ar, (ComposingText Span (0,2) is re-set after replace)
> => Complete text: ar => no letter duplication
> - User selects suggestion "Are" (ComposingText Span (0,2) "ar" is replaced with new word and space "Are ")
> - CompleteText: "Are "
> - Javascript replaces "Are " with "are " (ComposingText Span doesn't exist, no string after space " ")

Note: the Editable.replace also removes the ComposingText, if it doesn't cover the whole text, that's why we need to re-setSpan them even if we wouldn't remove them in `manageSpans`.

## Note

This is my first attempt to contribute so if I missed something or messed up, please point out and I will try to adapt.

Reviewed By: NickGerleman

Differential Revision: D47243817

Pulled By: lunaleaps

fbshipit-source-id: 5f3551d17466f2c7cd1aa89ffb09af50e065b52e
2023-07-17 15:14:50 -07:00
Xin Chen d839e4abac Call C++ ReactMarker from android side to log platform specific timing (#38321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38321

This diff adds the native method in `ReactMarker.java` file so that any logs in the android side will call into C++. Given that currently the C++ uses the native implementation from hosting platforms, this allows any call (either from C++ or android) will end up calling the C++ method after logging is done.

The motivation of this change is to allow us to collect timing information from  hosting platforms, and report back to JS performance startup API. We will have items that are logged before the JNI part is loaded, and those will be cached and sent over in the next diff.

Changelog:
[Android][Internal] - Implemented native method for Android LogMarker API to report timing values to C++.

Reviewed By: mdvacca

Differential Revision: D43806115

fbshipit-source-id: 11497bdc0af8d1b0299a797c636bb7af7a6ddda4
2023-07-17 14:32:00 -07:00
Juan Luis Herrero Estrada eadbfb86c6 fix pointerMove case (#38356)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38356

fix the correct case of this event

  Changelog:
    [General][Fixed] - fix the correct case of this event

Reviewed By: javache

Differential Revision: D47480741

fbshipit-source-id: a600f4921c59c571f2da251b36674a98c8c7e51f
2023-07-17 08:33:12 -07:00
Nicola Corti 995bb3e995 Fabric Interop - Also normalize direct events (#38352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38352

This change is making sure we normalize both bubbling and direct events for the sake of Fabric Interop.
This is currently required as some libraries have reported incompatiblities with Fabric Interop
(see https://github.com/react-native-maps/react-native-maps/issues/4383)

Also this is has been reported by the WG here:
https://github.com/reactwg/react-native-new-architecture/discussions/135#discussioncomment-6443294

Changelog:
[Android] [Fixed] - Fabric Interop - Fix support for direct events on Paper components

Reviewed By: rshest

Differential Revision: D47472050

fbshipit-source-id: f0ae95cb782e340281928819a702273fb14e9b16
2023-07-17 05:37:38 -07:00
Janic Duplessis e21c25eb91 Add missing toolchains plugin in react-native-gradle-plugin (#38292)
Summary:
I was getting the following error when trying to run RN Tester on Android.

```
A problem occurred configuring project ':packages:react-native:ReactAndroid'.
> Could not determine the dependencies of task ':react-native-gradle-plugin:compileKotlin'.
   > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
      > No locally installed toolchains match and toolchain download repositories have not been configured.
```

This is fixed by adding the `org.gradle.toolchains.foojay-resolver-convention` plugin in settings.gradle, this was done already for the root one, but not in the one in `react-native-gradle-plugin`.

## Changelog:

[INTERNAL] [FIXED] - Add missing toolchains plugin in react-native-gradle-plugin

Pull Request resolved: https://github.com/facebook/react-native/pull/38292

Test Plan: Build RN Tester on android

Reviewed By: mdvacca

Differential Revision: D47371772

Pulled By: cortinico

fbshipit-source-id: 8eaa5de9559720a7b37d11b3ddceb5fb84753a40
2023-07-17 05:09:56 -07:00
Kevin Gozali 8ab9a77670 Bridge Mode: Make TurboModule invalidation more robust (#38357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38357

## Context
On iOS, NSNotificationCenter facilitates event dispatch:
- People can dispatch events **to** objects.
- People can subscribe to events coming **from** objects.

(By specifying objects, NSNotificationCenter also implements event filtering).

The TuboModule system uses NSNotificationCenter to implement module invalidation:
- The bridge dispatches invalidation notifications to its parentBridge object.
- The TurboModuleManager listens to those invalidation notifications from the parentBridge object.

## Problem
In some apps, the TurboModuleManager never invalidates modules.

The bridge dispatches its invalidation notifications to nil: the parentBridge gets deallocated before bridge invalidation finishes.

But, the TurboModuleManager never receives those invalidation notifications: it is listening to invalidation notifications coming from a non-nil parentBridge.

## Fix
Make the TurboModuleManager listen to invalidation notifications from all objects. It will just manually noop invalidation if the notification's bridge object doesn't match its own bridge object. (This is existing logic).

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D47485910

fbshipit-source-id: 163403ef01f7d164a0e482f0f770a801d572503b
2023-07-16 10:23:38 -07:00
Intl Scheduler 4c944540f7 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907920030591
Sandcastle Job Instance ID: 36028798013455852
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47480950

fbshipit-source-id: 79bc7b86db0f97657fc14e86e2fead386aee79c0
2023-07-14 12:36:42 -07:00
Ruslan Shestopalyuk 44a507fdcf Temporarily back out "[RN] Gate Platform.isTesting via __DEV__ on the native level" (#38349)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38349

## Changelog:

[Internal] -

This backs out an earlier commit because we have two separate internal tests' setups that broke as a side effect of it.

In both cases the setup was arguably inconsistent, however the plan is to temporarily revert this nevertheless, fix the tests first and then resubmit.

Reviewed By: javache

Differential Revision: D47469176

fbshipit-source-id: 532253b032b010b037d7b6f6581147f5531f7ee1
2023-07-14 10:48:44 -07:00
AntoineDoubovetzky 06668fcbac (Android/ScrollView) Fix onMomentumScrollEnd being called multiple times (#32433)
Summary:
I noticed that `onMomentumScrollEnd` is called multiple times on Android.

1. It is always called three times with the last value
2. It is sometimes called many times befire the scrolling stops when the pagingEnabled prop is true

See:
<img src="https://user-images.githubusercontent.com/17070498/137640334-301b32a7-3f59-403f-ba7e-a898666aaf3e.png" width="400"/>

I used the following code to get the logs:
```
import React from 'react';
import {SafeAreaView, ScrollView, Text, View} from 'react-native';

const App = () => {
  const onMomentumScrollEnd = ({nativeEvent}) => {
    console.log(
      'onMomentumScrollEnd',
      nativeEvent.contentOffset.x,
      nativeEvent.contentOffset.y,
    );
  };

  const onMomentumScrollBegin = ({nativeEvent}) => {
    console.log(
      'onMomentumScrollBegin',
      nativeEvent.contentOffset.x,
      nativeEvent.contentOffset.y,
    );
  };

  return (
    <SafeAreaView>
      <ScrollView
        horizontal
        pagingEnabled
        onMomentumScrollEnd={onMomentumScrollEnd}
        onMomentumScrollBegin={onMomentumScrollBegin}>
        {new Array(10).fill(0).map((_, index) => {
          return (
            <View
              style={{width: 400, height: 400, backgroundColor: 'red'}}
              key={index}>
              <Text>{index}</Text>
            </View>
          );
        })}
      </ScrollView>
    </SafeAreaView>
  );
};

export default App;

```

From what I understood:

1. We do not check that `mStableFrames` is >= 3 when emitting the event (line 798) and we keep executing the runnable, so it is emitted until `mStableFrames` equals  3. When `mStableFrames` equals 3 we stop executing the runnable (line 809). That's why it gets called 3 times.
2. When `pagingEnabled` is true, the `postOnAnimationDelayed` method is called twice (line 794 and line 806). I believe it causes the runnable to be executing too often, and the `onMomentumScrollEnd` event to be emitted too many times.

I updated the code so:

1.  The event is emitted only once, and at the same time we stop executing the runnable
2. The `postOnAnimationDelayed` method is called at most once per execution of the runnable

## Changelog

[Android] [Fixed] - Fix ScrollView's onMomentumScrollEnd being called multiple times on Android

Pull Request resolved: https://github.com/facebook/react-native/pull/32433

Test Plan: I tested using the code above with every combination of `horizontal` and `pagingEnabled` values.

Reviewed By: NickGerleman

Differential Revision: D47297163

Pulled By: ryancat

fbshipit-source-id: 7c31175d941ff13bed20dac03fb92d2b56e94dec
2023-07-13 20:32:21 -07:00
Hanno J. Gödecke 6d206a3f54 Add workaround for android API 33 ANR when inverting ScrollView (#38071)
Summary:
This PR is a result of this PR, which got merged but then reverted:

- https://github.com/facebook/react-native/pull/37913

We are trying to implement a workaround for https://github.com/facebook/react-native/issues/35350, so react-native users on android API 33+ can use `<FlatList inverted={true} />` without running into ANRs.

This is the native part, where we add a new internal prop named `isInvertedVirtualizedList`, which can in a follow up change be used to achieve the final fix as proposed in https://github.com/facebook/react-native/pull/37913

However as NickGerleman pointed out, its important that we first ship the native change.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[ANDROID] [ADDED] - Native part of fixing ANR when having an inverted FlatList on android API 33+

Pull Request resolved: https://github.com/facebook/react-native/pull/38071

Test Plan:
- Check the RN tester app and see that scrollview is still working as expected
- Add the `isInvertedVirtualizedList` prop as test to a scrollview and see how the scrollbar will change position.

Reviewed By: rozele

Differential Revision: D47062200

Pulled By: NickGerleman

fbshipit-source-id: d20eebeec757d9aaeced8561f53556bbb4a492e4
2023-07-13 19:11:07 -07:00
Ruslan Shestopalyuk ecb58a1d85 Gate Platform.isTesting via __DEV__ on the native level (#38339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38339

## Changelog:
[Internal] -

In D13050583, the `Platform.isTesting` was unconditionally forced to `false` in `__DEV__` on JS side.

On some platforms, we may want to run tests in the release mode.

This hoists these gatings down to the corresponding platforms' native modules.

Reviewed By: ryancat

Differential Revision: D47438069

fbshipit-source-id: 5bae3df9873f659f65179df93e727108d0062047
2023-07-13 18:15:37 -07:00
szymonrybczak d9c8cd3b40 Bump Flipper to 0.201.0 (#38260)
Summary:
Bumped Flipper version from `0.182.0` to `0.201.0` (which is currently latest version). New version contain NDK 25, which is necessarily for us since we would like to bump NDK in React Native to 25, see [here](https://github.com/facebook/react-native/pull/37974) for more context.

## Changelog:

[General] [Changed] - Bump Flipper to 0.204.0

Pull Request resolved: https://github.com/facebook/react-native/pull/38260

Test Plan: CI Green 

Reviewed By: NickGerleman, mdvacca

Differential Revision: D47373525

Pulled By: cortinico

fbshipit-source-id: d1d5f03cb2f00bc8b9064af986b7c3b6e7ccae3c
2023-07-13 17:57:23 -07:00
Nick Gerleman a41c086e00 Move Default Prop Helpers to VirtualizedListProps.js (#38329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38329

Some quick cleanup

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D46659045

fbshipit-source-id: c57315fe7294af012c3db42e40533c49295e31bd
2023-07-13 17:28:40 -07:00
Ramanpreet Nara 9af8bab884 Interop: Introduce bridge proxy log levels (#38319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38319

The TurboModule interop layer's bridge proxy emits logs.

These logs aren't very actionable (yet). (We will make them more useful eventually).

So, this diff adds bridge proxy log-levels (backed by a server-side flag).

Longer term, **all of** React Native's backwards compatibility layers will output logs (not just the bridge proxy). So, we might replace this specific control with something more general.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D47407548

fbshipit-source-id: 2bd79d2a8d52a46d25852a6a23f9cebea0580f9c
2023-07-13 16:33:08 -07:00
Intl Scheduler 4d07767a6c translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907918153563
Sandcastle Job Instance ID: 9007200246096241
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47456032

fbshipit-source-id: 00af62092f329c3d7272a1b2cf2ce231cf8b192c
2023-07-13 16:22:04 -07:00
Neil Dhar c5236e97e6 Make Runtime a friend of all pointer types (#38302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38302

X-link: https://github.com/facebook/hermes/pull/1052

Make Runtime a friend of these types so we can use `Runtime::make` with
all of them. Simplify the Hermes API code to do this.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D47373807

fbshipit-source-id: c9530b6c159592e36bb0929badba0542f0c7db78
2023-07-13 14:09:24 -07:00
Samuel Susla ec1e2afd08 Rename helper function to avoid confusion with React hook (#38340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38340

changelog: [internal]

Reviewed By: yungsters

Differential Revision: D47437149

fbshipit-source-id: 32a9c4effa1a2ea2207d5cb85f0ffd7878110d11
2023-07-13 12:29:21 -07:00
Fabrizio Cucci fcfaf8c53f Align jsdoc to external doc for id prop of View (#38334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38334

Changelog: [Internal] - Align jsdoc to external doc for `id` prop of `View`

Reviewed By: sammy-SC

Differential Revision: D47433958

fbshipit-source-id: b9078ffd031706f674c4489300ec5a7974f2f276
2023-07-13 08:19:16 -07:00
Intl Scheduler de520c9a33 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907917797885
Sandcastle Job Instance ID: 9007200245699021
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47436690

fbshipit-source-id: bf02e09643c094a4a367899d173c7cbb88283f3b
2023-07-13 06:13:41 -07:00
Intl Scheduler 0ba1ec39a2 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907917521348
Sandcastle Job Instance ID: 31525198384197112
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47426218

fbshipit-source-id: 74a396047a2cec0a4bf17c5fdca72f20a1e83977
2023-07-12 20:24:57 -07:00
Vincent Riemer 6172988f45 Add dispatchEvent API to EventEmitter that accepts an EventPayload directly (and use it for Pointer Events) (#38301)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38301

Changelog: [Internal] - Add dispatchEvent API to EventEmitter that accepts an EventPayload directly

This diff adds a deeper overload of dispatchEvent to EventEmitter which accepts a caller-provided EventPayload subclass, and modifies TouchEventEmitter's dispatchPointerEvent method to use it so that the typed PointerEvent is actually sent through the event pipeline.

Reviewed By: NickGerleman

Differential Revision: D47351851

fbshipit-source-id: a6fdabbfc9b8287c564252f5cc7296fa75044a1e
2023-07-12 13:22:57 -07:00
Samuel Susla c3f07d85a9 Add option to enable setNativeProps in Fabric for animated components (#38317)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38317

changelog: [internal]

Reviewed By: javache

Differential Revision: D47402598

fbshipit-source-id: cb780bde309d968c71677f9717b55485ae72540f
2023-07-12 13:22:20 -07:00
Ramanpreet Nara fb64a5ff75 Interop: Implement RCTBridgeProxy registerSegmentWithId (#38299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38299

Bridgeless mode replaces RCTCxxBridge registerSegmentWithId with RCTHost registerSegmentWithId.

This diff implements RCTBridgeProxy registerSegmentWithId.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D47349027

fbshipit-source-id: b87c395f65ebc8db23ca8e614341227d96435ece
2023-07-12 12:12:39 -07:00
Samuel Susla 55628acbdc Remove debug only code (#38128)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38128

changelog: [internal]

This is debug code that should not have been committed. It is harmless but still should be removed.

Reviewed By: NickGerleman

Differential Revision: D47127817

fbshipit-source-id: 6a13cbf0bf678ef5b7c5e8148e28ce78fba7d6de
2023-07-12 10:13:19 -07:00
Nick Gerleman 777907ca1f C++ 17 style nested namespaces (#38304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38304

X-link: https://github.com/facebook/yoga/pull/1326

For better readability

Reviewed By: christophpurrer

Differential Revision: D47384926

fbshipit-source-id: 2f60d50a185331b3624d45d1fc45f98d504b3034
2023-07-12 09:38:40 -07:00
Nick Gerleman 6d6fb09c5e Target C++ 17 (#38303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38303

X-link: https://github.com/facebook/yoga/pull/1327

This bumps Yoga to C++ 17 for a few reasons:
1. New versions of C++ may introduce behavior changes (e.g. evaluation order) and deprecations. Keeping the version closer to the version of large users helps avoid that.
2. C++ 17 unblocks some new bits I have wanted to use at times, like `std::optional`, `std::variant`, `if constexpr`, `[[nodiscard]]`.
3. There are already changes in C++ 20 that would be directly useful to Yoga, like `std::bit_cast` to avoid `memcpy` style type punning.

There has been some contention around C++ versions before, but by the time the next stable version of Yoga is out, it will have been more than 6 years (~2 C++ versions) since a stable version of Clang/LLVM with C++ 17 support. I would not like to go back further than n-2.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D47383922

fbshipit-source-id: eb95d4853f2168b68d6df5fddb797236eac55870
2023-07-12 09:38:40 -07:00
Sunbreak faa85f84ce set NDEBUG properly (#38314)
Summary:
`CMAKE_BUILD_TYPE` is `RelWithDebInfo` while `./gradlew :package:react-native:ReactAndroid:bundleReleaseAar`

## Changelog:

[ANDROID] [FIXED] - Fix `CMAKE_BUILD_TYPE` match condition from https://github.com/facebook/react-native/issues/36172

Pull Request resolved: https://github.com/facebook/react-native/pull/38314

Test Plan:
### Release (does contain two `-DNDEBUG`)

```
build ReactCommon/react/renderer/components/view/CMakeFiles/rrc_view.dir/YogaLayoutableShadowNode.cpp.o: CXX_COMPILER__rrc_view_RelWithDebInfo /Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp || cmake_object_order_depends_target_rrc_view
  DEFINES = -Drrc_view_EXPORTS
  DEP_FILE = ReactCommon/react/renderer/components/view/CMakeFiles/rrc_view.dir/YogaLayoutableShadowNode.cpp.o.d
  FLAGS = -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -O2 -g -DNDEBUG -fPIC -Wall -Werror -std=c++17 -fexceptions -frtti -Wpedantic -Wno-gnu-zero-variadic-macro-arguments -DLOG_TAG=\"Fabric\" -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -DNDEBUG
  INCLUDES = -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactCommon -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/build/third-party-ndk/folly/. -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/build/third-party-ndk/glog/exported -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/build/third-party-ndk/double-conversion/. -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/build/third-party-ndk/boost/boost_1_76_0 -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/build/third-party-ndk/fmt/include -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/src/main/jni/first-party/fbgloginit/. -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactCommon/jsi -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactCommon/logger/. -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactCommon/react/renderer/graphics/platform/android -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/src/main/jni/first-party/fb/include -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/src/main/jni/first-party/yogajni/jni -I/Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactCommon/yoga/yoga/.. -isystem /Users/sunbreak/.gradle/caches/transforms-3/a52d8ada161ee9f7b900e2f4d7543a45/transformed/fbjni-0.4.0/prefab/modules/fbjni/include
  OBJECT_DIR = ReactCommon/react/renderer/components/view/CMakeFiles/rrc_view.dir
  OBJECT_FILE_DIR = ReactCommon/react/renderer/components/view/CMakeFiles/rrc_view.dir
  TARGET_COMPILE_PDB = ReactCommon/react/renderer/components/view/CMakeFiles/rrc_view.dir/
  TARGET_PDB = /Volumes/sunbreak-WD/w/Sunbreak/react-native@Sunbreak/packages/react-native/ReactAndroid/build/intermediates/cxx/RelWithDebInfo/394f413f/obj/arm64-v8a/librrc_view.pdb
```

Reviewed By: sammy-SC

Differential Revision: D47399115

Pulled By: cortinico

fbshipit-source-id: 8fc7c32f61d1085e6f357beef91726899e0ed6cf
2023-07-12 06:58:41 -07:00
Matt Oakes 72abed2c96 Fix window.requestIdleCallback not firing on iOS (#29895)
Summary:
Fixes https://github.com/facebook/react-native/issues/28602

When creating a `RCTFrameUpdate`, ensure it is created with the correct unix timestamp in seconds. This is needed to match the `NSTimeInterval` type defined in the header.

Previously, it was using the `CADisplayLink`'s `timestamp` property, which is not an `NSTimeInterval` but is instead a `CFTimeInterval` (note the different class prefix). This is the host time converted to seconds, which is the number of seconds since the device was turned on and therefore not a unix timestamp as expected.

This was causing issues with the `window.requestIdleCallback` timers as the timer code was expecting this `timestamp` property to be a unix timestamp in seconds which was causing the calculations to be done incorrectly and for the callbacks to never be called. The code does this calculation is here:

https://github.com/facebook/react-native/blob/4d920fe7c991eaec61d229a71df30b0f6c446d38/React/CoreModules/RCTTiming.mm#L262

As one of these is a valid unix timestamp and the other is a much smaller number (number of seconds since device turn on), the `if` statement following this calculation never passes and the callbacks are never called.

This regression seems to have been introduced with this pull request: https://github.com/facebook/react-native/pull/26114

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Fixed] - Fixed window.requestIdleCallback not firing on iOS

Pull Request resolved: https://github.com/facebook/react-native/pull/29895

Test Plan: I have tested this by patching my React Native code and testing that idle callbacks are correctly called. There is a reproduction case of the issue in the linked issue.

Reviewed By: NickGerleman

Differential Revision: D47381404

Pulled By: sammy-SC

fbshipit-source-id: fd166741889b0084e1def8dedf6e4018adfd570f
2023-07-12 04:27:06 -07:00
Intl Scheduler 13a160eab6 translation auto-update for i18n/fb4a.config.json on master
Summary:
Chronos Job Instance ID: 1125907916994239
Sandcastle Job Instance ID: 22517999126744070
allow-large-files
ignore-conflict-markers
opt-out-review

Differential Revision: D47391350

fbshipit-source-id: d063242b0a1102782df6ba3b465692073649b21e
2023-07-11 23:55:17 -07:00
Vincent Riemer 9ab27e8895 Make PointerEvent a subclass of EventPayload (#38279)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38279

Changelog: [Internal] - Make PointerEvent a subclass of EventPayload

This is another refactor diff in preparation of intercepting events in UIManagerBinding to accomplish the Pointer Capture APIs (and more) by making the PointerEvent struct implement EventPayload. Now that this struct will be passed to the event pipeline itself we'll be able to determine in UIManagerBinding that the event is a PointerEvent by dynamic casting and access the event's properties without converting to/from JSI values.

Reviewed By: NickGerleman, sammy-SC

Differential Revision: D47300801

fbshipit-source-id: 4d80378803af0c31dca068ef2b99e34fab426d84
2023-07-11 16:41:04 -07:00
Vincent Riemer ffc68ffa7e Refactor event pipeline to accept typed event payloads (#38276)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38276

Changelog: [Internal] Refactor Fabric event pipeline to accept typed event payloads

As a first step towards my project of managing the Pointer Capture API by intercepting events in UIManagerBinding I need infrastructure to be able to safely & efficently read the properties of the event payload which is what this diff lays the ground work of addressing.

Currently the events are passed from the EventEmitter all the way to UIManagerBinding with only a ValueFactory (std::function lambda) which is called to produce the jsi::Value. My diff introduces a new virtual base class, EventPayload, which provides the same functionality but in a member function, asJSIValue. To ease the transition to this new paradigm I also introduce the first concrete subclass of EventPayload: ValueFactoryEventPayload — which simply stores and calls a ValueFactory so that we can incrementally migrate to typed events (or frankly, continue to be used for events that we don't *need* to be typed, as the only real use-case in the beginning will be for Pointer Events).

This diff notably does not change any behavior and should behave the exact same way it did before — it is in later diffs where I will begin applying this to the pointer events.

Reviewed By: NickGerleman

Differential Revision: D47299631

fbshipit-source-id: d31d95a5fe09c3404800dd0da0322b198948a851
2023-07-11 16:41:04 -07:00
Christoph Purrer 856931b11b rn-tester > Use code-generated Turbo Module name constants (#38297)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38297

Continuation of https://github.com/facebook/react-native/pull/38295

Changelog:
[Internal] [Changed] - Use code-generated Turbo Module name constants

Reviewed By: shwanton

Differential Revision: D47376344

fbshipit-source-id: 62bd63b83d2aa47ef05ee7073e8c20bfdf192e44
2023-07-11 15:33:48 -07:00
Roy Berger f396067cca Add module name constant to class for downstream use (#38295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38295

Move constant to class instance so customers can use strongly typed name, feedback from D46159001

Changelog:
[Internal] [Changed] - Add module name constant to codegen'd class for downstream use

Reviewed By: christophpurrer

Differential Revision: D47095993

fbshipit-source-id: 741d0d837bf912d6b32e5f12c5df871563d46686
2023-07-11 13:03:17 -07:00
Nicola Corti 8e9062849e Re-alings soloader version to 0.10.5 (#38289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38289

I'm just making sure all the dependencies use the same version fo SoLoader that React Native is using: 0.10.5
See https://github.com/facebook/react-native/blob/50f620a1ad8e925a46d2aa8e6439d5ce6f4f2ce4/packages/react-native/ReactAndroid/gradle.properties#L22

Changelog:
[Internal] [Changed] - Re-alings soloader version to 0.10.5

Reviewed By: javache, mdvacca

Differential Revision: D47331908

fbshipit-source-id: e4a5a11669193763371048343cd2f8283e9124e0
2023-07-11 12:25:57 -07:00
Ramanpreet Nara 99e332e5b2 Introduce jest-e2e test for TurboModule Interop (#38206)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38206

This test will ensure that the TurboModule interop layer works in Catalyst.

It will navigate to the sample legacy module screen, and ensure that all methods work.

Steps:
1. Open up Catalyst
2. Navigate to the Legacy Native Module example
3. Click "Run all tests"
4. Validate that all tests match expectations.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D46917689

fbshipit-source-id: 071f9324fa3719648c1a390bde4ba00a4e687e44
2023-07-11 11:42:43 -07:00
zerosrat 5ba8de05b5 fix(ios): set top of perf monitor to statusbar height (#38262)
Summary:
Update RCTPerfMonitor.mm

Change the top offset of perf monitor component. As it is overlapped by dynamic island of iPhone 14 Pro series.

Before:
<img width="437" alt="image" src="https://github.com/facebook/react-native/assets/8179987/3c993c1b-6370-4cee-b5b1-e50e3f191dac">

After:
<img width="437" alt="image" src="https://github.com/facebook/react-native/assets/8179987/8be83e73-36e7-4075-9b74-64829b242020">

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[iOS] [Fixed] - Change the top of perf monitor component.

Pull Request resolved: https://github.com/facebook/react-native/pull/38262

Test Plan: noop

Reviewed By: javache

Differential Revision: D47325450

Pulled By: NickGerleman

fbshipit-source-id: 6108db752945712e6cb770f5dd49e71df87d3f52
2023-07-11 10:33:51 -07:00
Pieter De Baets 6c10b0143e Fix implementation of Element#reference (#38288)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38288

This wasn't compiling since we need to cast to the (unshared) base component type.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D47362923

fbshipit-source-id: 2116c16eb90ee9efbd9d0ec45655220c0f7fed9c
2023-07-11 06:51:12 -07:00
Nicola Corti 823839bcc1 Fresco to 3.0.0 (#38275)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38275

This bumps the version of Fresco to the latest major.
I add to add a couple of changes:
1. Some of the infra has been moved to a different package called `middleware` which I had to add
2. Flipper Fresco plugin has changed ownership, so I had to use the new coordinates.

Changelog:
[Android] [Changed] - Fresco to 3.0.0

Reviewed By: mdvacca

Differential Revision: D47337443

fbshipit-source-id: 1df78e624bcbf0200145fbee5780e2a1697fcb16
2023-07-11 04:04:10 -07:00