Ensure poll safe for some bad ROM
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user