From: David A. Velasco Date: Thu, 11 Oct 2012 09:40:15 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into cancel_in_upload X-Git-Tag: oc-android-1.4.3~155 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/b0ab3ce0872d2702e82b5979dddaa5a897be340b Merge remote-tracking branch 'origin/master' into cancel_in_upload Conflicts: src/com/owncloud/android/ui/activity/FileDisplayActivity.java --- b0ab3ce0872d2702e82b5979dddaa5a897be340b diff --cc src/com/owncloud/android/ui/activity/FileDisplayActivity.java index b3202976,3d8f22cf..b6393a51 --- a/src/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/com/owncloud/android/ui/activity/FileDisplayActivity.java @@@ -953,21 -935,14 +953,22 @@@ public class FileDisplayActivity extend /** Defines callbacks for service binding, passed to bindService() */ - private ServiceConnection mConnection = new ServiceConnection() { + private class ListServiceConnection implements ServiceConnection { @Override - public void onServiceConnected(ComponentName className, IBinder service) { - mDownloaderBinder = (FileDownloaderBinder) service; - // a new chance to get the mDownloadBinder through getDownloadBinder() - THIS IS A MESS + public void onServiceConnected(ComponentName component, IBinder service) { + if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) { + Log.d(TAG, "Download service connected"); + mDownloaderBinder = (FileDownloaderBinder) service; + } else if (component.equals(new ComponentName(FileDisplayActivity.this, FileUploader.class))) { + Log.d(TAG, "Upload service connected"); + mUploaderBinder = (FileUploaderBinder) service; + } else { + return; + } + // a new chance to get the mDownloadBinder through getFileDownloadBinder() - THIS IS A MESS - mFileList.listDirectory(); + if (mFileList != null) + mFileList.listDirectory(); if (mDualPane) { FileDetailFragment fragment = (FileDetailFragment) getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG); if (fragment != null)