Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[in_app_purchase] Added serviceTimeout code #3287

Merged
merged 8 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/in_app_purchase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.5

* [Android] Fixed: added support for the SERVICE_TIMEOUT (-3) response code.

## 0.3.4+18

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ enum BillingResponse {
// WARNING: Changes to this class need to be reflected in our generated code.
// Run `flutter packages pub run build_runner watch` to rebuild and watch for
// further changes.

/// The request has reached the maximum timeout before Google Play responds.
@JsonValue(-3)
serviceTimeout,

/// The requested feature is not supported by Play Store on the current device.
@JsonValue(-2)
featureNotSupported,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/in_app_purchase/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: in_app_purchase
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
homepage: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase
version: 0.3.4+18
version: 0.3.5

dependencies:
async: ^2.0.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ void main() {
});
});

// Make sure that the enum values are supported and that the converter call
// does not fail
test('response states', () async {
BillingResponseConverter converter = BillingResponseConverter();
converter.fromJson(-3);
converter.fromJson(-2);
converter.fromJson(-1);
converter.fromJson(0);
converter.fromJson(1);
converter.fromJson(2);
converter.fromJson(3);
converter.fromJson(4);
converter.fromJson(5);
converter.fromJson(6);
converter.fromJson(7);
converter.fromJson(8);
});

group('startConnection', () {
final String methodName =
'BillingClient#startConnection(BillingClientStateListener)';
Expand Down