Loading app/src/main/java/io/eelo/drive/services/ObserverService.java +1 −6 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ public class ObserverService extends Service implements OnRemoteOperationListene private boolean mBoundToOperationManager = false; private boolean isWorking = false; private OperationManagerService mOperationManagerService; private final int notificationID = 3310; private int initialFolderCounter; private Account mAccount; /** Loading Loading @@ -111,8 +110,6 @@ public class ObserverService extends Service implements OnRemoteOperationListene this.mClient = null; this.mHandler = null; this.mSyncedFolders = null; NotificationManager nM = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nM.cancel(notificationID); } @Override Loading Loading @@ -439,9 +436,7 @@ public class ObserverService extends Service implements OnRemoteOperationListene if(! fileExists ) { Log.d(CURRENTTAG, file.getName()+" doesn't exists *2"); //It means that file has been correctly deleted from device. So update DB. if (DbHelper.manageSyncedFileStateDB(syncedFileState, "DELETE", this) > 0) CommonUtils.sendNotification(this,notificationID, syncedFileState.getName() + " has been removed", android.R.drawable.ic_delete, null, null); else if (DbHelper.manageSyncedFileStateDB(syncedFileState, "DELETE", this) <= 0) Log.e(CURRENTTAG, "SyncedFileState row hasn't been deleted from DB"); }else Log.e(CURRENTTAG, "file still exist and can't be remove"); Loading app/src/main/java/io/eelo/drive/services/OperationManagerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -260,7 +260,6 @@ public class OperationManagerService extends Service implements OnRemoteOperatio DownloadFileOperation downloadOperation = (DownloadFileOperation) operation; switch (result.getCode()){ case OK: CommonUtils.sendNotification(this,notificationID, "Download of " + downloadOperation.getmSyncedState().getRemotePath() + " succeed", android.R.drawable.stat_sys_download_done, null, null); Log.d(CURRENTTAG, " Download: OK: download succeed" ); break; case ETAG_UNCHANGED: Loading app/src/main/java/io/eelo/drive/utils/CommonUtils.java +6 −10 Original line number Diff line number Diff line /* * Copyright © Vincent Bourgmayer (/e/ foundation). * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at Loading Loading @@ -43,6 +44,11 @@ public abstract class CommonUtils { final private static String TAG = CommonUtils.class.getSimpleName(); /** * Unregister from screeOffReceiver component * @param context app context * @return true if unregistration was successful or false if it encounter an exception */ public static boolean unregisterScreenOff(Context context){ try { Log.d("TAG", "unregisterReceiver(screenOffReceiver)"); Loading Loading @@ -248,16 +254,6 @@ public abstract class CommonUtils { return result; } /** * Check if a string is not null and not empty * * @param string string to analyze * @return true if string not null and not empty */ public static boolean isValidString(String string) { return (string != null && !string.isEmpty()); } /** * Used for debug * @dev-only Loading Loading
app/src/main/java/io/eelo/drive/services/ObserverService.java +1 −6 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ public class ObserverService extends Service implements OnRemoteOperationListene private boolean mBoundToOperationManager = false; private boolean isWorking = false; private OperationManagerService mOperationManagerService; private final int notificationID = 3310; private int initialFolderCounter; private Account mAccount; /** Loading Loading @@ -111,8 +110,6 @@ public class ObserverService extends Service implements OnRemoteOperationListene this.mClient = null; this.mHandler = null; this.mSyncedFolders = null; NotificationManager nM = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nM.cancel(notificationID); } @Override Loading Loading @@ -439,9 +436,7 @@ public class ObserverService extends Service implements OnRemoteOperationListene if(! fileExists ) { Log.d(CURRENTTAG, file.getName()+" doesn't exists *2"); //It means that file has been correctly deleted from device. So update DB. if (DbHelper.manageSyncedFileStateDB(syncedFileState, "DELETE", this) > 0) CommonUtils.sendNotification(this,notificationID, syncedFileState.getName() + " has been removed", android.R.drawable.ic_delete, null, null); else if (DbHelper.manageSyncedFileStateDB(syncedFileState, "DELETE", this) <= 0) Log.e(CURRENTTAG, "SyncedFileState row hasn't been deleted from DB"); }else Log.e(CURRENTTAG, "file still exist and can't be remove"); Loading
app/src/main/java/io/eelo/drive/services/OperationManagerService.java +0 −1 Original line number Diff line number Diff line Loading @@ -260,7 +260,6 @@ public class OperationManagerService extends Service implements OnRemoteOperatio DownloadFileOperation downloadOperation = (DownloadFileOperation) operation; switch (result.getCode()){ case OK: CommonUtils.sendNotification(this,notificationID, "Download of " + downloadOperation.getmSyncedState().getRemotePath() + " succeed", android.R.drawable.stat_sys_download_done, null, null); Log.d(CURRENTTAG, " Download: OK: download succeed" ); break; case ETAG_UNCHANGED: Loading
app/src/main/java/io/eelo/drive/utils/CommonUtils.java +6 −10 Original line number Diff line number Diff line /* * Copyright © Vincent Bourgmayer (/e/ foundation). * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at Loading Loading @@ -43,6 +44,11 @@ public abstract class CommonUtils { final private static String TAG = CommonUtils.class.getSimpleName(); /** * Unregister from screeOffReceiver component * @param context app context * @return true if unregistration was successful or false if it encounter an exception */ public static boolean unregisterScreenOff(Context context){ try { Log.d("TAG", "unregisterReceiver(screenOffReceiver)"); Loading Loading @@ -248,16 +254,6 @@ public abstract class CommonUtils { return result; } /** * Check if a string is not null and not empty * * @param string string to analyze * @return true if string not null and not empty */ public static boolean isValidString(String string) { return (string != null && !string.isEmpty()); } /** * Used for debug * @dev-only Loading