diff --git a/reopen-mailbox-after-device-goes-to-sleep.md b/reopen-mailbox-after-device-goes-to-sleep.md index dc2bd83..56fff42 100644 --- a/reopen-mailbox-after-device-goes-to-sleep.md +++ b/reopen-mailbox-after-device-goes-to-sleep.md @@ -25,7 +25,7 @@ adb shell dumpsys deviceidle force-idle adb shell dumpsys deviceidle unforce -if permission is denied, it could be because the USB debugging is off for the device +if permission is denied, it could be because the USB debugging is off for the device ie the Android Studio doesn't have the phone's permission to access it To see if connection to device is OK, type in > ./adb devices (on mac) and .(backward slash)adb devices on windows? @@ -34,20 +34,36 @@ To see if connection to device is OK, type in > ./adb devices (on mac) and .(bac - enable battery optimization: `adb shell dumpsys deviceidle whitelist -org.briarproject.mailbox` +the output: **Removed: 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. +the output is: **Added: org.briarproject.mailbox** -Steps to execute -- 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? +**Steps to execute ** + +- adb shell dumpsys deviceidle whitelist -org.briarproject.mailbox +output is - **Removed: org.briarproject.mailbox** +- adb shell dumpsys deviceidle unforce +- open mailbox app and let it start to status screen for example +- switch to a different app +- adb shell dumpsys deviceidle force-idle +- switch back to mailbox app +- dialog should appear then + +With the above steps whilst the mailbox is running in the background, I have reproduced the dialogue box saying that mailbox is not able to run in the background, and showing the two buttons Cancel and Fix. + +Once the dialogue box appeared after the 'unforce' step, and once after the 'force-idle' step. + +What should happen after the user taps on Fix, is that do-not-kill-me fragment should be shown to the user. However, what should the notifications say at this pont? + +The notification icon stays there all the time - but to check what notifications themselves say... and what they should be saying + +At the moment notifications say Briar Mailbox running - this will need to be adapted to the more appropriate message if the mailbox is not able to run in the background [Back to Testing](https://code.briarproject.org/briar/briar/-/wikis/testing) \ No newline at end of file