Skip to content

Conversation

@reidbaker
Copy link
Contributor

@reidbaker reidbaker commented Jan 19, 2024

  • Initial add of country code, no tests
  • Add tests for getBillingConfig

fixes flutter/flutter/issues/141627

Hold merging on:

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style].
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@reidbaker reidbaker marked this pull request as ready for review January 25, 2024 20:27
@reidbaker reidbaker requested a review from gmackall as a code owner January 25, 2024 20:27
/// See: https://developer.android.com/reference/com/android/billingclient/api/BillingConfig
/// See: https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html
Future<String> getBillingConfig() async {
return _billingClientManager.runWithClientNonRetryable(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this return a BillingConfigWrapper and then be also be retryable, as it returns a subclass of HasBillingResponse?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to keep the exposed api as small as possible so I thought the country code was the right level to expose. I didnt even think about if it should be retryable I just mirrored the other commands. Let me look at what that does and make a call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment still applies

reidbaker and others added 2 commits January 26, 2024 13:21
…ain/java/io/flutter/plugins/inapppurchase/MethodCallHandlerImpl.java

Co-authored-by: Gray Mackall <34871572+gmackall@users.noreply.github.com>
@reidbaker
Copy link
Contributor Author

Without a correctly setup play store billing setup I was able to manually verify that I could get the country code of my personal account. I have not verified an account in a different country but the defaults are all empty string so I think that is a reasonable validation.

@reidbaker
Copy link
Contributor Author

reidbaker commented Jan 29, 2024

Fixing readme validation that failed on previous content.
https://github.com/flutter/packages/blob/main/script/tool/lib/src/readme_check_command.dart

@reidbaker reidbaker added the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Jan 30, 2024
@reidbaker reidbaker requested a review from jmagman January 30, 2024 18:29
/// See: https://developer.android.com/reference/com/android/billingclient/api/BillingConfig
/// See: https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html
Future<String> getBillingConfig() async {
return _billingClientManager.runWithClientNonRetryable(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment still applies

Copy link
Member

@gmackall gmackall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM outside of the format/analyze failures!

@reidbaker reidbaker added autosubmit Merge PR when tree becomes green via auto submit App and removed override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Jan 31, 2024
@auto-submit auto-submit bot merged commit 7b1ae1f into flutter:main Jan 31, 2024
@reidbaker reidbaker deleted the i141627-country-code-api branch January 31, 2024 15:29
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 2, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 2, 2024
flutter/packages@5b48c44...d37fb0a

2024-02-02 32242716+ricardoamador@users.noreply.github.com Add a link the different possible Android virtual device configs (flutter/packages#6033)
2024-02-01 32242716+ricardoamador@users.noreply.github.com Update the emulator versions and expose cipd. (flutter/packages#6025)
2024-02-01 stuartmorgan@google.com [tool] Add details to missing gradle coverage error (flutter/packages#6029)
2024-02-01 stuartmorgan@google.com [file_selector] Fix comment typo (flutter/packages#6027)
2024-02-01 43054281+camsim99@users.noreply.github.com [camerax] Change `buildPreview` to return `Texture` versus `FutureBuilder` (flutter/packages#6021)
2024-02-01 engine-flutter-autoroll@skia.org Manual roll Flutter from c65ab4d to e02e207 (38 revisions) (flutter/packages#6028)
2024-02-01 engine-flutter-autoroll@skia.org Manual roll Flutter from 75a2e5b to c65ab4d (22 revisions) (flutter/packages#6026)
2024-02-01 engine-flutter-autoroll@skia.org Roll Flutter from ace9181 to 75a2e5b (16 revisions) (flutter/packages#6017)
2024-02-01 JeroenWeener@users.noreply.github.com [webview_flutter] Support for handling basic authentication requests (flutter/packages#5727)
2024-01-31 stuartmorgan@google.com [tool] Extend `flutter test` workaround to other desktops (flutter/packages#6024)
2024-01-31 katelovett@google.com [two_dimensional_scrollables] Merged cells for TableView (flutter/packages#5917)
2024-01-31 tessertaha@gmail.com [rfw] Restore RFW to 100% coverage after `ButtonBar` update (flutter/packages#6020)
2024-01-31 louisehsu@google.com [in_app_purchase] Convert storefront(), transactions(), canMakePayment(), and addPayment() to pigeon (flutter/packages#5910)
2024-01-31 reidbaker@google.com [in_app_purchase] Add play country code api (flutter/packages#5941)

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 flutter-ecosystem@google.com,rmistry@google.com 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: in_app_purchase platform-android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[in_app_purchase] Feature Request: add store's countryCode to API

4 participants