浏览代码

rename boolean flag

Signed-off-by: alperozturk <alper_ozturk@proton.me>
alperozturk 6 月之前
父节点
当前提交
846b701916

+ 8 - 8
app/src/main/java/com/owncloud/android/operations/SynchronizeFileOperation.java

@@ -46,7 +46,7 @@ public class SynchronizeFileOperation extends SyncOperation {
     private boolean mSyncFileContents;
     private boolean mSyncFileContents;
     private Context mContext;
     private Context mContext;
     private boolean mTransferWasRequested;
     private boolean mTransferWasRequested;
-    private boolean syncForInternalTwoWaySyncWorker;
+    private final boolean syncInBackgroundWorker;
 
 
 
 
     /**
     /**
@@ -77,7 +77,7 @@ public class SynchronizeFileOperation extends SyncOperation {
         boolean syncFileContents,
         boolean syncFileContents,
         Context context,
         Context context,
         FileDataStorageManager storageManager,
         FileDataStorageManager storageManager,
-        boolean syncForInternalTwoWaySyncWorker) {
+        boolean syncInBackgroundWorker) {
         super(storageManager);
         super(storageManager);
 
 
         mRemotePath = remotePath;
         mRemotePath = remotePath;
@@ -87,7 +87,7 @@ public class SynchronizeFileOperation extends SyncOperation {
         mSyncFileContents = syncFileContents;
         mSyncFileContents = syncFileContents;
         mContext = context;
         mContext = context;
         mAllowUploads = true;
         mAllowUploads = true;
-        this.syncForInternalTwoWaySyncWorker = syncForInternalTwoWaySyncWorker;
+        this.syncInBackgroundWorker = syncInBackgroundWorker;
     }
     }
 
 
 
 
@@ -115,7 +115,7 @@ public class SynchronizeFileOperation extends SyncOperation {
         boolean syncFileContents,
         boolean syncFileContents,
         Context context,
         Context context,
         FileDataStorageManager storageManager,
         FileDataStorageManager storageManager,
-        boolean syncForInternalTwoWaySyncWorker) {
+        boolean syncInBackgroundWorker) {
         super(storageManager);
         super(storageManager);
 
 
         mLocalFile = localFile;
         mLocalFile = localFile;
@@ -135,7 +135,7 @@ public class SynchronizeFileOperation extends SyncOperation {
         mSyncFileContents = syncFileContents;
         mSyncFileContents = syncFileContents;
         mContext = context;
         mContext = context;
         mAllowUploads = true;
         mAllowUploads = true;
-        this.syncForInternalTwoWaySyncWorker = syncForInternalTwoWaySyncWorker;
+        this.syncInBackgroundWorker = syncInBackgroundWorker;
     }
     }
 
 
 
 
@@ -166,8 +166,8 @@ public class SynchronizeFileOperation extends SyncOperation {
         boolean allowUploads,
         boolean allowUploads,
         Context context,
         Context context,
         FileDataStorageManager storageManager,
         FileDataStorageManager storageManager,
-        boolean syncForInternalTwoWaySyncWorker) {
-        this(localFile, serverFile, user, syncFileContents, context, storageManager, syncForInternalTwoWaySyncWorker);
+        boolean syncInBackgroundWorker) {
+        this(localFile, serverFile, user, syncFileContents, context, storageManager, syncInBackgroundWorker);
         mAllowUploads = allowUploads;
         mAllowUploads = allowUploads;
     }
     }
 
 
@@ -301,7 +301,7 @@ public class SynchronizeFileOperation extends SyncOperation {
     }
     }
 
 
     private void requestForDownload(OCFile file) {
     private void requestForDownload(OCFile file) {
-        if (syncForInternalTwoWaySyncWorker) {
+        if (syncInBackgroundWorker) {
             Log_OC.d("InternalTwoWaySyncWork", "download file: " + file.getFileName());
             Log_OC.d("InternalTwoWaySyncWork", "download file: " + file.getFileName());
 
 
             try {
             try {

+ 6 - 6
app/src/main/java/com/owncloud/android/operations/SynchronizeFolderOperation.java

@@ -86,7 +86,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
 
 
     private final AtomicBoolean mCancellationRequested;
     private final AtomicBoolean mCancellationRequested;
 
 
-    private final boolean syncForInternalTwoWaySyncWorker;
+    private final boolean syncInBackgroundWorker;
 
 
     /**
     /**
      * Creates a new instance of {@link SynchronizeFolderOperation}.
      * Creates a new instance of {@link SynchronizeFolderOperation}.
@@ -99,7 +99,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
                                       String remotePath,
                                       String remotePath,
                                       User user,
                                       User user,
                                       FileDataStorageManager storageManager,
                                       FileDataStorageManager storageManager,
-                                      boolean syncForInternalTwoWaySyncWorker) {
+                                      boolean syncInBackgroundWorker) {
         super(storageManager);
         super(storageManager);
 
 
         mRemotePath = remotePath;
         mRemotePath = remotePath;
@@ -109,7 +109,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
         mFilesForDirectDownload = new Vector<>();
         mFilesForDirectDownload = new Vector<>();
         mFilesToSyncContents = new Vector<>();
         mFilesToSyncContents = new Vector<>();
         mCancellationRequested = new AtomicBoolean(false);
         mCancellationRequested = new AtomicBoolean(false);
-        this.syncForInternalTwoWaySyncWorker = syncForInternalTwoWaySyncWorker;
+        this.syncInBackgroundWorker = syncInBackgroundWorker;
     }
     }
 
 
 
 
@@ -410,7 +410,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
                 true,
                 true,
                 mContext,
                 mContext,
                 getStorageManager(),
                 getStorageManager(),
-                syncForInternalTwoWaySyncWorker
+                syncInBackgroundWorker
             );
             );
             mFilesToSyncContents.add(operation);
             mFilesToSyncContents.add(operation);
         }
         }
@@ -432,7 +432,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
                         true,
                         true,
                         mContext,
                         mContext,
                         getStorageManager(),
                         getStorageManager(),
-                        syncForInternalTwoWaySyncWorker
+                        syncInBackgroundWorker
                     );
                     );
                     mFilesToSyncContents.add(operation);
                     mFilesToSyncContents.add(operation);
                 }
                 }
@@ -446,7 +446,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
     }
     }
 
 
     private void startDirectDownloads() {
     private void startDirectDownloads() {
-        if (syncForInternalTwoWaySyncWorker) {
+        if (syncInBackgroundWorker) {
             try {
             try {
                 for (OCFile file: mFilesForDirectDownload) {
                 for (OCFile file: mFilesForDirectDownload) {
                     if (file == null) continue;
                     if (file == null) continue;