diff options
Diffstat (limited to 'main/src/cgeo/geocaching/files/FileList.java')
| -rw-r--r-- | main/src/cgeo/geocaching/files/FileList.java | 40 |
1 files changed, 11 insertions, 29 deletions
diff --git a/main/src/cgeo/geocaching/files/FileList.java b/main/src/cgeo/geocaching/files/FileList.java index cef7b89..2fa4e5d 100644 --- a/main/src/cgeo/geocaching/files/FileList.java +++ b/main/src/cgeo/geocaching/files/FileList.java @@ -1,9 +1,9 @@ package cgeo.geocaching.files; import cgeo.geocaching.R; -import cgeo.geocaching.Settings; import cgeo.geocaching.StoredList; import cgeo.geocaching.activity.AbstractListActivity; +import cgeo.geocaching.utils.Log; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.ArrayUtils; @@ -15,7 +15,6 @@ import android.os.Bundle; import android.os.Environment; import android.os.Handler; import android.os.Message; -import android.util.Log; import android.widget.ArrayAdapter; import java.io.File; @@ -64,30 +63,14 @@ public abstract class FileList<T extends ArrayAdapter<File>> extends AbstractLis @Override public void handleMessage(Message msg) { - try { - if (CollectionUtils.isEmpty(files)) { - if (waitDialog != null) { - waitDialog.dismiss(); - } - - showToast(res.getString(R.string.file_list_no_files)); - - finish(); - return; - } else { - if (adapter != null) { - adapter.notifyDataSetChanged(); - } - } - - if (waitDialog != null) { - waitDialog.dismiss(); - } - } catch (Exception e) { - if (waitDialog != null) { - waitDialog.dismiss(); - } - Log.e(Settings.tag, "cgFileList.loadFilesHandler: " + e.toString()); + if (waitDialog != null) { + waitDialog.dismiss(); + } + if (CollectionUtils.isEmpty(files)) { + showToast(res.getString(R.string.file_list_no_files)); + finish(); + } else if (adapter != null) { + adapter.notifyDataSetChanged(); } } }; @@ -188,10 +171,10 @@ public abstract class FileList<T extends ArrayAdapter<File>> extends AbstractLis listDir(list, Environment.getExternalStorageDirectory()); } } else { - Log.w(Settings.tag, "No external media mounted."); + Log.w("No external media mounted."); } } catch (Exception e) { - Log.e(Settings.tag, "cgFileList.loadFiles.run: " + e.toString()); + Log.e("cgFileList.loadFiles.run: " + e.toString()); } changeWaitDialogHandler.sendMessage(Message.obtain(changeWaitDialogHandler, 0, "loaded directories")); @@ -237,7 +220,6 @@ public abstract class FileList<T extends ArrayAdapter<File>> extends AbstractLis } } - return; } /** |
