Open bengtan opened 4 years ago
Ideas for partial mitigation:
Samsung seems to have a default whitelist of popular apps (ie. Life360) which are not subject to battery restrictions/sleep. We could attempt to contact Samsung and apply to be added to the whitelist. But they could just ignore us.
The app could try to detect when it is under battery restrictions and ask the user to remove the restrictions. Maybe this is something that could be done as part of onboarding?
I found the Samsung battery (non-)optimisation whitelist. See below.
I extracted an app called SmartManager_v5 from a Sept/Oct 2019 firmware of a Galaxy S10 and extracted a file res/values/arrays.xml
from the app.
If you download it and rename it back to an .xml extension, you can view it in a browser or xml viewer and be able to expand/collapse the subcategories.
Notice:
<string-array name="default_whitelist">
...
<item>com.life360.android.note4</item>
<item>com.life360.android.s6</item>
<item>com.life360.android.safetymapd</item>
...
</string-array>
<string-array name="exclude_from_spcm">
...
<item>com.life360.android.safetymapd</item>
<item>com.life360.android.note4</item>
<item>com.life360.android.s6</item>
...
</string-array>
around lines 78-80 and 872-878. There are about 300 apps in default_whitelist and about 250 apps in exclude_from_spcm (I have no idea what exclude_from_spcm means).
This was first encountered by QA and testers on Samsung android devices. The symptom is that location data points are not uploaded when expected. This occurs at random and unpredictable times. Hence, our location based services don't work properly due to the lack of reliable data points.
Upon investigation, it appears that this has been (crowd-sourced and) documented:
(and many more places throughout the internet)
It affects not just Samsung devices, but the majority of android devices, albeit in different ways.
Trying to mitigate or solve this is going to require investigation, discussion, and (probably) multiple sub-tickets/tasks.