Browse Source

use suggested timeout of 10min

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 6 years ago
parent
commit
85170d2389

+ 1 - 1
src/main/java/com/owncloud/android/jobs/FilesSyncJob.java

@@ -80,7 +80,7 @@ public class FilesSyncJob extends Job {
             PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
             wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, MainApp.getAuthority() +
                     WAKELOCK_TAG_SEPARATION + TAG);
-            wakeLock.acquire();
+            wakeLock.acquire(10 * 60 * 1000);
         }
 
         PersistableBundleCompat bundle = params.getExtras();

+ 1 - 1
src/main/java/com/owncloud/android/jobs/OfflineSyncJob.java

@@ -72,7 +72,7 @@ public class OfflineSyncJob extends Job {
                 PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
                 wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, MainApp.getAuthority() +
                         WAKELOCK_TAG_SEPARATION + TAG);
-                wakeLock.acquire();
+                wakeLock.acquire(10 * 60 * 1000);
             }
 
             Cursor cursorOnKeptInSync = context.getContentResolver().query(