From b8949abaca4eb6c7949af48732e11bcdf5244797 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 25 Mar 2011 15:56:25 +1100 Subject: [PATCH] Kill some now-dead and duplicate code --- src/com/fsck/k9/activity/Accounts.java | 30 ++++++++++++++++++ src/com/fsck/k9/activity/FolderList.java | 11 ------- src/com/fsck/k9/activity/K9Activity.java | 32 -------------------- src/com/fsck/k9/activity/K9ListActivity.java | 32 -------------------- src/com/fsck/k9/activity/MessageList.java | 12 -------- 5 files changed, 30 insertions(+), 87 deletions(-) diff --git a/src/com/fsck/k9/activity/Accounts.java b/src/com/fsck/k9/activity/Accounts.java index 550213868..3662fd748 100644 --- a/src/com/fsck/k9/activity/Accounts.java +++ b/src/com/fsck/k9/activity/Accounts.java @@ -1112,4 +1112,34 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC } + public void onExport(final Account account) { + ExportHelper.exportSettings(this, account, new ExportListener() { + + @Override + public void canceled() { + setProgress(false); + } + + @Override + public void failure(String message, Exception e) { + setProgress(false); + } + + @Override + public void started() { + setProgress(true); + } + + @Override + public void success(String fileName) { + setProgress(false); + } + + @Override + public void success() { + setProgress(false); + } + }); + } + } diff --git a/src/com/fsck/k9/activity/FolderList.java b/src/com/fsck/k9/activity/FolderList.java index e1da2a781..61c38969d 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -151,9 +151,6 @@ public class FolderList extends K9ListActivity { } } - public void setProgress(boolean progress) { - mHandler.progress(progress); - } /** * This class is responsible for reloading the list of local messages for a @@ -543,14 +540,6 @@ public class FolderList extends K9ListActivity { return true; - case R.id.export: - onExport(mAccount); - return true; - - case R.id.export_all: - onExport(null); - return true; - case R.id.display_1st_class: { setDisplayMode(FolderMode.FIRST_CLASS); return true; diff --git a/src/com/fsck/k9/activity/K9Activity.java b/src/com/fsck/k9/activity/K9Activity.java index 2a90801b7..3997f1608 100644 --- a/src/com/fsck/k9/activity/K9Activity.java +++ b/src/com/fsck/k9/activity/K9Activity.java @@ -163,37 +163,5 @@ public class K9Activity extends Activity { return false; } } - public void setProgress(boolean progress) { - } - - public void onExport(final Account account) { - ExportHelper.exportSettings(this, account, new ExportListener() { - - @Override - public void canceled() { - setProgress(false); - } - - @Override - public void failure(String message, Exception e) { - setProgress(false); - } - - @Override - public void started() { - setProgress(true); - } - - @Override - public void success(String fileName) { - setProgress(false); - } - - @Override - public void success() { - setProgress(false); - } - }); - } } diff --git a/src/com/fsck/k9/activity/K9ListActivity.java b/src/com/fsck/k9/activity/K9ListActivity.java index 5b99ac22b..c63781c82 100644 --- a/src/com/fsck/k9/activity/K9ListActivity.java +++ b/src/com/fsck/k9/activity/K9ListActivity.java @@ -90,37 +90,5 @@ public class K9ListActivity extends ListActivity { return super.onKeyUp(keyCode, event); } - public void setProgress(boolean progress) { - } - - public void onExport(final Account account) { - ExportHelper.exportSettings(this, account, new ExportListener() { - - @Override - public void canceled() { - setProgress(false); - } - - @Override - public void failure(String message, Exception e) { - setProgress(false); - } - - @Override - public void started() { - setProgress(true); - } - - @Override - public void success(String fileName) { - setProgress(false); - } - - @Override - public void success() { - setProgress(false); - } - }); - } } diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 971a0e57d..3627a9efe 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -519,10 +519,6 @@ public class MessageList } } - public void setProgress(boolean progress) { - mHandler.progress(progress); - } - public static void actionHandleFolder(Context context, Account account, String folder) { Intent intent = actionHandleFolderIntent(context, account, folder); context.startActivity(intent); @@ -1401,14 +1397,6 @@ public class MessageList onEditPrefs(); return true; } - case R.id.export: { - onExport(mAccount); - return true; - } - case R.id.export_all: { - onExport(null); - return true; - } } if (mQueryString != null) {