-
- @Override
- public void onObservedFileStatusUpdate(String localPath, String remotePath, Account account, RemoteOperationResult result) {
- if (!result.isSuccess()) {
- if (result.getCode() == ResultCode.SYNC_CONFLICT) {
- // ISSUE 5: if the user is not running the app (this is a service!), this can be very intrusive; a notification should be preferred
- Intent i = new Intent(getApplicationContext(), ConflictsResolveActivity.class);
- i.setFlags(i.getFlags() | Intent.FLAG_ACTIVITY_NEW_TASK);
- i.putExtra("remotepath", remotePath);
- i.putExtra("localpath", localPath);
- i.putExtra("account", account);
- startActivity(i);
-
- } else {
- // TODO send notification to the notification bar?
- }
- } // else, nothing else to do; now it's duty of FileUploader service
- }
-
-