Skip to content
Open

test bo #15992

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,9 @@ class SyncedFoldersActivity :
*/
private fun checkIfBatteryOptimizationEnabled(): Boolean {
val powerManager = getSystemService(POWER_SERVICE) as PowerManager?
Log_OC.d(TAG, "IS_BATTERY_OPT_RES_1: " + (powerManager == null))
val res = powerManager?.isIgnoringBatteryOptimizations(BuildConfig.APPLICATION_ID)
Log_OC.d(TAG, "IS_BATTERY_OPT_RES_2: $res")
return when {
powerManager != null -> !powerManager.isIgnoringBatteryOptimizations(BuildConfig.APPLICATION_ID)
else -> !appInfo.isDebugBuild
Expand Down
Loading