From c95e93efbc220aaa207409e897e6b6da47c23cf8 Mon Sep 17 00:00:00 2001 From: Ivana Date: Tue, 26 Jul 2022 18:42:54 +0000 Subject: [PATCH] Update reopen mailbox after device goes to sleep --- reopen-mailbox-after-device-goes-to-sleep.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/reopen-mailbox-after-device-goes-to-sleep.md b/reopen-mailbox-after-device-goes-to-sleep.md index 4edc1fc..dc2bd83 100644 --- a/reopen-mailbox-after-device-goes-to-sleep.md +++ b/reopen-mailbox-after-device-goes-to-sleep.md @@ -21,7 +21,7 @@ To put a device into this Android invoked 'doze', issue this command adb shell dumpsys deviceidle force-idle -(just in case I forget after awhile - adb commands need to be issued from the adb folder, which are in different locations on mac and windowds machines) +(just in case I forget after awhile - adb commands need to be issued from the folder containing adb folder, which are in different locations on mac and windowds machines) adb shell dumpsys deviceidle unforce @@ -29,12 +29,23 @@ if permission is denied, it could be because the USB debugging is off for the de To see if connection to device is OK, type in > ./adb devices (on mac) and .(backward slash)adb devices on windows? +**memo, useful for testing this:** + +- enable battery optimization: + +`adb shell dumpsys deviceidle whitelist -org.briarproject.mailbox` + +- disable battery optimization: + +`adb shell dumpsys deviceidle whitelist +org.briarproject.mailbox` + +Execute the 'force idle' command and then go to the device and start the mailbox. There should be a dialogue box saying: Mailbox cannot run int he background and two buttons on it - Cancel and Fix. If tap on fix, there is a crash - this is what the bug 145 is about. Steps to execute -- install and start th emailbox in the normal way and then allow the mailbox device to go to sleep +- install and start the mailbox in the normal way and then allow the mailbox device to go to sleep - on waking up, there is no dialogue askign the user to swtich off the battery optimisation, because that was already done previously. - however, if we switch the battery optimisation on after installation and linking, and then we allow device to go to sleep, then on waking up... user should see the dialogue box asking them to switch off the battery optimisation?