5
0
mirror of https://github.com/cwinfo/envayasms.git synced 2024-11-09 10:20:25 +00:00

launching Main activity on boot is no longer necessary

This commit is contained in:
Jesse Young 2011-09-15 18:42:40 -07:00
parent 46710c24a7
commit 60d49414e1
4 changed files with 3 additions and 23 deletions

View File

@ -36,13 +36,6 @@
android:entryValues="@array/check_intervals_values" android:entryValues="@array/check_intervals_values"
></ListPreference> ></ListPreference>
<CheckBoxPreference
android:key="launch_on_boot"
android:title="Launch automatically?"
android:summaryOff="KalSMS will not open when phone boots (but will still forward SMS)"
android:summaryOn="KalSMS will open when phone boots"
></CheckBoxPreference>
<CheckBoxPreference <CheckBoxPreference
android:key="keep_in_inbox" android:key="keep_in_inbox"
android:title="Keep new messages?" android:title="Keep new messages?"

View File

@ -103,10 +103,6 @@ public final class App extends Application {
return Integer.parseInt(getSettings().getString("outgoing_interval", "0")); return Integer.parseInt(getSettings().getString("outgoing_interval", "0"));
} }
public boolean getLaunchOnBoot() {
return getSettings().getBoolean("launch_on_boot", false);
}
public boolean isEnabled() public boolean isEnabled()
{ {
return getSettings().getBoolean("enabled", false); return getSettings().getBoolean("enabled", false);

View File

@ -5,7 +5,6 @@ import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import org.envaya.kalsms.App; import org.envaya.kalsms.App;
import org.envaya.kalsms.ui.Main;
public class BootReceiver extends BroadcastReceiver { public class BootReceiver extends BroadcastReceiver {
@ -19,12 +18,5 @@ public class BootReceiver extends BroadcastReceiver {
} }
app.setOutgoingMessageAlarm(); app.setOutgoingMessageAlarm();
if (app.getLaunchOnBoot())
{
Intent i = new Intent(context, Main.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
} }
} }

View File

@ -1,7 +1,6 @@
package org.envaya.kalsms.task; package org.envaya.kalsms.task;
import org.envaya.kalsms.task.HttpTask;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.message.BasicNameValuePair; import org.apache.http.message.BasicNameValuePair;
import org.envaya.kalsms.App; import org.envaya.kalsms.App;