diff --git a/_vendors-content/sony/dev.md b/_vendors-content/sony/dev.md index 816deca3..0b80a30b 100644 --- a/_vendors-content/sony/dev.md +++ b/_vendors-content/sony/dev.md @@ -4,3 +4,14 @@ manufacturer: --- +For newer Android versions, check for Battery Saver mode, which for Sony devices is rebranded as STAMINA mode. There is no way to detect if "Prefer battery time" is set, but if your app's notifications don't show up or SurfaceFlinger is at a lower framerate than usual, it's probably on. Alarms are not killed either way, but users can (and some will) deprive your app of the permission to set these alarms in the first place. + +For older Android versions, there is no workaround to prevent background process optimizations in STAMINA mode, but apps can detect whether it's enabled with the following code: + +```java +if (Build.MANUFACTURER.equals("sony") && android.provider.Settings.Secure.getInt(context.getContentResolver(), "somc.stamina_mode", 0) > 0) { + // show warning +} +``` + +The problem is this will only tell if Stamina is enabled, but not if it is currently applied, but we can assume it is when not charged and battery is under X%. (TBS) diff --git a/_vendors-content/sony/explanation.md b/_vendors-content/sony/explanation.md index a9da93b4..7eb9a0fe 100644 --- a/_vendors-content/sony/explanation.md +++ b/_vendors-content/sony/explanation.md @@ -4,7 +4,6 @@ manufacturer: --- -Sony gets a high bar in our listing of toxic Android vendors, as historically Sony introduced the first very effective non-standard background process optimization and opened Pandora's box. +For recent Android versions on Sony devices, AOSP's Battery saver mode is rebranded as **STAMINA mode**. If left on default settings, it behaves close to AOSP, but there is an additional opt-in setting under STAMINA mode called **Prefer battery time** which will have more aggressive limitations on background activity. - -It is called **Stamina mode**, and it instantly breaks all background processes and all alarms if enabled. +For older devices, Sony gets a high bar in our listing of toxic Android vendors, as historically Sony introduced the first very effective non-standard background process optimization and opened Pandora's box. STAMINA mode on their older devices instantly breaks all background processes and all alarms if enabled. diff --git a/_vendors-content/sony/user.md b/_vendors-content/sony/user.md index 1793f113..9d5e7620 100644 --- a/_vendors-content/sony/user.md +++ b/_vendors-content/sony/user.md @@ -4,10 +4,13 @@ manufacturer: --- +## STAMINA mode -## Stamina mode +### "Prefer battery time" -Never use Stamina mode if you want your device to do something useful when not actively using it. Despite the official description, it does not affect only mobile data and WiFi, it also terminuates any background processes. +Newer Android versions on Sony devices have an extra "STAMINA level" setting under STAMINA mode. Avoid setting it to "Prefer battery time" if you need AOSP behaviour. + +For older Android versions, never use STAMINA mode if you want your device to do something useful when not actively using it. Despite the official description, it does not affect only mobile data and WiFi, it also terminuates any background processes. Stamine mode can be found (and disabled) at either *Battery* section or *Power management* section.