Commit Graph

4437 Commits

Author SHA1 Message Date
Joshua Gross e26c280782 Remove enableFabricStartSurfaceWithLayoutMetrics feature flag
Summary:
Remove `enableFabricStartSurfaceWithLayoutMetrics` and treat as `true` always from now on.

Changelog: [Internal]

Differential Revision: D23633198

fbshipit-source-id: 5b7455b87e578ffa97d80746fa901cd2b50d3ea9
2020-09-10 18:16:32 -07:00
Ramanpreet Nara 8a8c15f9fa Remove log when TurboModule cannot be created
Summary:
This log was necessary to get to the bottom of the TurboModule Fb4a eager init crash. It's no longer necessary, plus it's okay for TurboModules to be null, so we'll remove it for now.

Changelog: [Internal]

Differential Revision: D23607208

fbshipit-source-id: 083b00abe6bdefc5986f842cd6f9438f47cce1ce
2020-09-09 16:03:16 -07:00
Emily Janzer f1a8278187 Prevent scrolling with TalkBack if scrolling is disabled in JS
Summary:
Right now you can scroll a horizontal ScrollView with TalkBack even if you've disabled scrolling in JS, because our HorizontalScrollView component doesn't prevent the accessibility scroll event (this doesn't seem to happen with vertical ScrollViews for some reason...) This diff adds an accessibility delegate to both of the Android ScrollView components to make sure they're not scrollable if scrolling has been disabled in JS.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D23582689

fbshipit-source-id: b670bdb462ab9c963c7125597d60ca97c7d88a9c
2020-09-09 13:28:07 -07:00
Emily Janzer f0e80ae229 Set selection to end of text input on accessibility click
Summary:
When we render a text input that already has a text value (<TextInput value="123" />), its selection (cursor) is automatically set to the end of the text. However, when you swipe to focus the text input with TalkBack, Android decides it needs to clear the selection, which moves the cursor back to the beginning of the text input. This is probably not what you want if you're editing some text that's already there. Ideally we would just keep the selection at the end, but I don't know how to prevent this from happening - it seems to be part of how TextView handles the accessibility focus event? So instead I'm just explicitly setting the selection to the end of the text in our handler for accessibility click.

Changelog: [Android][Fixed] Move selection to the end of the text input on accessibility click

Reviewed By: mdvacca

Differential Revision: D23441077

fbshipit-source-id: 16964f5b106637e55a98c6b0ef0f0041e8e6215d
2020-09-02 16:17:02 -07:00
Dulmandakh 7465239230 bump SoLoader to 0.9.0 (#29821)
Summary:
SoLoader fixed crash on Android 4.1, and includes many improvements and fixes https://github.com/facebook/SoLoader/releases/tag/v0.9.0. Also Fresco 2.3.0 depends on it, and will create a PR soon to bump Fresco.

## Changelog

[Android] [Changed] - Bump SoLoader to 0.9.0

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

Test Plan: CI is green

Reviewed By: fkgozali

Differential Revision: D23477538

Pulled By: mdvacca

fbshipit-source-id: d2d982d5c5c84fc173dc66dfe069713ca90711a8
2020-09-02 11:38:26 -07:00
Lulu Wu b5b4a70410 Set caretHidden to true to fix the Xiaomi crash
Summary:
After monitoring scuba for a few days,  previous fixes(D23301714 D23331828 (https://github.com/facebook/react-native/commit/07a597ad185c8c31ac38bdd4d022b0b880d02859)) don't work as expected.

I managed to test this issue on a Xiaomi device, the crash didn't happen but the there was a popup "Frequetly used email" on top of email edit text:

{F317216473}

Getting rid of the popup probably be the right fix.

For more context see https://github.com/facebook/react-native/issues/27204

Changelog: [Android] - Set caretHidden to true to fix the Xiaomi crash

Reviewed By: mdvacca

Differential Revision: D23451929

fbshipit-source-id: 521931422f3a46a056a9faa4b10fe93cf4732db0
2020-09-02 05:28:49 -07:00
Lulu Wu 59ddd7cd4b Add memory pressure listener in ReactHost
Summary:
Add memory pressure listener for ReactHost and ReactInstance

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D23214241

fbshipit-source-id: ec8476aeda8d9781d918ea41e5cab69fa862996e
2020-09-02 03:00:57 -07:00
David Vacca 7d6d5daa2b Refactor caching of Spannable objects instide TextLayoutManager
Summary:
This diff optimizes the caching of Spannable objects managed by the TextLayoutManager class.
Previously, these objects were cached using unsing a String representation of the RedableMap (creating this string adds a non trivial cost), this diff improves the caching performance relying on the equals / hashcode methods of the ReadableNativeMap class

I created a MC just to have a killswitch

Motivation: I was analysing another bug and I found this non performant code

changelog: [internal] internal

Reviewed By: shergin

Differential Revision: D23429365

fbshipit-source-id: 59e5ad0b1b95da992ac393aecfe029da68a8df97
2020-09-01 17:09:27 -07:00
Ian Childs 05abbd245c Declare all attrs used in res targets (#29794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/29794

Per title - need to declare deps of attrs that we are using (soon Buck will enforce this).

Changelog: declare dependencies of all attributes that are used in the resource target.

Reviewed By: jiawei-lyu

Differential Revision: D23388058

fbshipit-source-id: b395d153188f75f8c0d4a6d69302812a56b23925
2020-08-31 11:36:33 -07:00
Valentin Shergin 6d3dcc72c5 Fabric: Using include instead of import in non-Objective-C file
Summary:
`#import` is non-standard C++ extension which is AFAIK part of Objective-C. I am surprised that it even compiles on Android.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23407689

fbshipit-source-id: 2861138cbcce33674e118a1ad816e33bbf8f30fe
2020-08-30 22:26:38 -07:00
David Vacca fe79abb32c Introduce TransparentImmersiveReactActivity in FB4A
Summary:
This diff creates the new TransparentImmersiveReactActivity in FB4A, the intention is to help integrate TransparentReactActivity with Fb4A

Changelog: [Deprecated][Android] Deprecated method UIManagerModule.getUIImplementation. This method will not be part of the new architecture of React Native.

Reviewed By: stashuk

Differential Revision: D23324543

fbshipit-source-id: 35395fe410790a9611a4637361b888678eb0a836
2020-08-28 17:01:07 -07:00
Hamid 0f6fcb2c27 okhttp version 3.12.12 (#29741)
Summary:
This updates okhttp to the newest compatible version with a couple of fixes and improvements. See https://github.com/square/okhttp/commits/okhttp_3.12.x

## Changelog

[Android] [Changed] - Update Okhttp to version 3.12.12

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

Test Plan: Current tests should pass.

Reviewed By: shergin

Differential Revision: D23406613

Pulled By: mdvacca

fbshipit-source-id: b0b4ec52a6a8345f1c36e18e384761386096f1d8
2020-08-28 16:58:09 -07:00
Shoaib Meenai f19372361f Fix secure text entry setting
Summary:
We have password components which allow visibility to be toggled by
setting both the keyboardType and secureTextEntry props. The order in
which those updates are executed is determined by iterating a NativeMap
of props, and the iteration order of a NativeMap is implementation
dependent.

With libc++ as our STL, we observe that setSecureTextEntry is called
before setKeyboardType. This results in the following sequence of input
type flag settings when toggling the component to visible and then back
to hidden:

* The field starts out with TYPE_TEXT_VARIATION_PASSWORD (0x80).
* When we toggle to visible, setSecureTextEntry is called with password
  being false, which clears TYPE_TEXT_VARIATION_PASSWORD.
  setKeyboardType is then called with the visible-password keyboard
  type, which sets TYPE_TEXT_VARIATION_VISIBLE_PASSWORD (0x90).
* When we toggle back to hidden, setSecureTextEntry is called with
  password being true, which sets TYPE_TEXT_VARIATION_PASSWORD but
  doesn't clear TYPE_TEXT_VARIATION_VISIBLE_PASSWORD. setKeyboardType is
  then called with the default keyboard type and additionally sets
  TYPE_CLASS_TEXT, but TYPE_TEXT_VARIATION_VISIBLE_PASSWORD remains and
  the password field remains visible.

The fix is to clear TYPE_TEXT_VARIATION_VISIBLE_PASSWORD when
setSecureTextEntry is called with password being true, to ensure the
password gets hidden.

Changelog:
[Android][Fixed] - Fix secure text entry setting to always hide text

Reviewed By: shergin

Differential Revision: D23399174

fbshipit-source-id: a81deec702e768672e2103b76ab50ec728dac229
2020-08-28 16:13:21 -07:00
Lulu Wu 07a597ad18 Fix Xiaomi TextInput crash in native
Summary:
Long term fix in native for Error: android_crash:java.lang.NullPointerException:android.widget.Editor$SelectionModifierCursorController.access$300

For more detail please see T68183343 D23301714

Changelog:
[Android][Changed] - Fix Xiaomi TextInput crash in native

Reviewed By: mdvacca

Differential Revision: D23331828

fbshipit-source-id: 914f2d431772f49711b940d47a2b3ef57ab82cdc
2020-08-28 01:44:37 -07:00
Joshua Gross e60564215d ReactModalHostView: Prevent infinite SetState/UpdateState loop
Summary:
Make sure to check incoming state values before calling SetState, or we call back and forth forever.

Changelog: [internal]

Reviewed By: mdvacca

Differential Revision: D23389355

fbshipit-source-id: 9cf6110cf654fe93f555a6fbfd9b20f112214e0a
2020-08-27 20:00:02 -07:00
Joshua Gross ab8b77c3d2 Don't allow removeDelete collation experiment if LayoutAnimations is enabled
Summary:
See title.

This feature makes LayoutAnimations less stable and isn't needed generally; will be deleted soon.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23382973

fbshipit-source-id: f633f482d463b3ee3e4625b30544a33cd6e36119
2020-08-27 19:37:06 -07:00
Joshua Gross e3711407a1 Noop when removing views from empty parent
Summary:
In some cases (BottomSheet?) the parent/ViewManager removes all children of the View before Fabric gets a chance to remove the children.

Apparently prior to D23368229 (https://github.com/facebook/react-native/commit/d344fb4e29a827d1e7d233672a3efe3b2b981a8a) (landed just today!) this sequence of operations happened and just noop'ed. Since we've been doing that happily as long as Fabric
has existed, we'll keep doing that for now.

I suspect that on *some* versions of Android this crashes and others it doesn't, based on logviews and my inability to repro certain crashes.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23387044

fbshipit-source-id: 88a46191adef4f6816bd7babd9103d103ddcef33
2020-08-27 19:37:06 -07:00
Joshua Gross d344fb4e29 When logging errors with deleteView, try to find actual index of view
Summary:
If we try to delete a view and find the wrong one, when we crash, try to log the *actual* index of the view in question.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23368229

fbshipit-source-id: 7f9835fd07cfe4924d05c7e37b42b9bcdffff4a9
2020-08-27 14:00:09 -07:00
Valentin Shergin cb48b50290 Fabric: Storing commit revision number in MountingTelemetry
Summary:
Now we store a revision number of a Shadow Tree that leads to a transaction for which the concrete instance of MountingTelemetry corresponds. This is useful to understand how many actual transactions were skipped during a mounting phase (a mounting transaction does not directly correspond to a commit operation).

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D23364663

fbshipit-source-id: 32b86bcdfc1ae97d8fff3b97a8615cc5a5b4d4a9
2020-08-27 12:33:58 -07:00
Joshua Gross 0fb7f5a6f5 NativeAnimatedModule in Fabric no longer crashes if all Animated nodes are not visited
Summary:
Previously this was crashing only in debug, but that's too noisy and isn't giving us any value for now.

Changelog: [Internal]

Differential Revision: D23338800

fbshipit-source-id: bf1535cdda231ccf30af6d00509eec1499a552a1
2020-08-27 01:32:08 -07:00
Joshua Gross 5e04e932a8 Give MountingManager debug log a little more context
Summary:
see title

Changelog: [internal]

Differential Revision: D23338751

fbshipit-source-id: 0ad9d4f4a415aaab762572a11044f359d60c2de7
2020-08-27 01:32:08 -07:00
Joshua Gross 792f6f69c9 New StopSurface deleteView mechanism
Summary:
Simplifying the StopSurface flow. Before we would still attempt to execute MountItems, but only the "Delete" operations. This was... well, frankly, overcomplicated. Instead we can just ignore all future MountInstructions for that Surface and delete all views recursively from the root.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23338752

fbshipit-source-id: 6e7ab29ad85572782bfc6a39845a8a619f001559
2020-08-27 01:32:08 -07:00
Eloy Durán 941bc0ec19 Upstream RN macOS Hermes integration bits (#29748)
Summary:
Microsoft’s RN for macOS fork supports the Hermes engine nowadays https://github.com/microsoft/react-native-macos/pull/473. As a longer term work item, we’ve started moving bits that are not invasive for iOS but _are_ a maintenance burden on us—mostly when merging—upstream. Seeing as this one is a recent addition, it seemed like a good candidate to start with.

As to the actual changes, these include:

* Sharing Android’s Hermes executor with the objc side of the codebase.
* Adding a CocoaPods subspec to build the Hermes inspector source and its dependencies (`Folly/Futures`, `libevent`).
* Adding the bits to the Xcode build phase script that creates the JS bundle for release builds to compile Hermes bytecode and source-maps…
* …coincidentally it turns out that the Xcode build phase script did _not_ by default output source-maps for iOS, which is now fixed too.

All of the Hermes bits are automatically enabled, on macOS, when providing the `hermes-engine-darwin` [npm package](https://www.npmjs.com/package/hermes-engine-darwin) and enabling the Hermes pods.

## Changelog

[General] [Added] - Upstream RN macOS Hermes integration bits

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

Test Plan:
Building RNTester for iOS and Android still works as before.

To test the actual changes themselves, you’ll have to use the macOS target in RNTester in the macOS fork, or create a new application from `master`:

<img width="812" alt="Screenshot 2020-08-18 at 16 55 06" src="https://user-images.githubusercontent.com/2320/90547606-160f6480-e18c-11ea-9a98-edbbaa755800.png">

Reviewed By: TheSavior

Differential Revision: D23304618

Pulled By: fkgozali

fbshipit-source-id: 4ef0e0f60d909f3c59f9cfc87c667189df656a3b
2020-08-27 01:18:33 -07:00
Ramanpreet Nara 5ffabca054 Update NativeModule Specs
Summary:
For some reason, these got out of sync again.

This diff modifies the Java Codegen to sort all the methods.
build-break
overriding_review_checks_triggers_an_audit_and_retroactive_review

Differential Revision:
D23363410

Oncall Short Name: fbandroid_sheriff
Ninja: master broken

fbshipit-source-id: 257d85f92017528e64ced31bc7be011acb333186
2020-08-26 18:02:43 -07:00
Betty Ni 287cf070cb Unbreak the build
Summary:
build-break
overriding_review_checks_triggers_an_audit_and_retroactive_review
Oncall Short Name: fbandroid_sheriff

Differential Revision: D23325277

fbshipit-source-id: 20e4fb649ce8a0c8640a5ff1c5eb0ff310a4cc22
2020-08-25 12:23:17 -07:00
Joshua Gross 1afd9f0e31 UpdateState MountItems should *always* update ViewManagers
Summary:
I'm removing an ill-informed "optimization" that resulted in some StateUpdates being dropped. For some components (including TextInput) we rely on State updates to request a layout from the ShadowNode layer.

In the past we were performing an optimization that didn't update the View layer if the data contained in the State container is identical, but in the case of TextInput and other components, we simply pass an opaque
object with no meaningful data to trigger the layouts. In those cases, it could cause a permanent rift between the View layer's StateWrapper and the most recent state object from the C++ perspective.

In the case of TextInput this didn't cause tangible bugs because you can always update state using an out-of-date State object, but it's better this way anyway.

The other issue is that for some components, we want to know when there's a State update from the Cxx layer. This optimization broke certain logic in those components.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23306222

fbshipit-source-id: 8ef83149b814de50776674b5fd22406be1db14ba
2020-08-24 19:39:56 -07:00
Joshua Gross 92091b8b31 New Flattening Differ
Summary:
# What is this?

For a very long time, we've discussed the possibility of detecting Node Reparenting in the Fabric Differ. Practically, from the developer perspective, ReactJS and React Native do not allow reparenting: nodes cannot be reparented, only deleted and then recreated with entirely new tags.

However, Fabric introduced the idea of View Flattening where views deemed unnecessary would be removed from the View hierarchy entirely. This is great and improves memory usage, except for one issue: if a View becomes unflattened, or becomes flattened, the entire tree underneath it must be rebuilt.

In a past diff we introduced a mechanism to detect sibling reordering cleverly, and produce a minimal instruction set. This diff is very similar: we know the invariants around flattening and unflattening of views and we take advantage of them to produce an optimal set of instructions efficiently.

# What's different from previous attempts?

No global maps! Those are slow!

This seems to work and (hopefully) might even improve performance, since way less work is being done on the UI thread in cases when views are (un)flattened.

This *only* does extra work when flattening/unflattening happens, which gives product engineers a little more control over perf.

# So, how's it work?

This algorithm is intuitively simple (I think) but tricky to pull off, because there are lots of edge-cases.

In short: In the past, that information was hidden from the Differ: the differ didn't know if views were being reparented, it would see them
as entirely new views or as views being deleted if a View was flattened or unflattened. We very subtly change the information given to the differ:
all nodes are visible to the differ, but marked as Flattened or Unflattened. Thus, when the differ compares two nodes in the "old" and "new" tree,
it can tell not just if there are updates to the node but if it has been unflattened or flattened as well.

For example, take this tree, where * indicates that a View is flattened:

```
         A
         +
    +----+---+
    B*       X
    +        +
    |        |
+---+--+     +
E      F     Y
```

When the Differ asks for the children of A, in the past it would get a list `[E, F, X]`. That is, B* and X are both its children, but since B is flattened, it is omitted entirely from the list and
its children are substituted.

Now, when the Differ asks for the children of A, we give it this list instead: `[B*, E, F, X]`. That is: we give it a list which includes B, but B is marked as flattened.

Another wrinkle: A node `X` could have its children flattened, but still be a concrete view: so flattening/unflattening is a different operation from making a view "concrete" or "unconcrete", which can change independently of flattening.

There is one additional wrinkle: because of zIndex/stacking order, the children of `B` might not actually appear after `B` in the list. Depending on zIndex, a tree that looks like this:

```
          A
          +
   +------+------+
   B*            C*
   +             +
   |             |
+--+--+       +--+--+
D     E       F     G
```

Could actually be linearized as: `[D G B* F C* E]` (as an extreme example; but basically all permutations as possible).

This is the reason, and the *only* reason that the inner Flattener/Unflattener

## The cases we need to handle

There are 7 cases/edge-cases of flattening and unflattening that we need to handle. Practically, all cases of reordering + flattening/unflattening, and taking recursive cases into account:

1. View A and A' (A in the old tree, A' in the new tree) are matched in the differ, and A* has been flattened or unflattened. These two cases are the easiest to handle.
2. View A' has been reordered with its siblings, and has been flattened or unflattened. These cases are slightly trickier to handle.
3. While flattening or unflattening, we encounter a child that has also been unflattened or flattened. So we need to handle four cases here in total: Flatten-Flatten, Flatten-Unflatten, Unflatten-Flatten, and Unflatten-Unflatten.

Other things to think about, also covered above:

1. Ordering. Views can be reordered and flattened/unflattened at the same time.
2. zIndex ordering: children in a certain order from the ShadowNode perspective may be stacked differently from a View perspective. We use the zIndex ordering for everything in the differ, and this prevents us from performing certain optimizations (see above: we cannot assume that children come after their parent in a list; they may come before, may be interwoven with children from other parents, etc).

# Perf Implications?

Practically, there should be very little negative overhead. There is some overhead in actually performing a flattening/unflattening operation, but... not much more than before. We don't use global maps, so the cost of flattening/unflattening is basically `O(number of nodes reparented)` - note that that's direct nodes reparented, *not* descendants.

tl;dr the perf hit should be similar to reordering, which is non-zero, but close to zero, and zero-cost for any diff operations on parts of the tree that don't involve flattening/unflattening. AFAICT this is very close to an ideal solution for that reason (but I wish it was simpler overall).

# In Summary?

I hope this works out and I think it could improve a number of things downstream: perf, LayoutAnimations, Bindings, certain crashes because of platform assumptions about mutations, etc.

Is it worth it? This new implementation is substantially harder to reason about, harder to read, and harder to understand. This is an important consideration. All I can say there is that I trust the test suite I've been using, but
the decreased readability is a big negative. Hopefully we can improve this in the future.

The rest is fiddly implementation details that I sincerely hope can be improved and simplified in the future.

# Followups?

The part that makes this algorithm the most expensive is that because of zIndex ordering, we cannot assume that children are linearized after their parents and so we rely more heavily on maps for the flattening/unflattening. Our TinyMap implementation should make these `find` operations fast enough unless trees' children are constantly being reordered, but it's still worth thinking of ways to make this even faster.

Changelog: [Internal]

Reviewed By: shergin, mdvacca

Differential Revision: D23259341

fbshipit-source-id: 35d9b90caf262d601a31996ea2cb37e329c61ffc
2020-08-24 13:09:12 -07:00
Joshua Gross d602c51996 Simplify TextInput measurements
Summary:
Simplify the TextInput measurement mechanism.

Now, data only flows from JS->C++->Java and from Java->JS. C++ passes along AttributedStrings from JS if JS updates, and otherwise Java maintains the only source of truth.

Previously we tried to keep all three in sync. This was complicated, slow, and even lead to some crashes.

This feels a bit hacky but I believe it's the simplest way to achieve this short-term. Ideally, we would use something like `AttributedStringBox` and pass that to State from Java,
but currently everything passed through the State system from Java must be serializable as `folly::dynamic`. So, instead, we just cache one Spannable per TextInput component and
use ReactTag as the cache identifier for lookup.

An interesting side-effect is that `measure` could race with TextInput updates, but the race condition favors measuring the latest text, not outdated values.

Followups:

- Can we do this without copying the EditText Spannable on every keystroke? Maybe this approach is too aggressive, but I don't want a background thread measuring a Spannable as it's being mutated.
- Do we need to support measuring Attachments?
- How can we clean up this API? It should work for now, but feels a little hacky.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23290230

fbshipit-source-id: 832d2f397d30dfb17b77958af970d9c52a37e88b
2020-08-24 11:59:28 -07:00
Joshua Gross 1d05d46e64 Add square brackets around tags in logs in FabricUIManager
Summary:
See title.

Changelog: [Internal]

Differential Revision: D23257809

fbshipit-source-id: b8e519971603506e8ae2b327582d3e3e7d65fddf
2020-08-22 22:42:12 -07:00
Joshua Gross 39689bd969 Add additional verbose logging to MountingManager.java
Summary:
In MountingManager.java in Fabric, if we drop a view with any attached views, we also drop all children. If verbose logging is turned on, log all instances of that happening.

This has no impact unless you switch the flag on manually in debug mode.

Changelog: [Internal]

Differential Revision: D23257749

fbshipit-source-id: fce4476aa47cc1b7137cd9fd2fd0241af1593288
2020-08-22 22:42:12 -07:00
David Vacca 1aaa3d95c0 Integrate AndroidProgressBarComponent into RN Tester OSS Android app
Summary:
This diff integratess AndroidProgressBarComponent into RN Tester OSS android app

changeLog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23227859

fbshipit-source-id: a916c90486ec4f9664be79608a8a8f907e2634a7
2020-08-22 01:46:03 -07:00
David Vacca 62de5c001c Migrate AndroidProgressBarComponent to Fabric
Summary:
This diff migrates AndroidProgressBar component to Fabric

changeLog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D23227857

fbshipit-source-id: c5cbbdcc36e63226286cd714d601f0d4690496b2
2020-08-22 01:46:03 -07:00
David Vacca 2d34c221f2 Integrate AndroidSwipeRefreshLayout into RN Tester Android OSS app
Summary:
This diff integrates AndroidSwipeRefreshLayout into RN Tester Android OSS app

Changelog: [Internal] internal

Reviewed By: fkgozali

Differential Revision: D23227855

fbshipit-source-id: 52bb457d655500b60614dfa3512b5173516f8483
2020-08-21 22:29:31 -07:00
David Vacca 57798408a3 Integrate Android Switch into RN Tester Android OSS app
Summary:
This diff integrates Android Switch into RN Tester Android OSS app

Changelog: [Internal] internal

Reviewed By: fkgozali

Differential Revision: D23227856

fbshipit-source-id: 0ef74456a15827f1aaa9e5b2aefb9c692cc1d1f4
2020-08-21 22:29:31 -07:00
David Vacca 82deeaff26 Integrate Slider into RN Tester OSS Android app
Summary:
This diff integrates Slider View Manager into RN Tester OSS Android app

Changelog: [Internal] internal

Reviewed By: fkgozali

Differential Revision: D23227858

fbshipit-source-id: d785dbdaa3e05e0dfcd7c2134769eaba72f40977
2020-08-21 22:29:30 -07:00
Neil Dhar be53aae324 Fix task ordering for including Hermes
Summary:
Fix a failure in running a single command to clean and rebuild with Hermes (e.g. `./gradlew clean :RNTester:android:app:installHermesDebug`).

From my limited understanding of Gradle, the failure was caused by the fact that the `clean` task could end up running after `prepareHermes`, and therefore delete the shared library after it had been copied. This change updates the `prepareHermes` task to impose the proper order.

In investigating this failure, I also updated inconsistent use of the `$thirdPartyNdkDir` variable.

Changelog: [Internal][Fixed] Fix a failure in running a single command to clean and rebuild ReactAndroid with Hermes

Reviewed By: mdvacca

Differential Revision: D23098220

fbshipit-source-id: 822fa8ac9874d54a3fdd432ad8cbee78295228ee
2020-08-21 16:48:45 -07:00
David Vacca 6e13ca3015 Integrate Android Picker into RN Tester OSS app
Summary:
This diff integrates AndroidPicker into RN Tester OSS app

changelog: [inernal] internal

Reviewed By: fkgozali

Differential Revision: D23199578

fbshipit-source-id: 7c34b0ee4887ffc15dbdffad464230b19f176fc8
2020-08-21 14:18:48 -07:00
David Vacca 1663f27f95 Integrate Activity Indicator into RN Tester Android OSS app
Summary:
This diff integrates Activity Indicator into RN Tester Android OSS app

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23198641

fbshipit-source-id: 93614a3f856b4fc162d4618b168d9c82d18a91eb
2020-08-21 14:18:48 -07:00
David Vacca a76c55e0f5 Integrate AndroidDrawerLayout component into RN Tester Android OSS APP
Summary:
This diff registers the AndroidDrawerLayout component into RN Tester Android OSS APP

Changelog: [internal]

Reviewed By: fkgozali

Differential Revision: D23198359

fbshipit-source-id: 4033c7e968a993a7f8fcaa3f57e7dd78bf84fe57
2020-08-21 14:18:48 -07:00
David Vacca 3790569a71 Integrate Modal into RN Tester Fabric OSS APP
Summary:
This diff integrates Modal into RN Tester Fabric OSS APP

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23183507

fbshipit-source-id: bc2513c39c783d387a985c86a12b04dadac49933
2020-08-21 14:18:48 -07:00
David Vacca 9b811fb0bf Integrate ScrollView in RN Tester Android OSS APP
Summary:
This diff integrates ScrollView in RN Tester Android OSS APP

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23179883

fbshipit-source-id: 8e892ae613a1f44c8d6cfb837bfdbc0771a89176
2020-08-21 14:18:48 -07:00
David Vacca 60a5223ff7 Integrate AndroidTextInput in RN Tester OSS App
Summary:
This diff integrates AndroidTextInput in RN Tester OSS App

changelog: [internal] Internal

Reviewed By: fkgozali

Differential Revision: D23179389

fbshipit-source-id: 709d71343ca374ca2ece00774f4f273145bffd20
2020-08-21 14:18:48 -07:00
David Vacca 8f306cd66a Update directory hierarchy of AndroidTextInput C++ files
Summary:
This diff updates the directory hierarchy of AndroidTextInput C++ files to be compatible with Android OSS build system

changelog: [internal] Internal

Reviewed By: PeteTheHeat

Differential Revision: D23179390

fbshipit-source-id: 1c52e4f882853799a58d44876cadd392b4a35050
2020-08-19 19:22:23 -07:00
Sahil Jain 3fd8a5bac5 Remove unnecessary comment in BUCK files saying to change the contact field to the oncall of your team
Summary:
This comment shouldn't be committed, and should just be part of the template that generates new BUCK files.

Changelog: [Internal]

Differential Revision: D23225700

fbshipit-source-id: a1728e1a4ac0f3f94c4d1330d489bfae7a76a82d
2020-08-19 19:09:05 -07:00
David Vacca 2e88b25242 Integrate Image Fabric component into OSS
Summary:
This diff integrates image Fabric component into RN Tester app

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23177896

fbshipit-source-id: 008e86e82a262827a31b9df74a50b58a97f2e1b7
2020-08-18 19:55:51 -07:00
David Vacca 50af304b3f Integrate Fabric Text in RN Tester OSS
Summary:
This diff integrates Text component into RN OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23177414

fbshipit-source-id: 0a415f8dd8339b84465a7c8d73f3d8abd80fbecc
2020-08-18 19:55:51 -07:00
David Vacca 19695ed6a9 Integrate UnimplementedView into RNTester OSS
Summary:
This diff integrates and render UnimplementedView into RNTester OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23170052

fbshipit-source-id: 9306311d114c280fdeeb20d545ef244369040e96
2020-08-18 17:00:02 -07:00
David Vacca d6ef2598bc Integrate Android C++ components files into RN Tester OSS
Summary:
This diff integrates Android C++ components files into RN Tester OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23170053

fbshipit-source-id: 3ba9d289e026359d83580fbddfd8caf8c226a29a
2020-08-18 17:00:01 -07:00
David Vacca 29513ac989 Fix output files generated by oss-android-codegen script
Summary:
This diff filters the iOS C++ friles that are generated by the oss-android-codegen script
Also, as part of this diff I'm inlcuding .cpp files into the output.

These files are only used and compiled in Android

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23169268

fbshipit-source-id: 404607f3cd6e59197291ea67701774c9c492a282
2020-08-18 17:00:01 -07:00
Ramanpreet Nara 3f77367883 Delay turbomodulejsijni so load until we need it in TurboModulePerfLogger
Summary:
Twilight doesn't have TMPerfLogging enabled. However, the TurboModule infra uses the TMPerfLogger java class everywhere, which loads the turbomodulejsijni library on class load. For some reason, this class load doesn't work, and causes Twilight prod to crash.

To mitigate that crash, this diff delays the so load until it's absolutely necessary, which is by the time we call jniEnableCppLogging. This should never be called in Twilight, because it doesn't have TMPerfLogging enabled. Therefore, the crash should disappear on Twilight.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23192072

fbshipit-source-id: b73ece580e4345dbf835b0fc2f7d43b90f202411
2020-08-18 12:13:35 -07:00