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

Fix StripeEditText crash on instantiation #3905

Merged
merged 3 commits into from
Jun 30, 2021

Conversation

mshafrir-stripe
Copy link
Collaborator

In androidx.appcompat:appcompat:1.4.0-alpha02,
addTextChangedListener() is called by a StripeEditText superclass.

This was causing a crash because textWatchers was not instantiated
before it was accessed. Change textWatchers to nullable and
initialize it in StripeEditText's init block.

Fixes #3770

In `androidx.appcompat:appcompat:1.4.0-alpha02`,
`addTextChangedListener()` is called by a `StripeEditText` superclass.

This was causing a crash because `textWatchers` was not instantiated
before it was accessed. Change `textWatchers` to nullable and
initialize it in `StripeEditText`'s `init` block.

Fixes #3770
@github-actions
Copy link
Contributor

Diffuse output:

Copy link
Contributor

@michelleb-stripe michelleb-stripe left a comment

Choose a reason for hiding this comment

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

I left a couple of comments, but it looks good.

gradle/androidx.versions.toml Outdated Show resolved Hide resolved
@mshafrir-stripe mshafrir-stripe merged commit cbdcb90 into master Jun 30, 2021
@mshafrir-stripe mshafrir-stripe deleted the fix-stripe-edit-text-crash branch June 30, 2021 18:15
mshafrir-stripe added a commit that referenced this pull request Jul 2, 2021
In `androidx.appcompat:appcompat:1.4.0-alpha02`,
`addTextChangedListener()` is called by a `StripeEditText` superclass.

This was causing a crash because `textWatchers` was not instantiated
before it was accessed. Change `textWatchers` to nullable and
initialize it in `StripeEditText`'s `init` block.

Fixes #3770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CardInputWidget cant be inflated
4 participants