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:
parent
46710c24a7
commit
60d49414e1
@ -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?"
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user