File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
android/src/main/kotlin/com/facebook/react/modules/core Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## 10.2.1
2
+ ** Fixes**
3
+ - Run method channel messages on UI Thread to prevent crash (#1831 )
4
+
1
5
## 10.2.0
2
6
3
7
** Features**
Original file line number Diff line number Diff line change 1
1
package com .facebook .react .modules .core ;
2
2
3
+ import android .os .Handler ;
4
+ import android .os .Looper ;
5
+
3
6
import com .facebook .react .bridge .WritableMap ;
4
7
5
8
import io .flutter .plugin .common .MethodChannel ;
6
9
7
10
public class DeviceEventManagerModule {
8
11
public static class RCTDeviceEventEmitter {
12
+ private Handler uiThreadHandler = new Handler (Looper .getMainLooper ());
9
13
10
14
private final MethodChannel channel ;
11
15
@@ -14,7 +18,7 @@ public RCTDeviceEventEmitter(MethodChannel channel) {
14
18
}
15
19
16
20
public void emit (String eventName , WritableMap params ) {
17
- channel .invokeMethod (eventName , params );
21
+ uiThreadHandler . post (() -> channel .invokeMethod (eventName , params ) );
18
22
}
19
23
}
20
24
}
Original file line number Diff line number Diff line change 1
1
name : stripe_android
2
2
description : Stripe platform implementation for Android
3
- version : 10.2.0
3
+ version : 10.2.1
4
4
repository : https://github.com/flutter-stripe/flutter_stripe
5
5
homepage : https://pub.dev/packages/flutter_stripe
6
6
You can’t perform that action at this time.
0 commit comments