X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/04f5cf170f3b55ba81c2b53d60dc77f7452b9b7a..901b6ac61e4a84d281e86b4989aa099801b28de7:/src/com/owncloud/android/ui/activity/FileActivity.java diff --git a/src/com/owncloud/android/ui/activity/FileActivity.java b/src/com/owncloud/android/ui/activity/FileActivity.java index ca9d8d30..42b90aec 100644 --- a/src/com/owncloud/android/ui/activity/FileActivity.java +++ b/src/com/owncloud/android/ui/activity/FileActivity.java @@ -42,10 +42,10 @@ import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.files.FileOperationsHelper; -import com.owncloud.android.lib.operations.common.OnRemoteOperationListener; -import com.owncloud.android.lib.operations.common.RemoteOperation; -import com.owncloud.android.lib.operations.common.RemoteOperationResult; -import com.owncloud.android.lib.operations.common.RemoteOperationResult.ResultCode; +import com.owncloud.android.lib.common.operations.OnRemoteOperationListener; +import com.owncloud.android.lib.common.operations.RemoteOperation; +import com.owncloud.android.lib.common.operations.RemoteOperationResult; +import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode; import com.owncloud.android.operations.CreateShareOperation; import com.owncloud.android.operations.UnshareLinkOperation; @@ -154,6 +154,9 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp if (mAccountWasSet) { onAccountSet(mAccountWasRestored); } + if (mOperationsServiceBinder != null) { + mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler); + } } @@ -162,7 +165,6 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp super.onStop(); if (mOperationsServiceBinder != null) { mOperationsServiceBinder.removeOperationListener(this); - mOperationsServiceBinder = null; } } @@ -170,8 +172,10 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp @Override protected void onDestroy() { super.onDestroy(); - if (mOperationsServiceConnection != null) + if (mOperationsServiceConnection != null) { unbindService(mOperationsServiceConnection); + mOperationsServiceBinder = null; + } }