瀏覽代碼

Fix #2753 "Unresponsive App" error popup when syncing

Always start SyncFolderOperations as background services to prevent
ANRs when they take a little more time to complete.

Signed-off-by: Sebastian-Ion TINCU <5282265+siebica@users.noreply.github.com>
Sebastian-Ion TINCU 5 年之前
父節點
當前提交
531c0187a8
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java

+ 1 - 5
src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java

@@ -494,11 +494,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
         intent.setAction(OperationsService.ACTION_SYNC_FOLDER);
         intent.putExtra(OperationsService.EXTRA_ACCOUNT, mAccount);
         intent.putExtra(OperationsService.EXTRA_REMOTE_PATH, path);
-        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
-            mContext.startForegroundService(intent);
-        } else {
-            mContext.startService(intent);
-        }
+        mContext.startService(intent);
     }
 
     public String getRemotePath() {