Commit 02359fe0 authored by Geoffrey Métais's avatar Geoffrey Métais

Release lock when thumbnailer is interrupted

CID #1226337
parent 7c506ae1
......@@ -149,7 +149,6 @@ public class Thumbnailer implements Runnable {
mVideoBrowser.resetBarrier();
lock.lock();
// Get the id of the file browser item to create its thumbnail.
boolean interrupted = false;
while (mItems.size() == 0) {
try {
if (mVideoBrowser != null) {
......@@ -159,15 +158,11 @@ public class Thumbnailer implements Runnable {
totalCount = 0;
notEmpty.await();
} catch (InterruptedException e) {
interrupted = true;
lock.unlock();
Log.i(TAG, "interruption probably requested by stop()");
break;
}
}
if (interrupted) {
lock.unlock();
break;
}
total = totalCount;
MediaWrapper item = mItems.poll();
lock.unlock();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment