mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-16 21:06:40 -04:00
only consider device sleep when isPowerSaving enabled
This commit is contained in:
@@ -1225,8 +1225,10 @@ class MeshService : Service(), Logging {
|
||||
when (intent.action) {
|
||||
RadioInterfaceService.RADIO_CONNECTED_ACTION -> {
|
||||
try {
|
||||
// sleep now disabled by default on ESP32, permanent is true unless isPowerSaving enabled
|
||||
val lsEnabled = radioConfig?.preferences?.isPowerSaving ?: false
|
||||
val connected = intent.getBooleanExtra(EXTRA_CONNECTED, false)
|
||||
val permanent = intent.getBooleanExtra(EXTRA_PERMANENT, false)
|
||||
val permanent = intent.getBooleanExtra(EXTRA_PERMANENT, false) || !lsEnabled
|
||||
onConnectionChanged(
|
||||
when {
|
||||
connected -> ConnectionState.CONNECTED
|
||||
|
||||
Reference in New Issue
Block a user