Skip to content

NextCloud remains in "powersave" mode while being whitelisted with Power Manager on Samsung S7 #2889

Description

@sgurder

Actual behaviour

Nextcloud app was added to "Unmonitored Apps" and in "Optimise Battery Usage" the app is listed with a gray button (=should be ignored). Power saving mode is on (permanently).

New files do not seem to be detected, "force rescan" needed to detect new file. Upload queue items (created through a forced rescan) remain in "Waiting to exit power save mode" even when (creating a new file while) charging.

This might be due to PowerUtils.java only containing a check for PowerManager.isPowerSaveMode without checking if PowerManager.isIgnoringBatteryOptimizations is true. I'm not an Android developer, I only googled around a bit.

Expected behaviour

If the Nextcloud app is whitelisted it should upload while power saving mode is on.

Steps to reproduce

  1. Get a Samsung S7 (only have this device, sorry !)
  2. Enable Power Saving mode: go to "Battery" -> Set "Power Saving Mode" to MID (customised; ensure at least "Background network usage" is enabled, rest can all be off)
  3. Whitelist attempt 1: go to "Battery" -> "Unmonitored apps", add "Nextcloud"
  4. Whitelist attempt 2: go to "Battery" -> "Battery Usage" -> 3 dots -> "Optimise Battery Usage"; ensure "All Apps" are shown; Disable button next to "Nextcloud"
  5. Open Nextcloud (with expert mode on and Screenshot folder autoupload enabled) -> "Uploads", Take screenshot => nothing happens
  6. "Force Rescan" => screenshot will appear in queue with "Waiting to exit power save mode"
  7. Put phone in charger, new screenshot, Force Rescan => same result as 6.
  8. Disable Power Saving mode => Uploads are processed and finish successfully

Environment data

Android version: 8.0.0 (Samsung Experience 9.0)

Device model: SM-G935F

Stock or customized system: Stock

Nextcloud app version: 3.2.1

Nextcloud server version: 13.0.5

Logs

Web server error log

I didn't attach this as I believe it's purely on the Android side.

Nextcloud log (data/nextcloud.log)

I didn't attach this as I believe it's purely on the Android side.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions