summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EIP.java2
-rw-r--r--src/se/leap/bitmaskclient/OnBootReceiver.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EIP.java b/app/src/main/java/se/leap/bitmaskclient/EIP.java
index 49243ffc..31a06d96 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EIP.java
@@ -263,7 +263,7 @@ public final class EIP extends IntentService {
resultData.putString(REQUEST_TAG, ACTION_STOP_EIP);
mReceiver.send(Activity.RESULT_OK, resultData);
}
- getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).edit().putBoolean(Dashboard.START_ON_BOOT, false).commit();
+ getSharedPreferences(Dashboard.SHARED_PREFERENCES, MODE_PRIVATE).edit().remove(Dashboard.START_ON_BOOT).commit();
}
/**
diff --git a/src/se/leap/bitmaskclient/OnBootReceiver.java b/src/se/leap/bitmaskclient/OnBootReceiver.java
index 6d1dad79..3e87c308 100644
--- a/src/se/leap/bitmaskclient/OnBootReceiver.java
+++ b/src/se/leap/bitmaskclient/OnBootReceiver.java
@@ -12,7 +12,7 @@ public class OnBootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
- if (!context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, Context.MODE_PRIVATE).getString(Provider.KEY, "").isEmpty()) {
+ if (!context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, Context.MODE_PRIVATE).getString(Provider.KEY, "").isEmpty() && context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, Context.MODE_PRIVATE).getBoolean(Dashboard.START_ON_BOOT, false)) {
Intent dashboard_intent = new Intent(context, Dashboard.class);
dashboard_intent.setAction(EIP.ACTION_START_EIP);
dashboard_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);