Skip to content

Add API 26 check to ReactScrollViewHelper#53688

Closed
Abbondanzo wants to merge 1 commit into
facebook:mainfrom
Abbondanzo:export-D82039300
Closed

Add API 26 check to ReactScrollViewHelper#53688
Abbondanzo wants to merge 1 commit into
facebook:mainfrom
Abbondanzo:export-D82039300

Conversation

@Abbondanzo
Copy link
Copy Markdown
Contributor

Summary:
Support for the removeIf method was added to CopyOnWriteArrayList with AOSP in API 26. On devices with API 24 and 25, invocations of either ReactScrollViewHelper#removeScrollListener or ReactScrollViewHelper#removeLayoutChangeListener would cause a crash. Rather than bump the required API version and lock out apps targeting API 24/25, this adds a separate code path to bulk remove items from the array list.

Changelog: [Internal]

Rollback Plan:

Differential Revision: D82039300

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 9, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D82039300

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D82039300

Summary:
Pull Request resolved: facebook#53688

Support for the `removeIf` method was [added to CopyOnWriteArrayList with AOSP in API 26](https://android-review.googlesource.com/c/platform/libcore/+/304056). On devices with API 24 and 25, invocations of either `ReactScrollViewHelper#removeScrollListener` or `ReactScrollViewHelper#removeLayoutChangeListener` would cause a crash. Rather than bump the required API version and lock out apps targeting API 24/25, this adds a separate code path to bulk remove items from the array list.

Changelog: [Internal]

Differential Revision: D82039300
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D82039300

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 11, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 0ee665c.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @Abbondanzo in 0ee665c

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants