v6: GooglePay - Add application parameter to factories#2609
v6: GooglePay - Add application parameter to factories#2609
Conversation
Summary of ChangesHello @ozgur00, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds an application parameter to the PaymentComponentFactory and StoredPaymentComponentFactory interfaces, and updates all implementations and call sites accordingly. This is a good structural change that will allow passing the application context where needed. The code changes are logical and well-implemented. I've included a few minor suggestions to improve code style and maintainability.
|
|
||
| private fun createComponentEventHandler( | ||
| sessionSavedStateHandleContainer: SessionSavedStateHandleContainer, | ||
| analyticsManager: com.adyen.checkout.core.analytics.internal.AnalyticsManager, |
There was a problem hiding this comment.
For better readability, you could import com.adyen.checkout.core.analytics.internal.AnalyticsManager at the top of the file and use the simple name AnalyticsManager here.
| analyticsManager: com.adyen.checkout.core.analytics.internal.AnalyticsManager, | |
| analyticsManager: AnalyticsManager, |
| isFlowTakenOver = sessionSavedStateHandleContainer.isFlowTakenOver ?: false, | ||
| ) | ||
|
|
||
| return SessionsComponentEventHandler( |
| } | ||
|
|
||
| private fun generateApplication(): Application { | ||
| return org.mockito.Mockito.mock(Application::class.java) |
There was a problem hiding this comment.
To improve code style, you can add import org.mockito.Mockito at the top of the file and use Mockito.mock(Application::class.java) here. With a static import like import org.mockito.Mockito.mock, you could simplify this to just mock(Application::class.java).
| return org.mockito.Mockito.mock(Application::class.java) | |
| return Mockito.mock(Application::class.java) |
✅ No public API changes |
|



Description
We need to include application parameter in factory functions to be able to pass it into
GooglePayAvailabilityCheck.Checklist
Ticket Number
COSDK-936