Ensure poll safe for some bad ROM

This commit is contained in:
seven332 committed 2016-03-19 01:14:25 +08:00
1 parent 5325c0c4f7
commit 42c4c4cfda
1 file changed
+5 -1
@@ -830,7 +830,11 @@ public class SpiderQueen implements Runnable {
while (!Thread.currentThread().isInterrupted()) {
Integer index;
synchronized (mPTokenLock) {
index = mRequestPTokenQueue.poll();
if (mRequestPTokenQueue.isEmpty()) {
index = null;
} else {
index = mRequestPTokenQueue.poll();
}
}
if (index == null) {