77 红包闪退,红包可以1=1,
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
@@ -40,6 +41,7 @@ public class GiftAnimView extends FrameLayout implements GiftSvgaView.OnAnimatio
|
||||
private ReentrantLock lock = new ReentrantLock();
|
||||
private List<String> giftArray = new ArrayList<>();
|
||||
@Setter
|
||||
@Getter
|
||||
public ExecutorService queue;
|
||||
private Context mContext;
|
||||
private boolean isOnece;
|
||||
|
||||
@@ -98,6 +98,13 @@ public class QXGiftPlayerManager {
|
||||
}
|
||||
|
||||
public void displayFullEffectView1(List<String> stringList){
|
||||
if (getDefaultFullEffectView().getQueue() == null){
|
||||
// 创建专用线程池替代GCD队列
|
||||
ExecutorService queue = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS,
|
||||
new LinkedBlockingQueue<Runnable>(),
|
||||
Executors.defaultThreadFactory());
|
||||
fullEffectView.setQueue(queue);
|
||||
}
|
||||
getDefaultFullEffectView().displayEffectView1(stringList);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user