Permalink
Browse files

Code tidy up.

  • Loading branch information...
1 parent 34052a4 commit 9283177532890065ed31aed2c509c9d29964978b @leenookx committed Feb 25, 2011
Showing with 7 additions and 14 deletions.
  1. +7 −14 src/uk/co/purplemonkeys/spengler/SpengDroid.java
@@ -1,8 +1,11 @@
package uk.co.purplemonkeys.spengler;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
import uk.co.purplemonkeys.common.Common;
import uk.co.purplemonkeys.spengler.articlefeed.ArticlesList;
-import uk.co.purplemonkeys.spengler.providers.Article.Articles;
import uk.co.purplemonkeys.spengler.tasks.FeedUpdaterTask;
import android.app.TabActivity;
import android.content.Intent;
@@ -16,25 +19,14 @@
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.ListView;
import android.widget.TabHost;
public class SpengDroid extends TabActivity
{
private final static String TAG = "SpengDroid";
private SharedPreferences preferences;
private String version_info;
- private ArrayAdapter<String> adapter = null;
- private ListView listView;
- private Button goButton;
- private String[] PROJECTION = new String[]
- {
- Articles._ID,
- Articles.TITLE,
- Articles.PAGE_URL
- };
+ private ScheduledExecutorService ex = null;
/** Called when the activity is first created. */
@Override
@@ -75,7 +67,8 @@ public void onCreate(Bundle savedInstanceState)
// Update the RSS feed when we start the application (assuming
// the current update preference setting is not 'Never'.
- if (preferences.getInt("rss_update_rate", 0) > 0)
+ int RSSUpdateRate = preferences.getInt("rss_update_rate", 0);
+ if (RSSUpdateRate > 0)
{
new FeedUpdaterTask( this ).execute();
}

0 comments on commit 9283177

Please sign in to comment.