Send a canceled() confirm result in FawryActivity#onDestroy #8476
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Send a canceled() confirm result in FawryActivity#onDestroy
Motivation
Properly handle the case where a user presses "back" to exit the FawryActivity
We could also handle this by trying to detect if
ExternalPaymentMethodProxyActivity
has been restarted, but any solution there seems pretty fragile and likely to have unintended impacts on a merchant's EPM implementation.Screen recordings
Before:
You need to press back twice to get back into PS, and FlowController just totally freezes
epm.hangs.on.back.button.mp4
After:
You press back from the FawryActivity and wait ~.5 second for state to be restored
press.back.on.fawry.activity.mp4
Testing