Remember connection state (so you don't have to start a full node whenever you lost your WiFi connection)

This commit is contained in:
2017-05-07 13:39:30 +02:00
parent 5bc1bc2a47
commit 422c7ac803
9 changed files with 37 additions and 27 deletions

View File

@ -57,6 +57,7 @@ public class BitmessageIntentService extends IntentService {
}
if (intent.hasExtra(EXTRA_STARTUP_NODE)) {
if (Preferences.isConnectionAllowed(this)) {
Preferences.setFullNodeActive(this, true);
startService(new Intent(this, BitmessageService.class));
updateNodeSwitch();
} else {
@ -67,6 +68,7 @@ public class BitmessageIntentService extends IntentService {
}
}
if (intent.hasExtra(EXTRA_SHUTDOWN_NODE)) {
Preferences.setFullNodeActive(this, false);
stopService(new Intent(this, BitmessageService.class));
}
}