Merge pull request #99 from StingerAJ/111014_aj_bugfix_fc_purgetasks

Potential fix for fb-77 as I cant reproduce this bug.
pull/14/head
sbosley 14 years ago
commit 45705cf0fe

@ -36,6 +36,8 @@ public class OldTaskPreferences extends TodorooPreferenceActivity {
@Autowired private TaskService taskService; @Autowired private TaskService taskService;
@Autowired private MetadataService metadataService; @Autowired private MetadataService metadataService;
ProgressDialog pd;
@Override @Override
public int getPreferenceResource() { public int getPreferenceResource() {
return R.xml.preferences_oldtasks; return R.xml.preferences_oldtasks;
@ -65,6 +67,17 @@ public class OldTaskPreferences extends TodorooPreferenceActivity {
}); });
} }
/* (non-Javadoc)
* @see android.app.Activity#onPause()
*/
@Override
protected void onPause() {
if (pd != null)
pd.dismiss();
super.onPause();
}
/** Show the dialog to delete completed tasks */ /** Show the dialog to delete completed tasks */
private void showDeleteCompletedDialog() { private void showDeleteCompletedDialog() {
DialogUtilities.okCancelDialog( DialogUtilities.okCancelDialog(
@ -142,7 +155,7 @@ public class OldTaskPreferences extends TodorooPreferenceActivity {
/** Run runnable with progress dialog */ /** Run runnable with progress dialog */
protected void runWithDialog(final Runnable runnable) { protected void runWithDialog(final Runnable runnable) {
final ProgressDialog pd = DialogUtilities.progressDialog(this, getString(R.string.DLG_please_wait)); pd = DialogUtilities.progressDialog(this, getString(R.string.DLG_please_wait));
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {

Loading…
Cancel
Save