Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
remonh87 authored Jul 10, 2024
2 parents 956a578 + 8a03bf0 commit 28a1838
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/stripe_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 10.2.1
**Fixes**
- Run method channel messages on UI Thread to prevent crash (#1831)

## 10.2.0

**Features**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package com.facebook.react.modules.core;

import android.os.Handler;
import android.os.Looper;

import com.facebook.react.bridge.WritableMap;

import io.flutter.plugin.common.MethodChannel;

public class DeviceEventManagerModule {
public static class RCTDeviceEventEmitter {
private Handler uiThreadHandler = new Handler(Looper.getMainLooper());

private final MethodChannel channel;

Expand All @@ -14,7 +18,7 @@ public RCTDeviceEventEmitter(MethodChannel channel) {
}

public void emit(String eventName, WritableMap params) {
channel.invokeMethod(eventName, params);
uiThreadHandler.post(() -> channel.invokeMethod(eventName, params));
}
}
}
2 changes: 1 addition & 1 deletion packages/stripe_android/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: stripe_android
description: Stripe platform implementation for Android
version: 10.2.0
version: 10.2.1
repository: https://github.com/flutter-stripe/flutter_stripe
homepage: https://pub.dev/packages/flutter_stripe

Expand Down

0 comments on commit 28a1838

Please sign in to comment.