mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
only consider device sleep when isPowerSaving enabled
(cherry picked from commit bcc46f36e6)
This commit is contained in:
parent
8b13961b83
commit
de2b87557b
1 changed files with 3 additions and 1 deletions
|
|
@ -1203,8 +1203,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue