5
0
mirror of https://github.com/cwinfo/envayasms.git synced 2024-11-08 18:00:27 +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,17 +36,10 @@
android:entryValues="@array/check_intervals_values"
></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
android:key="keep_in_inbox"
android:title="Keep new messages?"
android:summaryOff="Incoming SMS will not be stored in Messaging inbox"
android:summaryOn="Incoming SMS will be stored in Messaging inbox"
></CheckBoxPreference>
></CheckBoxPreference>
</PreferenceScreen>

View File

@ -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);

View File

@ -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();
}
}

View File

@ -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;