From c8bb45b987e681ed40ad789faa07130f5d9b354f Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Thu, 17 Nov 2022 15:19:52 +0100 Subject: [PATCH] Fix incorrect logging in CommonUtils and remove annoying log in contentScanner package --- .../e/drive/contentScanner/LocalContentScanner.java | 2 -- .../e/drive/contentScanner/RemoteContentScanner.java | 2 -- app/src/main/java/foundation/e/drive/utils/CommonUtils.java | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/foundation/e/drive/contentScanner/LocalContentScanner.java b/app/src/main/java/foundation/e/drive/contentScanner/LocalContentScanner.java index 23ac48db..bf988fe0 100644 --- a/app/src/main/java/foundation/e/drive/contentScanner/LocalContentScanner.java +++ b/app/src/main/java/foundation/e/drive/contentScanner/LocalContentScanner.java @@ -70,8 +70,6 @@ public class LocalContentScanner extends AbstractContentScanner{ newSyncedFileState.setId( storedId ); Timber.d("Add upload SyncRequest for new file %s", filePath); syncRequests.put(storedId, new SyncRequest(newSyncedFileState, SyncRequest.Type.UPLOAD)); - } else { - Timber.d("Failed to insert (in DB) new SyncedFileState for %s", filePath); } } diff --git a/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java b/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java index 047bd8ff..5f32c9ac 100644 --- a/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java +++ b/app/src/main/java/foundation/e/drive/contentScanner/RemoteContentScanner.java @@ -80,8 +80,6 @@ public class RemoteContentScanner extends AbstractContentScanner { newFileState.setId(storedId); Timber.d("Add downloadSyncRequest for new remote file: %s", remoteFilePath); this.syncRequests.put(storedId, new DownloadRequest(file, newFileState)); - } else { - Timber.d("Failed to insert (in DB) new SyncedFileState for remote file %s", remoteFilePath); } } diff --git a/app/src/main/java/foundation/e/drive/utils/CommonUtils.java b/app/src/main/java/foundation/e/drive/utils/CommonUtils.java index 9542f79b..3f488756 100644 --- a/app/src/main/java/foundation/e/drive/utils/CommonUtils.java +++ b/app/src/main/java/foundation/e/drive/utils/CommonUtils.java @@ -181,7 +181,7 @@ public abstract class CommonUtils { * @return True if there is connection, false either */ public static boolean haveNetworkConnection(Context context, boolean meteredNetworkAllowed) { - Timber.tag(TAG).v(TAG, "haveNetworkConnection()"); + Timber.tag(TAG).v("haveNetworkConnection()"); final ConnectivityManager cm = context.getSystemService(ConnectivityManager.class); final NetworkCapabilities capabilities = cm.getNetworkCapabilities(cm.getActiveNetwork()); @@ -220,7 +220,7 @@ public abstract class CommonUtils { * @param filePath String containing path the file to update by mediaScanner */ public static void doActionMediaScannerConnexionScanFile(Context context, final String filePath) { - Timber.v(TAG, "doActionMediaScannerConnexionScanFile( %s )", filePath); + Timber.v("doActionMediaScannerConnexionScanFile( %s )", filePath); final String[] filePathArray = new String[] { filePath }; final String[] mimeType = new String[] {getMimeType(new File(filePath))}; MediaScannerConnection.scanFile(context, -- GitLab