Make sure body loading finishes when searching

Bug: 7107329
Change-Id: Ief78b1c31a7c363cd2e23ef1b7d4ff9e26c219b7
This commit is contained in:
Marc Blank 2012-09-05 10:25:34 -07:00
parent 7110183fe5
commit d2bf25ac8b

View File

@ -2551,6 +2551,14 @@ public class Imap2SyncService extends AbstractSyncService {
return sortedUids.length;
} finally {
if (mBodyThread != null) {
try {
mBodyThread.join();
} catch (InterruptedException e) {
// It's all good
}
mBodyThread = null;
}
if (mSocket != null) {
try {
// Try to logout