-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[in_app_purchase] Convert Android data objects to Pigeon #6453
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
[in_app_purchase] Convert Android data objects to Pigeon #6453
Conversation
… nullability issues
| }; | ||
| } | ||
|
|
||
| /// Creates a [PricingPhaseWrapper] from its Pigeon equivalent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most Pigeon conversions this new code would be offset by removing a bunch of manual JSON conversion on the Dart side (like it is on the Java side in this PR); in this case it's net new code for now because we can't remove the generated JSON conversion yet (as noted in the PR description).
| class PlatformProduct { | ||
| PlatformProduct({required this.productId, required this.productType}); | ||
| /// Pigeon version of Java QueryProductDetailsParams.Product. | ||
| class PlatformQueryProduct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rename is because I discovered that there are at least two different things called Product in the Billing Client API surface, so the old name was too generic.
|
|
||
| public void setPriceAmountMicros(@NonNull Long setterArg) { | ||
| if (setterArg == null) { | ||
| throw new IllegalStateException("Nonnull field \"priceAmountMicros\" is null."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setPrinceAmountMicros I think is only called by in plugin java code so this would be a plugin author error. Is that why this is not a PlatfromException?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pigeon generates these errors for the native classes in Java so that if someone violates their own API constraints in native plugin code it'll create an error on the Java side, where it happened, rather than the Dart side (when it's read) further from the mistake.
flutter/packages@6b4d8b6...17f55d3 2024-04-09 [email protected] Release compileSdk changes (flutter/packages#6491) 2024-04-08 [email protected] [camera_android] Remove `TestUtils.java` (flutter/packages#6490) 2024-04-08 [email protected] Roll Flutter from 98d23f7 to 533d04d (12 revisions) (flutter/packages#6488) 2024-04-08 [email protected] [go_router_builder] Add `restorationScopeId` to `ShellRouteData` (flutter/packages#6238) 2024-04-08 [email protected] [go_router] Fixes deep links with no path (flutter/packages#6447) 2024-04-08 [email protected] [in_app_purchase] Convert Android data objects to Pigeon (flutter/packages#6453) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@6b4d8b6...17f55d3 2024-04-09 [email protected] Release compileSdk changes (flutter/packages#6491) 2024-04-08 [email protected] [camera_android] Remove `TestUtils.java` (flutter/packages#6490) 2024-04-08 [email protected] Roll Flutter from 98d23f7 to 533d04d (12 revisions) (flutter/packages#6488) 2024-04-08 [email protected] [go_router_builder] Add `restorationScopeId` to `ShellRouteData` (flutter/packages#6238) 2024-04-08 [email protected] [go_router] Fixes deep links with no path (flutter/packages#6447) 2024-04-08 [email protected] [in_app_purchase] Convert Android data objects to Pigeon (flutter/packages#6453) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Follow-up to flutter#6262, converting the nested data objects from the legacy JSON conversion to typed Pigeon objects. Deprecates all the JSON code in the wrapper objects, but does not remove it because, unfortunately, the wrapper objects were both platform data transfer objects *and* the public API surface, so the JSON serialization/deserialization code that was part of those objects for platform channel usage is part of the public API as well. At some point we can do a breaking change to clean up that code (flutter/flutter#146202). Fixes flutter/flutter#117910
Follow-up to #6262, converting the nested data objects from the legacy JSON conversion to typed Pigeon objects.
Deprecates all the JSON code in the wrapper objects, but does not remove it because, unfortunately, the wrapper objects were both platform data transfer objects and the public API surface, so the JSON serialization/deserialization code that was part of those objects for platform channel usage is part of the public API as well. At some point we can do a breaking change to clean up that code (flutter/flutter#146202).
Fixes flutter/flutter#117910
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).