-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify PaymentSession state and lifecycle management (#2165)
Summary - Create `PaymentSessionViewModel` and integrate in `PaymentSession` - Remove `savedInstanceState` argument from `PaymentSession#init()` - Remove `PaymentSession#savePaymentSessionInstanceState()` - Remove `PaymentSession#onDestroy()` - the `listener` instance is now released automatically - In `PaymentSession#init()`, immediately call the `listener` when `shouldPrefetchCustomer` is false - Move `CustomerSession` initialization in example app to `Application` subclass Motivation Simplify `PaymentSession` state management and API. It is no longer necessary to pass a state `Bundle` and manage lifecycle events. Testing Add unit tests Manually verify with both `Activity` and `Fragment`
- Loading branch information
1 parent
80a704c
commit b5db815
Showing
9 changed files
with
348 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.