Commit Graph

4024 Commits

Author SHA1 Message Date
Joshua Gross 5be86695a3 AndroidTextInput uses default padding from Android theme
Summary:
For backwards-compatibility with Paper, we're implementing a feature in Fabric that will allow TextInputs to use the default padding from the theme in Android.

Note that this uses some pretty ugly hacks that probably shouldn't be used inside of components at all: looking directly at rawProps, overriding props/Yoga styles in the component descriptor, etc. I would (personally) really like to kill this feature entirely unless and until we can find a more elegant solution.

Changelog: [Internal]

TextInputs are still not pixel-perfect with Paper, but they're much closer, and the underline visual glitchiness is no longer an issue.

Reviewed By: mdvacca

Differential Revision: D20109605

fbshipit-source-id: 543282843e0a9f03a504d72d7a014431099bd64c
2020-02-26 13:46:57 -08:00
Joshua Gross a3ade9e167 EZ fix comment
Summary:
Fix a comment to correctly document how this method works.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D20109606

fbshipit-source-id: d50754887d7a7e0e72a2f8a041887a67aa64c966
2020-02-25 19:08:28 -08:00
Ramanpreet Nara ee93ee603b Re-check in all codegen output
Summary:
This diff:
1. Updates `update-specs.js` to also check in the JNI TurboModules codegen output.
2. Updates all the checked in OSS codegen.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19907536

fbshipit-source-id: 179e01aff05f4c970c20f1482f096dbca10caed3
2020-02-25 12:57:43 -08:00
David Vacca 0e69922125 Disable rendering of inline views in Classic RN code for views that are rendered in Fabric
Summary:
This diff disables the rendering of TextInlineViews in ClassicRN when the users is running with Fabric enabled.

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D20087254

fbshipit-source-id: b4664b17b4c845d212f72e75eee58860fe31abee
2020-02-25 12:54:57 -08:00
David Vacca 8bc7ad605d Extend Fabric measure function to support attachment positions parameters
Summary:
This diff changes the Fabric measure API in order to support attachments parameters

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D20087252

fbshipit-source-id: 20e1526aaa3695d38d0805416df8a32adb8296ad
2020-02-25 12:54:57 -08:00
generatedunixname89002005287564 2e2b331db5 Daily arc lint --take GOOGLEJAVAFORMAT
Reviewed By: zertosh

Differential Revision: D20092187

fbshipit-source-id: 636d70cf85ae4e7c1be941cf04580dd91e68c8bf
2020-02-25 06:09:22 -08:00
Nikita Kraev 79efa43428 Update ImageEditingManager to use internal storage before falling back to external for cache
Summary:
Changelog: [Android] [Changed] - Internal storage now will be preferred for caching images from ImageEditor.

Now we try to write to internal cache directory first.
If that fails (due to no memory error or other IOException), we attempt to write to external storage (if that is allowed).

I introduced additional configuration flag, `allowExternalStorage` which is true by default.
And i updated documentation for new behaviour - see
 `ImageEditor.cropImage(..)` comment.

Reviewed By: makovkastar

Differential Revision: D19878158

fbshipit-source-id: 7e338ce68f535f74c62b5eecd5a94af7e7396f8b
2020-02-25 05:46:59 -08:00
David Vacca 6aea6256a6 Unify measure functions in Fabric Android
Summary:
Until now, there were two measure functions that differ in only one parameter (rootTag). The rootTag is used to use the context associated to the tag as part of the calculation of layout, otherwise it just uses the ReactApplicationContext.
This diff unifies both method into an unique method that

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D20081281

fbshipit-source-id: b1f6a6cedbf78f36f36fd0f93407c23c6996d76b
2020-02-24 18:18:32 -08:00
Ramanpreet Nara 8bb78553a2 Make DeviceInfoModule extend code-generated Java spec
Summary:
I think this NativeModule was converted before we checked in the Java codegen output for TurboModules. I'm making `DeviceInfoModule` extend `NativeDeviceInfoSpec` to properly make it a TurboModule.

Changelog: [Internal]

Reviewed By: PeteTheHeat

Differential Revision: D19911145

