mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-15 09:04:04 +02:00
26 lines
1.3 KiB
Diff
26 lines
1.3 KiB
Diff
|
diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
|
||
|
index 0f52b73c61625db2a3081c0950b6bdd2b06e3d40..b0fc3de4be0b3a26b638683613c63c783c2739bb 100644
|
||
|
--- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
|
||
|
+++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
|
||
|
@@ -38,7 +38,7 @@ import com.facebook.react.uimanager.common.ViewUtil;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import java.util.Queue;
|
||
|
-import java.util.concurrent.ConcurrentLinkedQueue;
|
||
|
+import java.util.concurrent.LinkedBlockingQueue;
|
||
|
import java.util.concurrent.atomic.AtomicReference;
|
||
|
|
||
|
/**
|
||
|
@@ -151,7 +151,10 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
||
|
}
|
||
|
|
||
|
private class ConcurrentOperationQueue {
|
||
|
- private final Queue<UIThreadOperation> mQueue = new ConcurrentLinkedQueue<>();
|
||
|
+ // Patch: Use LinkedBlockingQueue instead of ConcurrentLinkedQueue.
|
||
|
+ // In some versions of Android, ConcurrentLinkedQueue is known to drop
|
||
|
+ // items, causing crashing. See https://github.com/laurent22/joplin/issues/8425
|
||
|
+ private final Queue<UIThreadOperation> mQueue = new LinkedBlockingQueue<>();
|
||
|
@Nullable private UIThreadOperation mPeekedOperation = null;
|
||
|
|
||
|
@AnyThread
|