Add check in SyncManager before stopping thread (fixes #2131380)

Change-Id: I0f0dcc9721094ed29fd241b8a71e30ee0717cdfb
This commit is contained in:
Marc Blank 2009-09-25 10:15:46 -07:00
parent af30d6cfac
commit 484e137691

View File

@ -564,7 +564,10 @@ public class SyncManager extends Service implements Runnable {
AbstractSyncService svc = INSTANCE.mServiceMap.get(mid); AbstractSyncService svc = INSTANCE.mServiceMap.get(mid);
if (svc != null) { if (svc != null) {
svc.stop(); svc.stop();
svc.mThread.interrupt(); Thread t = svc.mThread;
if (t != null) {
t.interrupt();
}
} }
deletedBoxes.add(mid); deletedBoxes.add(mid);
} }