fbshipit-source-id: fcec8c5b991bd9fd991e690dfa51f1bd36117e5f
2020-02-24 13:54:29 -08:00
Rachel Nabors c0d8c1db90 Updating the URLs to point at new domain name reactnative.dev
Summary:
We recently updated React Native's docs site to have its own domain reactnative.dev and needed to update the URLs in the source code

CHANGELOG:
[INTERNAL]

Reviewed By: hramos

Differential Revision: D20072842

fbshipit-source-id: 1970d9214c872a6e7abf697d99f8f5360b3b308e
2020-02-24 13:09:11 -08:00
Joshua Selbo 25ea35632e Migrate usages of 3.1.0 espresso libs to androidx:test-espresso 3.2.0 libs
Differential Revision: D19943694

fbshipit-source-id: bfbcf5148afa9639848c6b1c9b7398f75f5157d3
2020-02-23 18:34:55 -08:00
David Vacca 13afc454f1 Disable preallocation of virtual Nodes
Summary:
This diff disables preallocation of virtual nodes, I'm doing this as an intermediate step to eradicate virtual nodes from the android mounting layer.

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D20048996

fbshipit-source-id: 8fe0b03bcfcfd83a3093d1503ac93a20a5e9a57e
2020-02-21 21:07:40 -08:00
David Vacca d42e2fa92a Extend MountingManager to not fail when trying to update event emitter of a non created view
Summary:
This diff extends the MountingManager to not fail when trying to update event emitter of a non created view. This is necessary as intermediate step to remove virtual nodes out of the RN Fabric Android
changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D20048998

fbshipit-source-id: c2a3633400ac67c2f46ec52ed3ad80289ff6aeb9
2020-02-21 21:07:40 -08:00
David Vacca f19fb2454d Cleanup MC.enable_inline_view_dynamic_size and ReactFeatureFlag.supportInlineViewsWithDynamicSize
Summary:
This diff cleans up mobile config and ReactFeatureFlags that are not used anymore

changeLog: [internal]

Reviewed By: JoshuaGross, makovkastar

Differential Revision: D20026794

fbshipit-source-id: 3d941db195075a9cf49b7ecc0bf1ee839fcca189
2020-02-21 10:50:20 -08:00
David Vacca c918f45046 Enable support for TextInlineViews with dynamic sizes by default
Summary:
This diff enables support for TextInlineViews with dynamic sizes by default, removing old code and calls to MCs.

changelog: [internal]

Reviewed By: JoshuaGross, makovkastar

Differential Revision: D20026795

fbshipit-source-id: 48adf356b418866d937be9b478d9186342a07de8
2020-02-21 10:50:20 -08:00
Joshua Gross 3d21a60d41 EZ, Fix typos in logs
Summary:
Fix typo to make grepping easier.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D20025729

fbshipit-source-id: 56d219e771dad133bf74fd1df327c2bbd0f8fd9e
2020-02-21 10:19:38 -08:00
Joshua Gross 5c3d1bafd3 Debug logs in JReactMarker
Summary:
Add temporary debug logs in JReactMarker.

Changelog: [Internal]

Reviewed By: ejanzer

Differential Revision: D20017502

fbshipit-source-id: 3ab53bb74ad3cc615845a312474cb7e60f3f6874
2020-02-21 10:19:38 -08:00
Rick Hanlon ae03bf88a5 Fix null pointer exception in LogBox
Summary: Changelog: [Internal]

Reviewed By: makovkastar

Differential Revision: D20029904

fbshipit-source-id: 515b5b9d16742b411b594040c31d5c7dcee41925
2020-02-21 09:50:12 -08:00
generatedunixname89002005287564 c18fa702fb Daily arc lint --take GOOGLEJAVAFORMAT
Summary: Changelog: [Internal]

Reviewed By: zertosh

Differential Revision: D20027840

fbshipit-source-id: 94501d8aadf271d3a10e1bd5b1a254e1e3914d7b
2020-02-21 05:22:41 -08:00
Emily Janzer dd9832c400 Use bridgeless-friendly API for getting EventDispatcher in SwipeRefreshLayout
Summary: Switching SwipeRefreshLayout to use the bridgeless-friendly API for getting the EventDispatcher.

Reviewed By: mdvacca

Differential Revision: D20016310

fbshipit-source-id: 2f674f45768640fb6219df690fa34f74206fdf19
2020-02-20 20:20:02 -08:00
Emily Janzer 769e368889 Don't subscribe to lifecycle events in NativeAnimatedModule (for now)
Summary: Right now, animations don't work on Android in bridgeless mode because NativeAnimatedModule directly uses the UIManagerModule for various things. Previously, I added a bridgeless check to the module's `initialize()` method to avoid adding a listener on the UIManager; in this diff, I'm moving that check so that we also skip adding the lifecycle listener on the context in bridgeless mode, too. I'll remove this check once we come up with a replacement for the UIManagerModule API.

Reviewed By: JoshuaGross

Differential Revision: D19964171

fbshipit-source-id: 7c461f535e370b0e607c28905c505239cce0e157
2020-02-20 20:20:02 -08:00
Joshua Gross 6239ace5a3 For T62192299, log on AppRegistry.runApplication
Summary:
Fabric debugging.

I also have an agenda of removing all instances of `ReactConstants.TAG`, because it's overly broad and not helpful during debugging.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D20016401

fbshipit-source-id: 91e5cd7e8eb662b1a4a887c1e4e66a31ec741b46
2020-02-20 17:51:26 -08:00
Joshua Gross bf869d9917 ReactInstanceManager.attachRootViewToInstance should show up in production logs for T62192299 analysis
Summary:
Temporary debug logs.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D20016162

fbshipit-source-id: 27848a5249bd625c74dc9023c89da6ec5edd9bd5
2020-02-20 17:51:26 -08:00
Vojtech Novak 7f2a79f40b allow custom ripple radius on TouchableNativeFeedback (#28009)
Summary:
motivation: there are cases where one'd like to control the radius of the ripple effect that's present on TouchableNativeFeedback  - in my case, I want to make sure that both icons and text have the same ripple appearance, but that's currently not possible as far as I can tell.

Currently (afaik) the only way to set  (upper) ripple limits is by specifying width, height and border radius ( + `overflow: hidden`), and this works well for icons which can usually be bounded by a square, but not for text which can have rectangular shape.

This PR adds `rippleRadius` parameter to `SelectableBackground()`, `SelectableBackgroundBorderless()` and `Ripple()` static functions present on `TouchableNativeFeedback`. It can make the ripple smaller but also larger. The result looks like this:

added to RNTester:

![SVID_20200219_182027_1](https://user-images.githubusercontent.com/1566403/74858131-147ff380-5345-11ea-8a9e-2730b79eec38.gif)

difference from the other ripples:

![SVID_20200209_110918_1](https://user-images.githubusercontent.com/1566403/74109152-4513a080-4b81-11ea-8ec3-bb5862c57244.gif)

I'm ofc open to changing the api if needed, but I'm not sure there's much space for manoeuvring. While I was at it, I did a slight refactor of the class into several smaller, more focused methods.

It's possible that in some cases, this might help to work around this issue https://github.com/facebook/react-native/issues/6480.

## Changelog

[Android] [Added] - allow setting custom ripple radius on TouchableNativeFeedback
Pull Request resolved: https://github.com/facebook/react-native/pull/28009

Test Plan: I tested this locally using RNTester

Reviewed By: TheSavior

Differential Revision: D20004509

Pulled By: mdvacca

fbshipit-source-id: 10de1754d54c17878f36a3859705c1188f15c2a2
2020-02-20 15:29:07 -08:00
Marc Horowitz 65d3167a80 If JSC fails to load when starting RN, expose that error to the caller
Summary:
See the comments for more info.

Changelog: [Android] [Changed] - Improve exception message when JSC loading fails

Reviewed By: tmikov

Differential Revision: D19917034

fbshipit-source-id: d846f542c31e9c94edcee240c2935d77d48d1f2a
2020-02-18 12:27:51 -08:00
Marc Horowitz ef021eac9c Add es6Proxy to RuntimeConfig
Summary:
Also clean up some unused items

Changelog: [Internal]

Reviewed By: willholen

Differential Revision: D19917035

fbshipit-source-id: dd5a0af135bdbdb7fb1a98475d99db1ec281eeba
2020-02-18 12:27:50 -08:00
Emily Janzer d4a498aba2 Allow focusing TextInput when already focused
Summary:
Right now, `requestFocus()` is a no-op if the EditText view thinks it's already focused. In certain cases, though, we still want to focus the view even if it's already focused - for example, if TalkBack is enabled and you dismiss the keyboard, you want to be able to tap on the TextInput again to bring back the keyboard, even though the View never thinks it lost focus.

What I'm doing instead is basically disregarding the View's current focus state if we *would* focus the TextInput, which is in 3 circumstances:

- When the view is attached to a window, if autofocus is true
- When the focus is being requested by JS
- When the focus is being requested by an accessibility action from the OS

Changelog: [Android][Fixed] Change how TextInput responds to requestFocus to fix a11y focus issue

Reviewed By: mdvacca

Differential Revision: D19750312

fbshipit-source-id: 30b9fab40af4a083fa98f57aba7e586540238bea
2020-02-18 12:14:17 -08:00
Sidharth Guglani d8ff5a515b fix lint errors
Summary:
Changelog: [Internal][Yoga] Fixed lint errors

```arc lint --apply-patches --take CLANGFORMAT --paths-cmd 'hg files xplat/yoga'
```
Added .clang-tidy file

Reviewed By: zertosh

Differential Revision: D19948702

fbshipit-source-id: f77a16d6f2c532267597a84a9caded0aae68c3aa
2020-02-18 08:12:18 -08:00
Rick Hanlon af710ab177 Switch from YellowBox.ignoreWarnings to LogBox.ignoreLogs
Summary:
Migrates internal calls from ignoreWarnings to ignoreLogs so we can remove YellowBox.

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D19813781

fbshipit-source-id: 16c7b3f2cd38cba1901eccb4d5b9a2396a37ba1b
2020-02-18 06:19:46 -08:00
Rick Hanlon 3c4c2f27aa Migrate console.disableYellowBox to LogBox.ignoreAllLogs()
Summary:
Migrates internal usages of console.disableYellowBox to LogBox.ignoreAllLogs()

Changelog: [Internal]

Reviewed By: TheSavior

Differential Revision: D19813776

fbshipit-source-id: 8c78e64596b4ba2fe94ab838881cbff6cee43e5b
2020-02-18 06:19:45 -08:00
Joshua Gross 5aae380f2d Differentiate between Fabric and non-Fabric UIManager logs
Summary:
Both the UIManagers use ReactConstants.TAG currently, so certain logs are ambiguous. Use FabricUIManager's tag instead for all logs to disambiguate.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19945587

fbshipit-source-id: 0a9d62b5c0276688b2ad3acf8d893b523c26560a
2020-02-18 00:29:02 -08:00
Emily Janzer 8c493804f3 Fix TextInputTestCase
Summary:
https://github.com/facebook/react-native/pull/22166 removed inline styles from TextInputTestModule but applied the incorrect style to some of the TextInputs - instead of setting the text color, it set the margin. This caused the test to fail because no color was applied.

Changelog: [Android] [Fixed] Fixed style in TextInputTestCase

Reviewed By: zackargyle

Differential Revision: D19912362

fbshipit-source-id: d5068114b726ee7583842e5f6f323862b0c28e44
2020-02-14 15:03:58 -08:00
David Vacca 2b5283e39f Replace android.util.log for FLog
Summary:
We must use FLog instead of android.util.log, this diff moves the current callsites of android.util.log to FLog

changeLog:[internal]

Reviewed By: JoshuaGross

Differential Revision: D19884741

fbshipit-source-id: 300f7d691961aa51f0b525c37da7ae3d64fe5131
2020-02-13 14:43:54 -08:00
Samuel Susla b07a65b9d9 Fix ScrollView state not being set if scrollTo command was called
Summary:
# Problem
`UIManager::getRelativeLayoutMetrics`  returns incorrect `frame.origin.y` value.

Just quick reiteration how calculation of `frame.origin` works. We take frame of the target shadow node, travers hierarchy to the root and keep adding `frame.origin` of each ancestor to target shadow node's origin.

One more important piece of information, to calculate scroll view's `frame.origin`, we need to have its contentOffset which gets passed to Fabric core through state.

# So where does it go wrong?
Problem is that on Android, calling view command `scrollTo` doesn't set its internal state correctly. So when we calculate the layoutmetrics, scroll view's `frame.origin` is off by whatever value was used in `scrollTo`.

# The fix
In `ReactScrollView`, correctly set state after `scrollTo` is called on it.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D19835549

fbshipit-source-id: d56e7b0b05023c0497e52c8b46fdcf58ca78b4a5
2020-02-13 13:01:07 -08:00
Joshua Gross 6dfcc09986 Add debug logging for T62192299
Summary:
Add debug logs for T62192299, which will hopefully tell us why RN is being destroyed in otherwise useless logs.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19866793

fbshipit-source-id: 6656c305c8ef567335ea7fe82e4e1c68092a49d2
2020-02-13 11:29:28 -08:00
Andres Suarez ff22722e47 Daily arc lint --take GOOGLEJAVAFORMAT
Summary:
Changelog:
[Internal]

Differential Revision: D19875191

fbshipit-source-id: 3a1e22a4342d523f556c847a9fa780a898a96771
2020-02-13 05:50:42 -08:00
Pascal Hartig 0a6f058b6b Bump SoLoader version to 0.8.2
Summary:
New release with some fixes for RN consumers. See
https://github.com/facebook/SoLoader/releases/tag/v0.8.2

## Changelog

[Android] [Chore] Update SoLoader to 0.8.2

Reviewed By: cpojer

Differential Revision: D19856837

fbshipit-source-id: 77a8fe1aa62db951413931e8a7d5e05325beb24e
2020-02-12 10:10:39 -08:00
Pascal Hartig 917878992d Bump SoLoader buck targets
Summary:
Just released a new version. No changes impacting us here.

Changelog: [Android] [Chore] Upgrade soloader targets

(Note: this ignores all push blocking failures!)

Reviewed By: cpojer

Differential Revision: D19856603

fbshipit-source-id: bab56be19fe231ac70040fca772ce3bc77269692
2020-02-12 10:03:42 -08:00
Janic Duplessis 2c1913f0b3 Implement adjustsFontSizeToFit on Android (#26389)
Summary:
This adds support for `adjustsFontSizeToFit` and `minimumFontScale` on Android. The implementation tries to match closely the behaviour on iOS (hardcoded 4px min size for example). It uses a simpler linear algorithm for now, opened to improving it now if it is a deal breaker or in a follow up.

See https://twitter.com/janicduplessis/status/1171147709979516929 for a more detailed thread about the implementation

## Changelog

[Android] [Added] - Implement `adjustsFontSizeToFit` on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/26389

Test Plan: Tested by adding the existing `adjustsFontSizeToFit` example from the iOS text page to android. Also added a case for limiting size by using `maxHeight` instead of `numberOfLines`.

Reviewed By: mdvacca

Differential Revision: D17285473

Pulled By: JoshuaGross

fbshipit-source-id: 43dbdb05e2d6418e9a390d11f921518bfa58e697
2020-02-10 15:00:41 -08:00
Emily Janzer c32ec1f2ab Add @DoNotStrip annotation to JavaTimerManager.deleteTimer()
Summary:
This method is being stripped in release builds because it's used directly from C++ and not referenced in Java. Adding `DoNotStrip` to prevent this.

Changelog: [Internal]

Reviewed By: PeteTheHeat, mdvacca

Differential Revision: D19708826

fbshipit-source-id: a572f0295ab3b49e5884d0a6c723d65e4bbc9226
2020-02-05 15:26:11 -08:00
Emily Janzer 73427561f7 Use JavaScriptModuleRegistry.getJSModuleName()
Summary:
It turns out that in release builds, proguard is doing something weird with inner classes, so that getSimpleName() is actually returning "OuterClass$InnerClass" in some cases. We have logic to handle this case already in JavaScriptModuleRegistry, so I'm moving that out to a static method that I can access in bridgeless mode.

Also adding tests for it.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19701703

fbshipit-source-id: 625737bfb50ca8ba2bd26034e2a74c682783ba8a
2020-02-05 15:26:11 -08:00
David Vacca 8dcab66e4b Add android log when trying to add a view into a non viewGroup
Summary:
Easy diff to add extra logging when Fabric tries to add a view inside a view that is not a ViewGroup

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D19737506

fbshipit-source-id: ecb858820de7befc385e725c45b537359e39c0e7
2020-02-04 18:54:22 -08:00
Emily Janzer bf32023e50 The life-changing magic of clang-tidying up
Summary:
Adding a `.clang-tidy` to a bunch of dirs under `react-native-github/ReactAndroid` and `react-native-github/ReactCommon`.

I don't want to add a single `.clang-tidy` at the root because we'll need more fine-grained control over what checks are enabled in different parts of the codebase; for example, fabric will and TM will probably have more checks enabled than older parts of the codebase that we're not actively modernizing, and the Hermes team probably wants its own config to be consistent with the rest of their codebase.

Starting off each `.clang-tidy` by only enabling clang-diagnostic; this is just to test that it's working. In the future, we'll work with the community to gradually enable more checks.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D19705749

fbshipit-source-id: 979cea053b645ac4a9790340033bfcfb49ca0f97
2020-02-04 11:09:30 -08:00
David Vacca 9312313c3c Add Support for Emojis in Fabric for Text and TextInput components
Summary:
This diff refactors Text and Text input components in Fabric to support customizable emojis

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D19679391

fbshipit-source-id: 358aa97064209d28d317ba4ca5fff84245c9b1bb
2020-02-03 21:09:17 -08:00
David Vacca d1e2c9435e Extend RN Android text input to support customizable emojis
Summary:
This diff refactors RN Android text input to support customizable emojis.

changelog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D19679392

fbshipit-source-id: b673e3a59f876ff9a822c2f32c9db4ff4efe007b
2020-02-03 21:09:16 -08:00
David Vacca 86d1153586 Refactor ReactShadowNode to add emoji support for TextInput and Fabric
Summary:
This diff refactors support of emojis in RN classic in order to make it easy to extend support for text input and fabric (as part of this stack)

changelog:[internal]

Reviewed By: JoshuaGross

Differential Revision: D19679394

fbshipit-source-id: 45eff49800b3db281721088f107494005d390fff
2020-02-03 21:09:16 -08:00
David Vacca acaef83a27 Delete commented code in ReactTextInputManager
Summary:
This diff deletes commented code in ReactTextInputManager.java

changeLog: [internal]

Reviewed By: JoshuaGross

Differential Revision: D19679393

fbshipit-source-id: 23b1ac9b6f427827b8faebd59f5d2446acede8f5
2020-02-03 21:09:15 -08:00
Janic Duplessis cfcf5eba43 Add new DoNotStrip class to proguard config (#27934)
Summary:
JNI now comes from https://github.com/facebookincubator/fbjni and it uses a different DoNotStrip class (https://github.com/facebookincubator/fbjni/blob/master/java/com/facebook/jni/annotations/DoNotStrip.java) so we need to include it in the proguard config.

## Changelog

[Android] [Fixed] - Add new DoNotStrip class to proguard config
Pull Request resolved: https://github.com/facebook/react-native/pull/27934

Test Plan: Test that it fixes a crash related to missing NativeRunnable class in release builds.

Differential Revision: D19690580

Pulled By: cpojer

fbshipit-source-id: cb4e2eaae35fb3a9d68f04c57cc973914207be73
2020-02-03 01:57:09 -08:00
Janic Duplessis 055a41b081 Implement native TextInput autoFocus on Android (#27924)
Summary:
Follow up to https://github.com/facebook/react-native/issues/27803. To keep consistency between the implementations this also implements autoFocus natively on Android. This will allow removing the JS auto focus logic completely.

## Changelog

[Android] [Fixed] - Implement native TextInput autoFocus on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/27924

Test Plan: Test using the TextInput example in RN tester.

Differential Revision: D19674506

Pulled By: TheSavior

fbshipit-source-id: 9cbb517fc69bccd11f5292a1ccb4acea2e3713e9
2020-01-31 18:18:41 -08:00
David Vacca e4194a20a7 Return null when requesting constants for nonexistent View Managers in RN Android
Summary:
This diff changes the behavior of UIImplementation.resolveViewManager() to return null instead of throwing an exception when trying to find an unexistent viewManager during the computation of constants for view Managers.

The C++/JS code manages exceptions and null results when a view manager doesn't exists, this diff simplifies the way this method operates.

changeLog: [internal]

Reviewed By: rickhanlonii

Differential Revision: D19624423

fbshipit-source-id: df31dcfae9a588bf325b61d529cec6ead59fb19d
2020-01-31 17:06:02 -08:00