瀏覽代碼

Merge pull request #3249 from nextcloud/wakelockTimeout

use suggested timeout of 10min
Andy Scherzinger 6 年之前
父節點
當前提交
c29fddfc7e

+ 1 - 1
scripts/analysis/lint-results.txt

@@ -1,2 +1,2 @@
 DO NOT TOUCH; GENERATED BY DRONE
-      <span class="mdl-layout-title">Lint Report: 95 warnings</span>
+      <span class="mdl-layout-title">Lint Report: 93 warnings</span>

+ 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(