Fixed a deadlock, made errors more descriptive

pull/14/head
Sam Bosley 13 years ago
parent 3f0de0ab4e
commit b24044ddd1

@ -117,7 +117,7 @@ public final class ActFmSyncService {
private Thread pushRetryThread = null;
private Runnable pushRetryRunnable;
private final AtomicInteger taskPushThreads = new AtomicInteger(0);
private final ConditionVariable waitUntilEmpty = new ConditionVariable();
private final ConditionVariable waitUntilEmpty = new ConditionVariable(true);
public void initialize() {
initializeRetryRunnable();
@ -1099,7 +1099,7 @@ public final class ActFmSyncService {
} catch (IOException e) {
if (handler != null)
handler.handleException("io-exception-list-" + model, e, e.getMessage());
handler.handleException("io-exception-list-" + model, e, e.toString());
else
handleException("io-exception-list-" + model, e);
} catch (JSONException e) {

@ -140,9 +140,9 @@ public class ActFmSyncV2Provider extends SyncV2Provider {
time = actFmSyncService.fetchTags(time);
Preferences.setInt(LAST_TAG_FETCH_TIME, time);
} catch (JSONException e) {
handler.handleException("actfm-sync", e, e.getMessage()); //$NON-NLS-1$
handler.handleException("actfm-sync", e, e.toString()); //$NON-NLS-1$
} catch (IOException e) {
handler.handleException("actfm-sync", e, e.getMessage()); //$NON-NLS-1$
handler.handleException("actfm-sync", e, e.toString()); //$NON-NLS-1$
} finally {
callback.incrementProgress(20);
if(finisher.decrementAndGet() == 0) {

@ -115,7 +115,7 @@ public class GtasksSyncV2Provider extends SyncV2Provider {
} catch (GoogleTasksException e) {
handler.handleException("gtasks-sync=io", e, e.getType()); //$NON-NLS-1$
} catch (IOException e) {
handler.handleException("gtasks-sync=io", e, e.getMessage()); //$NON-NLS-1$
handler.handleException("gtasks-sync=io", e, e.toString()); //$NON-NLS-1$
}
StoreObject[] lists = gtasksListService.getLists();
@ -158,7 +158,7 @@ public class GtasksSyncV2Provider extends SyncV2Provider {
} catch (GoogleTasksException e) {
handler.handleException("gtasks-sync-io", e, e.getType()); //$NON-NLS-1$
} catch (IOException e) {
handler.handleException("gtasks-sync-io", e, e.getMessage()); //$NON-NLS-1$
handler.handleException("gtasks-sync-io", e, e.toString()); //$NON-NLS-1$
} finally {
callback.incrementProgress(10);
}
@ -262,7 +262,7 @@ public class GtasksSyncV2Provider extends SyncV2Provider {
errorHandler.handleException("gtasks-sync-io", e, e.getType()); //$NON-NLS-1$
} catch (IOException e) {
if (errorHandler != null)
errorHandler.handleException("gtasks-sync-io", e, e.getMessage()); //$NON-NLS-1$
errorHandler.handleException("gtasks-sync-io", e, e.toString()); //$NON-NLS-1$
}
}

Loading…
Cancel
Save