Loading app/src/main/java/foundation/e/drive/database/DbHelper.java +10 −6 Original line number Diff line number Diff line Loading @@ -305,13 +305,15 @@ public final class DbHelper extends SQLiteOpenHelper { * @return true if there is at least one file that need to be uploaded */ public static boolean syncedFolderHasContentToUpload(long syncedFolderID, Context context) { boolean result = false; try { SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); return dao.countFileWaitingForUploadForSyncedFolder(syncedFolderID) > 0; final SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); result = dao.countFileWaitingForUploadForSyncedFolder(syncedFolderID) > 0; dao.close(); } catch (SQLiteException e) { Log.e(TAG, "SQlite error", e); } return false; return result; } /** Loading @@ -321,13 +323,15 @@ public final class DbHelper extends SQLiteOpenHelper { * @return true if there is at least one file to download */ public static boolean syncedFolderHasContentToDownload(int syncedFolderId, Context context) { boolean result = false; try { SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); return dao.countFileWaitingForDownloadForSyncedFolder(syncedFolderId) > 0; final SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); result = dao.countFileWaitingForDownloadForSyncedFolder(syncedFolderId) > 0; dao.close(); } catch (SQLiteException e) { Log.e(TAG, "SQLite error", e); } return false; return result; } /** Loading Loading
app/src/main/java/foundation/e/drive/database/DbHelper.java +10 −6 Original line number Diff line number Diff line Loading @@ -305,13 +305,15 @@ public final class DbHelper extends SQLiteOpenHelper { * @return true if there is at least one file that need to be uploaded */ public static boolean syncedFolderHasContentToUpload(long syncedFolderID, Context context) { boolean result = false; try { SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); return dao.countFileWaitingForUploadForSyncedFolder(syncedFolderID) > 0; final SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); result = dao.countFileWaitingForUploadForSyncedFolder(syncedFolderID) > 0; dao.close(); } catch (SQLiteException e) { Log.e(TAG, "SQlite error", e); } return false; return result; } /** Loading @@ -321,13 +323,15 @@ public final class DbHelper extends SQLiteOpenHelper { * @return true if there is at least one file to download */ public static boolean syncedFolderHasContentToDownload(int syncedFolderId, Context context) { boolean result = false; try { SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); return dao.countFileWaitingForDownloadForSyncedFolder(syncedFolderId) > 0; final SyncedFileStateDAO dao = openSyncedFileStateDAO(context, false); result = dao.countFileWaitingForDownloadForSyncedFolder(syncedFolderId) > 0; dao.close(); } catch (SQLiteException e) { Log.e(TAG, "SQLite error", e); } return false; return result; } /** Loading