Merge remote-tracking branch 'origin/master' into cancel_in_upload
authorDavid A. Velasco <dvelasco@solidgear.es>
Thu, 11 Oct 2012 09:40:15 +0000 (11:40 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Thu, 11 Oct 2012 09:40:15 +0000 (11:40 +0200)
Conflicts:
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

1  2 
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@@ -953,21 -935,14 +953,22 @@@ public class FileDisplayActivity extend
      \r
      \r
      /** Defines callbacks for service binding, passed to bindService() */\r
 -    private ServiceConnection mConnection = new ServiceConnection() {\r
 +    private class ListServiceConnection implements ServiceConnection {\r
  \r
          @Override\r
 -        public void onServiceConnected(ComponentName className, IBinder service) {\r
 -            mDownloaderBinder = (FileDownloaderBinder) service;\r
 -            // a new chance to get the mDownloadBinder through getDownloadBinder() - THIS IS A MESS\r
 +        public void onServiceConnected(ComponentName component, IBinder service) {\r
 +            if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) {\r
 +                Log.d(TAG, "Download service connected");\r
 +                mDownloaderBinder = (FileDownloaderBinder) service;\r
 +            } else if (component.equals(new ComponentName(FileDisplayActivity.this, FileUploader.class))) {\r
 +                Log.d(TAG, "Upload service connected");\r
 +                mUploaderBinder = (FileUploaderBinder) service;\r
 +            } else {\r
 +                return;\r
 +            }\r
 +            // a new chance to get the mDownloadBinder through getFileDownloadBinder() - THIS IS A MESS\r
-             mFileList.listDirectory();\r
+             if (mFileList != null)\r
+                 mFileList.listDirectory();\r
              if (mDualPane) {\r
                  FileDetailFragment fragment = (FileDetailFragment) getSupportFragmentManager().findFragmentByTag(FileDetailFragment.FTAG);\r
                  if (fragment != null)\r