From 60d49414e1be0bd1b21f262d8b27710e2f1fa878 Mon Sep 17 00:00:00 2001 From: Jesse Young Date: Thu, 15 Sep 2011 18:42:40 -0700 Subject: [PATCH] launching Main activity on boot is no longer necessary --- res/xml/prefs.xml | 9 +-------- src/org/envaya/kalsms/App.java | 4 ---- src/org/envaya/kalsms/receiver/BootReceiver.java | 12 ++---------- src/org/envaya/kalsms/task/PollerTask.java | 1 - 4 files changed, 3 insertions(+), 23 deletions(-) diff --git a/res/xml/prefs.xml b/res/xml/prefs.xml index 3005176..68d0d66 100755 --- a/res/xml/prefs.xml +++ b/res/xml/prefs.xml @@ -36,17 +36,10 @@ android:entryValues="@array/check_intervals_values" > - - + > \ No newline at end of file diff --git a/src/org/envaya/kalsms/App.java b/src/org/envaya/kalsms/App.java index a9410c6..aebcad5 100755 --- a/src/org/envaya/kalsms/App.java +++ b/src/org/envaya/kalsms/App.java @@ -103,10 +103,6 @@ public final class App extends Application { return Integer.parseInt(getSettings().getString("outgoing_interval", "0")); } - public boolean getLaunchOnBoot() { - return getSettings().getBoolean("launch_on_boot", false); - } - public boolean isEnabled() { return getSettings().getBoolean("enabled", false); diff --git a/src/org/envaya/kalsms/receiver/BootReceiver.java b/src/org/envaya/kalsms/receiver/BootReceiver.java index 8e2e8da..4c3c527 100755 --- a/src/org/envaya/kalsms/receiver/BootReceiver.java +++ b/src/org/envaya/kalsms/receiver/BootReceiver.java @@ -5,7 +5,6 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import org.envaya.kalsms.App; -import org.envaya.kalsms.ui.Main; public class BootReceiver extends BroadcastReceiver { @@ -17,14 +16,7 @@ public class BootReceiver extends BroadcastReceiver { { return; } - - app.setOutgoingMessageAlarm(); - - if (app.getLaunchOnBoot()) - { - Intent i = new Intent(context, Main.class); - i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - context.startActivity(i); - } + + app.setOutgoingMessageAlarm(); } } diff --git a/src/org/envaya/kalsms/task/PollerTask.java b/src/org/envaya/kalsms/task/PollerTask.java index 611161d..78fa752 100755 --- a/src/org/envaya/kalsms/task/PollerTask.java +++ b/src/org/envaya/kalsms/task/PollerTask.java @@ -1,7 +1,6 @@ package org.envaya.kalsms.task; -import org.envaya.kalsms.task.HttpTask; import org.apache.http.HttpResponse; import org.apache.http.message.BasicNameValuePair; import org.envaya.kalsms.App;