From 56492a8987e9d0a27f6ea807c0bcde5812285f0b Mon Sep 17 00:00:00 2001 From: Tim Su Date: Fri, 8 Oct 2010 11:30:05 -0700 Subject: [PATCH] just reformatting --- .../astrid/activity/ShortcutActivity.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/ShortcutActivity.java b/astrid/src/com/todoroo/astrid/activity/ShortcutActivity.java index 6be91578d..eac7c5064 100644 --- a/astrid/src/com/todoroo/astrid/activity/ShortcutActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/ShortcutActivity.java @@ -124,7 +124,6 @@ public class ShortcutActivity extends Activity { startActivity(taskListIntent); } - finish(); } @@ -132,25 +131,28 @@ public class ShortcutActivity extends Activity { Intent shortcutIntent = new Intent(ContextManager.getContext(), ShortcutActivity.class); - shortcutIntent.setAction(Intent.ACTION_VIEW); - shortcutIntent.putExtra(ShortcutActivity.TOKEN_FILTER_TITLE, filter.title); - shortcutIntent.putExtra(ShortcutActivity.TOKEN_FILTER_SQL, filter.sqlQuery); - if(filter.valuesForNewTasks != null) { - for(Entry item : filter.valuesForNewTasks.valueSet()) { + shortcutIntent.setAction(Intent.ACTION_VIEW); + shortcutIntent.putExtra(ShortcutActivity.TOKEN_FILTER_TITLE, + filter.title); + shortcutIntent.putExtra(ShortcutActivity.TOKEN_FILTER_SQL, + filter.sqlQuery); + if (filter.valuesForNewTasks != null) { + for (Entry item : filter.valuesForNewTasks.valueSet()) { String key = TOKEN_FILTER_VALUES_ITEM + item.getKey(); Object value = item.getValue(); // assume one of the big 4... - if(value instanceof String) + if (value instanceof String) shortcutIntent.putExtra(key, (String) value); - else if(value instanceof Integer) + else if (value instanceof Integer) shortcutIntent.putExtra(key, (Integer) value); - else if(value instanceof Double) + else if (value instanceof Double) shortcutIntent.putExtra(key, (Double) value); - else if(value instanceof Long) + else if (value instanceof Long) shortcutIntent.putExtra(key, (Long) value); else - throw new IllegalStateException("Unsupported bundle type " + value.getClass()); //$NON-NLS-1$ + throw new IllegalStateException( + "Unsupported bundle type " + value.getClass()); //$NON-NLS-1$ } } return shortcutIntent;