From 962f1e7d0afbf4edded50ad3b01dade7090092a0 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Tue, 16 Apr 2013 13:55:52 -0700 Subject: [PATCH] Catch error causing a crash for a couple users, code cleanup --- .../plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java | 3 --- .../com/todoroo/astrid/actfm/sync/ActFmSyncThread.java | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java index 9a2846fac..27cc56973 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java @@ -455,10 +455,7 @@ public class TagViewFragment extends TaskListFragment { ActFmSyncThread.getInstance().repopulateQueueFromOutstandingTables(); ActFmSyncThread.getInstance().enqueueMessage(new BriefMe(Task.class, null, tagData.getValue(TagData.TASKS_PUSHED_AT), BriefMe.TAG_ID_KEY, tagData.getUuid()), callback); ActFmSyncThread.getInstance().enqueueMessage(new BriefMe(TagData.class, tagData.getUuid(), tagData.getValue(TagData.PUSHED_AT)), callback); -// ActFmSyncThread.getInstance().enqueueMessage(new BriefMe(UserActivity.class, null, tagData.getValue(TagData.USER_ACTIVITIES_PUSHED_AT), BriefMe.TAG_ID_KEY, tagData.getUuid()), callback); ActFmSyncThread.getInstance().enqueueMessage(new BriefMe(TaskListMetadata.class, null, tagData.getValue(TagData.METADATA_PUSHED_AT), BriefMe.TAG_ID_KEY, tagData.getUuid()), callback); -// new FetchHistory(tagDataDao, TagData.HISTORY_FETCH_DATE, TagData.HISTORY_HAS_MORE, NameMaps.TABLE_ID_TAGS, -// tagData.getUuid(), null, tagData.getValue(TagData.HISTORY_FETCH_DATE), 0, true, null).execute(); } } diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java index 75d5563e8..9e5799f2c 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncThread.java @@ -491,7 +491,9 @@ public class ActFmSyncThread { notificationManager.notify(0, builder.getNotification()); notificationId = 0; } catch (Exception e) { - e.printStackTrace(); + Log.e(ERROR_TAG, "Exception creating notification", e); //$NON-NLS-1$ + } catch (Error e) { + Log.e(ERROR_TAG, "Error creating notification", e); //$NON-NLS-1$ } }