Devices lose wifi connectivity despite doze exemption, foreground service and wake lock
Two overnight tests with the Snooze app showed that several devices lost wifi connectivity despite the app being exempt from doze, running a foreground service, and holding a wake lock that prevented deep sleep.
The app was also holding a wifi lock with WIFI_MODE_FULL, which Briar doesn't do. But this lock mode doesn't do anything on API >= 29.
In the first test, the following devices remained connected:
- Huawei Y6P (with app launch workaround) y6p.log
- OnePlus 5T oneplus-5t.log
- Pixel 2 pixel-2.log
- Redmi Note 7 (with app locked to recent apps list) redmi-note-7.log
- Samsung Galaxy A10s a10s.log
The following devices lost connectivity in the first test:
- Honor 8A (with app launch workaround): lost connectivity after entering doze, didn't regain it honor-8a.log
- Nokia 1.3: lost connectivity less than 3 minutes after screen was turned off, before entering doze, didn't regain it nokia-1.3.log
In the second test, the following device remained connected:
- OnePlus 5T oneplus-5t.log
- Pixel 2 pixel-2.log
- Redmi Note 7 (with app locked to recent apps list) redmi-note-7.log
The following devices lost connectivity in the second test:
- Honor 8A (with app launch workaround): lost connectivity after entering doze, didn't regain it honor-8a.log
- Huawei Y6P (with app launch workaround): lost connectivity after entering doze, didn't regain it y6p.log
- Nokia 1.3: lost connectiivty less than 3 minutes after the screen was turned off, didn't regain it nokia-1.3.log
- Samsung Galaxy A10s: lost connectivity about 7 hours into the test, after entering and leaving doze several times, and didn't regain it a10s.log
These findings were originally reported here and here. I copied them to their own ticket because the problem is different from #1737 and affects more devices.