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

Manually parcel PaymentController.Result #2105

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

mshafrir-stripe
Copy link
Collaborator

Summary

Update PaymentController.Result's parceling
logic to manually parcel. This prevents
using Parcel.writeException(), which is
what the autogenerated parceling logic uses.
That method only supports certain exception
subtypes, and will throw any exception that
is unsupported
.

Motivation

Fixes #2100

Testing

Added a test to run a PaymentController.Result
instance through a parceling/unparceling roundtrip.

Summary
Update `PaymentController.Result`'s parceling
logic to manually parcel. This prevents
using `Parcel.writeException()`, which is
what the autogenerated parceling logic uses.
That method only supports certain exception
subtypes, and will throw any exception that
is unsupported [0].

Motivation
Fixes #2100

Testing
Added a test to run a `PaymentController.Result`
instance through a parceling/unparceling roundtrip.

[0] https://developer.android.com/reference/android/os/Parcel#writeException(java.lang.Exception)
@mshafrir-stripe mshafrir-stripe merged commit 7360027 into master Jan 27, 2020
@mshafrir-stripe mshafrir-stripe deleted the payment-result-parcel branch January 27, 2020 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FATAL EXCEPTION: DefaultDispatcher-worker-1 & APIException in 13.1.2
5 participants