Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DatePickerDialogModule supports only FragmentActivity #23371

Closed
wants to merge 1 commit into from

Conversation

dulmandakh
Copy link
Contributor

Summary

Now RN has only ReactActivity which extends AppCompatActivity, subclass of FragmentActivity, therefore no need to check if activity is FragmentActivity or not. This PR changes DatePickerDialogModule to work only with FragmentActivity.

Also DialogFragment from Android is deprecated in API 28, and recommends to use DialogFragment from Support Library. Excerpt from DialogFragment documentation.

This class was deprecated in API level 28.
Use the Support Library DialogFragment for consistent behavior across all devices and access to Lifecycle.

BREAKING CHANGE: Brown field apps must extend FragmentActivity or its subclasses

Changelog

[Android] [Changed] - DatePickerDialogModule supports only FragmentActivity

Test Plan

CI is green, and everything works as usual if an activity extends FragmentActivity or its subclasses.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Partner labels Feb 11, 2019
@dulmandakh
Copy link
Contributor Author

@hey99xx another PR to remove plain Activity.

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's so great how much cruft you can remove from RN. I love it.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 11, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

@dulmandakh merged commit c6c5a17 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 11, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 11, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 14, 2019
@dulmandakh dulmandakh deleted the datepicker-cleanup branch February 22, 2019 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. Merged This PR has been merged. Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants