use of com.owncloud.android.services.OperationsService.OperationsServiceBinder in project android by owncloud.
the class FileMenuFilter method anyFileSynchronizing.
private boolean anyFileSynchronizing() {
boolean synchronizing = false;
if (mComponentsGetter != null && !mFiles.isEmpty() && mAccount != null) {
OperationsServiceBinder opsBinder = mComponentsGetter.getOperationsServiceBinder();
FileUploaderBinder uploaderBinder = mComponentsGetter.getFileUploaderBinder();
FileDownloaderBinder downloaderBinder = mComponentsGetter.getFileDownloaderBinder();
synchronizing = (// comparing local and remote
anyFileSynchronizing(opsBinder) || anyFileDownloading(downloaderBinder) || anyFileUploading(uploaderBinder));
}
return synchronizing;
}
use of com.owncloud.android.services.OperationsService.OperationsServiceBinder in project android by owncloud.
the class FileListListAdapter method setIconPinAccordingToFilesLocalState.
private void setIconPinAccordingToFilesLocalState(ImageView localStateView, OCFile file) {
// local state
localStateView.bringToFront();
final FileDownloaderBinder downloaderBinder = mTransferServiceGetter.getFileDownloaderBinder();
final FileUploaderBinder uploaderBinder = mTransferServiceGetter.getFileUploaderBinder();
final OperationsServiceBinder opsBinder = mTransferServiceGetter.getOperationsServiceBinder();
// default first
localStateView.setVisibility(View.INVISIBLE);
if (opsBinder != null && opsBinder.isSynchronizing(mAccount, file)) {
// syncing
localStateView.setImageResource(R.drawable.sync_pin);
localStateView.setVisibility(View.VISIBLE);
} else if (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, file)) {
// downloading
localStateView.setImageResource(R.drawable.sync_pin);
localStateView.setVisibility(View.VISIBLE);
} else if (uploaderBinder != null && uploaderBinder.isUploading(mAccount, file)) {
// uploading
localStateView.setImageResource(R.drawable.sync_pin);
localStateView.setVisibility(View.VISIBLE);
} else if (file.getEtagInConflict() != null) {
// conflict
localStateView.setImageResource(R.drawable.error_pin);
localStateView.setVisibility(View.VISIBLE);
} else {
if (file.isDown()) {
localStateView.setVisibility(View.VISIBLE);
localStateView.setImageResource(R.drawable.downloaded_pin);
}
if (file.isAvailableOffline()) {
localStateView.setVisibility(View.VISIBLE);
localStateView.setImageResource(R.drawable.offline_available_pin);
}
}
}
use of com.owncloud.android.services.OperationsService.OperationsServiceBinder in project android by nextcloud.
the class FileMenuFilter method anyFileSynchronizing.
private boolean anyFileSynchronizing() {
boolean synchronizing = false;
if (componentsGetter != null && !files.isEmpty() && user != null) {
OperationsServiceBinder opsBinder = componentsGetter.getOperationsServiceBinder();
FileUploaderBinder uploaderBinder = componentsGetter.getFileUploaderBinder();
FileDownloaderBinder downloaderBinder = componentsGetter.getFileDownloaderBinder();
synchronizing = // comparing local and remote
anyFileSynchronizing(opsBinder) || anyFileDownloading(downloaderBinder) || anyFileUploading(uploaderBinder);
}
return synchronizing;
}
Aggregations