This change adds handling for uploads from device when it is operating in power save mode and is a fix for #1277. In those case, uploads are behaving similar as if upload requires Wi-Fi (or that device needs to be charging) and those conditions are not met - they are delayed until device exits power save mode. Same thing holds true for contacts backup and explicit uploads - they are not delayed. Difference with Wi-Fi (and charging) conditions is in that 1) this delay cannot be set per synced folder and 2) it is turned on by default. For devices that don't have this capability (API level < 21) - old behavior (backward-compatible) is used; they behave as this check is not present.
Jobs for file uploads are skipped if they are executing during power save mode. Only exception to this is when user is doing "force resync" which will continue even in power save mode.
Also added is listener for power save mode, albeit it makes sense only if user explicitly turns off power save mode while it is in it, as putting device to be charged will restart all jobs already by design (another listener that already exists).
This change makes select/deselect menu items invisible on fragments where they should be invisible. To do this, first was needed to "split" two different "select all" actions into different ones, so they are not overlapped. For that, one of them was changed from "action_select_all" to "action_select_all_action_menu". Second, in method filter() that decides which menu items are visible, "inSingleFileFragment" bool is pushed. This is how we decide are we under some listing, or showing single file (either details or any preview fragment).
This change makes select/deselect menu items invisible on fragments where they should be invisible. To do this, first was needed to "split" two different "select all" actions into different ones, so they are not overlapped. For that, one of them was changed from "action_select_all" to "action_select_all_action_menu". Second, in method filter() that decides which menu items are visible, "inSingleFileFragment" bool is pushed. This is how we decide are we under some listing, or showing single file (either details or any preview fragment).
This change makes select/deselect menu items invisible on fragments where they should be invisible. To do this, first was needed to "split" two different "select all" actions into different ones, so they are not overlapped. For that, one of them was changed from "action_select_all" to "action_select_all_action_menu". Second, in method filter() that decides which menu items are visible, "inSingleFileFragment" bool is pushed. This is how we decide are we under some listing, or showing single file (either details or any preview fragment).