Summary:
This fixes cookie missing bug on Android 5.0 and above.
On Android 5.0 and above, after the app successfully obtains the cookie, you kills the App within 30 seconds and restarts the App. It accesses the interface that needs to carry the cookie and finds that the cookie does not exist.
Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior.
Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior.
[ANDROID] [BUGFIX] [Cookie] - Fix cookies lost on Android 5.0 and above
Pull Request resolved: https://github.com/facebook/react-native/pull/19770
Differential Revision: D10114102
Pulled By: hramos
fbshipit-source-id: 5b4766f02f70541fd46ac5db36f1179fe386ac7a
Summary:
Fixes our top crash when framework try drop a view from parent, but it's a null (already removed etc.).
Fixes#20288
Pull Request resolved: https://github.com/facebook/react-native/pull/20465
Differential Revision: D10113976
Pulled By: hramos
fbshipit-source-id: 34f5654f3bdbc63eb7f7d0b5c94885576fc3cdcd
Summary:
update creation logic for text shadow: allow shadows with zero offset when the radius is nonzero
(?should we also add a check to drop the node as a no-op when color.alpha == 0 ?)
Reviewed By: yungsters
Differential Revision: D10017778
fbshipit-source-id: 0168ac6db5ad22a5d7eb32dcd184aede361d6651
Summary:
This change adds getter for overflow attribute in ReactViewGroup class. Overflow setting can affect how view children are drawn but also how hit testing behaves when receiving touch. Exposing this setting makes it possible for gesture-handler library to implement proper hit testing that takes into account overflow property of a view.
Pull Request resolved: https://github.com/facebook/react-native/pull/21398
Differential Revision: D10105398
Pulled By: shergin
fbshipit-source-id: 15ae2b31be3bf80e7e1d28b87ce4474af0f486f5
Summary:
We are currently iterating through each view manager to get its class name to pass to JS. JS uses this list to define lazy property accesses for each view manager to grab the constants synchronously. This results in each view manager's class loading immediately -- causing a small perf hit.
Let's avoid this view managers list entirely. JS is able to access each view manager directly by calling getConstantsForViewManager(name)
Reviewed By: TheSavior
Differential Revision: D9930713
fbshipit-source-id: 4aa013f8398d4f51b7eef07937d2977ba1950726
Summary: Similar to ComponentsConfiguration used by Litho. Allows us to abtest without having to pipe everything through ReactInstanceManager
Reviewed By: axe-fb
Differential Revision: D9930707
fbshipit-source-id: 43edf7d8fa2bab7b7888df57ea1bec2b4726f51b
Summary: Replaced each view manager access with a getViewManager() function call. This will later be used to lazily load view manager classes by allowing java to avoid sending the entire list of view managers to JS.
Reviewed By: QueryConnectionException
Differential Revision: D9695788
fbshipit-source-id: 949858aa2f0b0b00b68e260461ba8f1d085cf07f
Summary:
On Android N (API 24) rounded corners rendering has issues in case scale factor is set for the view.
Pull Request resolved: https://github.com/facebook/react-native/pull/21340
Differential Revision: D10084318
Pulled By: hramos
fbshipit-source-id: 53ae5a32b96cc7ee7eba084330682239d8beb85d
Summary: During the JS run, the view managers used on a React Native screen eventually call the native methods for `UIManagerModule.getConstantsForViewMangers(viewManagerName)`. This blocks the JS thread. This diff tries to cache the values of those calls and return them when JS needs it, ensuring that JS is not blocked as much.
Reviewed By: achen1
Differential Revision: D9985817
fbshipit-source-id: 36feabc8a386956f8a6474f6e7978285d31f24dd
Summary:
Changes all possible native JNI methods to critical methods.
For now, this only changes Android up and including v7. In order to be prepared for the `CriticalNative` annotation in Android v8, the following restrictions apply:
- Qualifying methods must be static (this is also enforced for Dalvik / Android v4)
- Method implementations can only consume primitive JNI types (`boolean`, jchar`, etc.)
Reviewed By: priteshrnandgaonkar
Differential Revision: D9943868
fbshipit-source-id: 728817eb37822b717fd3daf94cd9f02b42c17db6
Summary:
Moves binding of native methods into a separate native method that can be parameterized.
This will be used to experiment with JNI-related technology.
Reviewed By: priteshrnandgaonkar
Differential Revision: D9943870
fbshipit-source-id: 661f15537d5bbf7a3eef7717e3d99fed2de23904
Summary:
Support for `overflow: visible` was recently added to Android ScrollView.
However, it didn't account for `overflow: scroll` and changed the behavior, causing content to render
when before it would be clipped.
Reviewed By: achen1
Differential Revision: D10036807
fbshipit-source-id: e44a79b18eecbc7d64621f7cf5d800a00a121b13
Summary: There hasn't been any reports of overflow issues since the last issue was fixed in v183 (July 30th). Let's remove this flag
Reviewed By: yungsters
Differential Revision: D10020006
fbshipit-source-id: 593c7d2c2bef5f0bd60d5de1941cd58f7fd6ccc7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/21306
This diff moves fabric dependencies out of OSS instrumentation tests (js/react-native-github/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK), this will un-break build of OSS project in CI.
Reviewed By: rsnara
Differential Revision: D10020517
fbshipit-source-id: e2cf23afeeecf4cfb41345742f59c16af6b108d0
Summary: Just a small diff to remove some unused parameters in some methods of the ReactInstnaceManager class
Reviewed By: achen1
Differential Revision: D10011168
fbshipit-source-id: 2247ecd01bfc63c27837c6abad4bff1b4e590ac0
Summary:
The snapToOffsets changes improved the flinging algorithm for snapToInterval/snapToOffsets but actually broke it for pagingEnabled because it's meant to only scroll one page at a time.
First, I just brough back the old algorithm, but noticed that it has a bunch of issues (e.g. #20155). So, I tried to improve the algorithm to make sure it uses the proper target offset prediction using the same physics model that Android uses for it's normal scrolling but still be limited to one page scrolls.
This resolves#21116.
Reviewed By: shergin
Differential Revision: D9945017
fbshipit-source-id: be7d4dfd1140f4c4d32bad93a03812dc80286069
Summary:
ScrollView always clipping children on Android even when `overflow: visible` was specified.
This change just omits the clipping during draw if `overflow: visible` is passed in.
The default is not changed (from hidden to visible) in case there is a performance impact.
Android now matches iOS in behavior. This helps with issue #21116 and resolves#14416.
Reviewed By: shergin
Differential Revision: D9952096
fbshipit-source-id: 367afe33ee7ff0fdc5aa1074d239883aa289888a
Summary:
<!--
Required: Write your motivation here.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Fixes inconsistency in custom font rendering in android. See explanation below.
<!--
Required: Write your test plan here. If you changed any code, please provide us with
clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->
I tested the following on my physical device (Sony Z5C) and on Android emulator on Mac.
The test app contains various fonts in the AvenirNext family, which are added to the app as `.ttf` format.
Note that the character "thickness" is inconsistent. Some characters looks thicker than other. See the screenshots below as an example:
- Looks thicker: right half of the `g` and `&` as in "Region & Language" (list-view screen)
- Looks thicker: `w` as in `Change Password` (list-view screen)
- Looks vertically compressed: `a` and `e` as in "Message" in the bottom bar (list-view screen)
- Looks thicker: `A`, `N`, `V`, `v` (paragraph screen)
- Looks thinner: `i` (paragraph screen), it leaves extra space on its right hand side
![screenshot_20180427-151129](https://user-images.githubusercontent.com/1103788/39350754-ae9fafe2-4a31-11e8-8835-97280783bb95.png)
![screenshot_20180427-151419](https://user-images.githubusercontent.com/1103788/39350755-aecc9bba-4a31-11e8-8128-2d230f003dfa.png)
Every characters has consistent "weight" and looks nice:
![screenshot_20180427-150835](https://user-images.githubusercontent.com/1103788/39350753-ae698728-4a31-11e8-8a55-4e161c559b95.png)
![screenshot_20180427-151639](https://user-images.githubusercontent.com/1103788/39350756-aef95d44-4a31-11e8-820b-1a7dee77fabe.png)
<!--
Does this PR require a documentation change?
Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->
None
<!--
Required.
Help reviewers and the release process by writing your own release notes. See below for an example.
-->
[ANDROID] [ENHANCEMENT] [CustomStyleSpan] - Enable subpixel text rendering
<!--
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
CATEGORY
[----------] TYPE
[ CLI ] [-------------] LOCATION
[ DOCS ] [ BREAKING ] [-------------]
[ GENERAL ] [ BUGFIX ] [ {Component} ]
[ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ]
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
[----------] [-------------] [-------------] |-----------|
EXAMPLES:
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/19043
Differential Revision: D10008155
Pulled By: hramos
fbshipit-source-id: 7fe9bb0f9be80380947ff80eac522e3cfd6b22cf
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Fixes#20924
DPad arrow events were missing from `KEY_EVENTS_ACTIONS` which meant that they were not broadcasted by `TVEventHandler`.
Pull Request resolved: https://github.com/facebook/react-native/pull/21143
Differential Revision: D10007851
Pulled By: mdvacca
fbshipit-source-id: 9a03cad249a4a1917975d1de10b6112e69d32a72
Summary: CoreModulePackages was following the old way of adding Native Modules to the Array list. This diff changes it to use names instead of class.
Reviewed By: achen1
Differential Revision: D9996803
fbshipit-source-id: a6c3daf2193a2559db0908f9e26e339e03e4f8c7
Summary:
When looking at enabling gzip content encoding on Android I stumbled on this old issue where the body content is not decoded. It happens because okhttp only handles gzip decoding if the user does NOT provide an accept-encoding header. This is pretty confusing because on iOS we need to pass the header manually if we want to receive a gzipped response. I think it makes sense to handle the decoding no matter what.
See the comment in code for more details.
Fixed#5297
Pull Request resolved: https://github.com/facebook/react-native/pull/21187
Differential Revision: D9978889
Pulled By: hramos
fbshipit-source-id: b86791fb7d3157f325a0904225d2f63d166080d5
Summary:
Upgrade React Native to Android SDK 27 again, following the reversal in D9886607 (68c7999c25).
The SDK 27 is actually available internally in an alternate location that is suitable for use cases like React Native's. For future reference, SDK 28 is also available for use in this location.
Reviewed By: axe-fb
Differential Revision: D9929066
fbshipit-source-id: 9413f891d5587293a30544351340e9407a2dce55
Summary: Now that NativeModules are stored based on String keys instead of classnames, the old innterface to getNativeModules(Class moduleInterface) is deprecated. This interface is also incorrect since a native module with the same name may be overridden, causing issues. Getting native modules by name is also similar to what JavaScript does
Reviewed By: achen1
Differential Revision: D9697827
fbshipit-source-id: ff832bd2ea5e1c7cfe7d8c0c3a66f0d755b2c354
Summary:
This diff:
- Disables all tests but one of FabricViewTest
- Disables all tests but one of FabricBenchmarkTest
- Changes ReactAppTestActivity to run with Hermes
The reason there is only one test running in each test class, is because the tear down process of Fabric is still flaky and it produces crashes when restarting RN. We are working on this right now and we will enable the rest of the tests after that's fixed.
Reviewed By: achen1
Differential Revision: D9890700
fbshipit-source-id: a8716481eff15b77bd12b38aaaefd4e282c71f3b
Summary: This diff removes the Fabric Android implementation in favor of Fabric C++, as part of another diff I'm going to move the fabricxx package into fabric package
Reviewed By: shergin
Differential Revision: D9841240
fbshipit-source-id: c7922b7bfb9885f33b1f52237ec7cf00c1df96fb
Summary:
Go back to using compileSdkVersion 26 and targetSdkVersion 26, temporarily. We can re-add this once Android SDK 27 becomes available in Facebook's internal repository.
The Android SDK Build Tools 27.0.3 **are** available, so we can continue using those.
Reviewed By: axe-fb
Differential Revision: D9886607
fbshipit-source-id: 6c1c9c1e1309c3a0483cc4c0bd8dcb4a5f29fc7e
Summary: This diff introduces the concept of Local Data in Android Fabric C++ and as an example we uses it to implement Text View.
Reviewed By: shergin
Differential Revision: D9583970
fbshipit-source-id: ab7478b16ef4327ff574ca1467870ab9cb684ea0
Summary: In this diff I added support to be able to measure C++ shadowNode in Android. As an example I implemented the measurement of TextViews
Reviewed By: shergin
Differential Revision: D9583972
fbshipit-source-id: 1344782d4c586c94a4576b18a4acfa4775e46952
Summary:
This PR tries to consolidate Android native dependencies versions to make it less error prone to version bumps.
Pull Request resolved: https://github.com/facebook/react-native/pull/20742
Differential Revision: D9818155
Pulled By: hramos
fbshipit-source-id: 9bf631640910edad5731014f4e23dbca45af2b59
Summary:
This PR does 2 things:
* Have Facebook internal dependencies only be added if `IS_OSS_BUILD` is `True`. This syntax is used in other BUCK files in the codebase.
* `ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/BUCK`
* `ReactAndroid/src/androidTest/java/com/facebook/react/testing/rule/BUCK`
* Add a missing Android dependency to this BUCK file:
* `ReactAndroid/src/main/java/com/facebook/react/BUCK`
As a result, `test_android` is passing again.
Pull Request resolved: https://github.com/facebook/react-native/pull/21083
Differential Revision: D9809808
Pulled By: hramos
fbshipit-source-id: c840ea2892006a88fe13de1b1324746d030ebaf2
Summary:
@public
As we're doing in D9440914 (OSS 64a52532fe), send text metrics in an onTextLayout callback. These can be used by surrounding views for doing complicated layout like:
- displaying a cursor at the end of text
- vertical centering using capheight-baseline
This right now isn't very performant but is only done when `onTextLayout` is set. I plan to optimize it with a capheight and xheight cache in a follow up diff.
Reviewed By: achen1
Differential Revision: D9585613
fbshipit-source-id: aa20535b8371d5aecf15822d66a0d973c9a7eeda
Summary: This diff adds a new property in ReactWebView to be able to configure allowFileAccess
Reviewed By: achen1
Differential Revision: D9789466
fbshipit-source-id: 39d042ac6ef69e44f006a4c4b0c2dd900f84dbc9
Summary: Back out D9614432 and partially revert D9623235 to unbreak OSS.
Reviewed By: hramos
Differential Revision: D9779548
fbshipit-source-id: 931c4987ed5acbae3790c42717662fed77599335
Summary: This change drops the year from the copyright headers and the LICENSE file.
Reviewed By: yungsters
Differential Revision: D9727774
fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
Summary: buildifier was updated and now we sort loads!
Reviewed By: zertosh
Differential Revision: D9771824
fbshipit-source-id: 0001aa5f656d4aa40b3498d5bfd792a3d14e56e1
Summary: Adding a QPL point for initializing Hermes to both (MP) HOME_TTI and (RN) CORE.
Reviewed By: yungsters
Differential Revision: D9725795
fbshipit-source-id: 673f54950a2d9ebfa496a000a0d47aabf290bfc8
Summary:
The React Native Web View takes a method option to determine if HTTP GET or HTTP POST should be used.
For iPhone this is not case sensitive, meaning that `method: "post"` is allowed.
For Android "post" is not understood and therefore the request will be using HTTP GET.
I suggest we ignore case for the method, or throw an Exception.
Pull Request resolved: https://github.com/facebook/react-native/pull/21010
Differential Revision: D9700895
Pulled By: hramos
fbshipit-source-id: 3fa904e7946dd40958cb44f9a234ee66cb68fab2
Summary: An experiment was added to A/B test eager modules. Removing this experiment, as the next diff on this stack has a different way to add eager modules per route.
Reviewed By: achen1
Differential Revision: D9685803
fbshipit-source-id: ca6c91ca377b6dfaf5accda1e1f6bbfe17b1d616
Summary:
Some of the native modules are accessed using `getNativeModule()` may not have an `ReactModule` annotation. As a result, such native modules cannot be found.
This diff adds a better error message, and also adds the annotation to Mobile Home's `PushNotificationManager` that is accessed using the `getNativeModule()`
Differential Revision: D9697256
fbshipit-source-id: 2e2f7d2f1eb705c9c515ff40d9acbc53055c26d8