From: Yuji Konishi Date: Tue, 17 Apr 2012 08:57:01 +0000 (+0900) Subject: T28117 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=431924585314fb9999d77603dbc4fed8f31732c4;p=everclip%2Fsource.git T28117 --- diff --git a/workspace/EverClip/src/com/yuji/ec/task/NoteTypeListTask.java b/workspace/EverClip/src/com/yuji/ec/task/NoteTypeListTask.java index 6193298..c16515e 100644 --- a/workspace/EverClip/src/com/yuji/ec/task/NoteTypeListTask.java +++ b/workspace/EverClip/src/com/yuji/ec/task/NoteTypeListTask.java @@ -13,13 +13,13 @@ import com.yuji.ec.utility.EvernoteUtil; public class NoteTypeListTask implements AsyncTaskIF { private EvernoteUtil util = EvernoteUtil.getInstance(); - //private NoteList noteList; + // private NoteList noteList; private WeakReference activityRef; private EvernoteUtil.Error errorCode = null; private List list = null; private int noteItemType; - + public NoteTypeListTask(NoteTypeListActivity activity, int noteItemType) { activityRef = new WeakReference(activity); this.noteItemType = noteItemType; @@ -29,14 +29,18 @@ public class NoteTypeListTask implements AsyncTaskIF { synchronized (util) { try { EvernoteUtil util = EvernoteUtil.getInstance(); - switch (noteItemType){ + switch (noteItemType) { case Constant.NOTE_ITEM_TYPE_NOTE_BOOK: List noteList = util.getNoteBookList(); - list = util.toNoteItemFromNoteBook(noteList); + if (noteList != null) { + list = util.toNoteItemFromNoteBook(noteList); + } break; case Constant.NOTE_ITEM_TYPE_TAG: List tagList = util.getTagList(); - list = util.toNoteItemFromTag(tagList); + if (tagList != null) { + list = util.toNoteItemFromTag(tagList); + } break; default: break; @@ -63,9 +67,9 @@ public class NoteTypeListTask implements AsyncTaskIF { return 0; } -// public NoteList getNoteList() { -// return noteList; -// } + // public NoteList getNoteList() { + // return noteList; + // } public EvernoteUtil.Error getErrorCode() { return errorCode;