mirror of
https://github.com/cwinfo/envayasms.git
synced 2024-12-04 12:35:32 +00:00
launching Main activity on boot is no longer necessary
This commit is contained in:
parent
46710c24a7
commit
60d49414e1
@ -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>
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user