|
@@ -100,6 +100,8 @@ public class FileUploader extends Service
|
|
public static final String KEY_INSTANT_UPLOAD = "INSTANT_UPLOAD";
|
|
public static final String KEY_INSTANT_UPLOAD = "INSTANT_UPLOAD";
|
|
public static final String KEY_LOCAL_BEHAVIOUR = "BEHAVIOUR";
|
|
public static final String KEY_LOCAL_BEHAVIOUR = "BEHAVIOUR";
|
|
|
|
|
|
|
|
+ public static final String KEY_CANCEL_ALL = "CANCEL_ALL";
|
|
|
|
+
|
|
public static final int LOCAL_BEHAVIOUR_COPY = 0;
|
|
public static final int LOCAL_BEHAVIOUR_COPY = 0;
|
|
public static final int LOCAL_BEHAVIOUR_MOVE = 1;
|
|
public static final int LOCAL_BEHAVIOUR_MOVE = 1;
|
|
public static final int LOCAL_BEHAVIOUR_FORGET = 2;
|
|
public static final int LOCAL_BEHAVIOUR_FORGET = 2;
|
|
@@ -209,6 +211,11 @@ public class FileUploader extends Service
|
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
|
Log_OC.d(TAG, "Starting command with id " + startId);
|
|
Log_OC.d(TAG, "Starting command with id " + startId);
|
|
|
|
|
|
|
|
+ if (intent.hasExtra(KEY_CANCEL_ALL) && intent.hasExtra(KEY_ACCOUNT)){
|
|
|
|
+ Account account = intent.getParcelableExtra(KEY_ACCOUNT);
|
|
|
|
+ cancelUploadForAccount(account.name);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!intent.hasExtra(KEY_ACCOUNT) || !intent.hasExtra(KEY_UPLOAD_TYPE)
|
|
if (!intent.hasExtra(KEY_ACCOUNT) || !intent.hasExtra(KEY_UPLOAD_TYPE)
|
|
|| !(intent.hasExtra(KEY_LOCAL_FILE) || intent.hasExtra(KEY_FILE))) {
|
|
|| !(intent.hasExtra(KEY_LOCAL_FILE) || intent.hasExtra(KEY_FILE))) {
|
|
Log_OC.e(TAG, "Not enough information provided in intent");
|
|
Log_OC.e(TAG, "Not enough information provided in intent");
|