projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
04f5cf1
)
Fixed release of connection between FileActivity and OperationService
author
David A. Velasco
<dvelasco@solidgear.es>
Tue, 11 Feb 2014 13:57:37 +0000
(14:57 +0100)
committer
David A. Velasco
<dvelasco@solidgear.es>
Tue, 11 Feb 2014 13:57:37 +0000
(14:57 +0100)
src/com/owncloud/android/operations/CreateShareOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/services/OperationsService.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/activity/FileActivity.java
patch
|
blob
|
blame
|
history
diff --git
a/src/com/owncloud/android/operations/CreateShareOperation.java
b/src/com/owncloud/android/operations/CreateShareOperation.java
index
bf462a2
..
7b64653
100644
(file)
--- a/
src/com/owncloud/android/operations/CreateShareOperation.java
+++ b/
src/com/owncloud/android/operations/CreateShareOperation.java
@@
-92,12
+92,10
@@
public class CreateShareOperation extends SyncOperation {
OCShare share = (OCShare) result.getData().get(0);
// Update DB with the response
OCShare share = (OCShare) result.getData().get(0);
// Update DB with the response
+ share.setPath(mPath);
if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
- share.setPath(mPath.substring(0, mPath.length()-1));
share.setIsFolder(true);
share.setIsFolder(true);
-
} else {
} else {
- share.setPath(mPath);
share.setIsFolder(false);
}
share.setPermissions(mPermissions);
share.setIsFolder(false);
}
share.setPermissions(mPermissions);
diff --git
a/src/com/owncloud/android/services/OperationsService.java
b/src/com/owncloud/android/services/OperationsService.java
index
6ff7c6a
..
53befed
100644
(file)
--- a/
src/com/owncloud/android/services/OperationsService.java
+++ b/
src/com/owncloud/android/services/OperationsService.java
@@
-141,7
+141,7
@@
public class OperationsService extends Service {
}
mPendingOperations.add(new Pair<Target , RemoteOperation>(target, operation));
}
mPendingOperations.add(new Pair<Target , RemoteOperation>(target, operation));
- sendBroadcastNewOperation(target, operation);
+
//
sendBroadcastNewOperation(target, operation);
Message msg = mServiceHandler.obtainMessage();
msg.arg1 = startId;
Message msg = mServiceHandler.obtainMessage();
msg.arg1 = startId;
@@
-324,7
+324,7
@@
public class OperationsService extends Service {
}
}
}
}
- sendBroadcastOperationFinished(mLastTarget, mCurrentOperation, result);
+
//
sendBroadcastOperationFinished(mLastTarget, mCurrentOperation, result);
callbackOperationListeners(mLastTarget, mCurrentOperation, result);
}
}
callbackOperationListeners(mLastTarget, mCurrentOperation, result);
}
}
diff --git
a/src/com/owncloud/android/ui/activity/FileActivity.java
b/src/com/owncloud/android/ui/activity/FileActivity.java
index
ca9d8d3
..
28f7875
100644
(file)
--- a/
src/com/owncloud/android/ui/activity/FileActivity.java
+++ b/
src/com/owncloud/android/ui/activity/FileActivity.java
@@
-160,18
+160,19
@@
public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp
@Override
protected void onStop() {
super.onStop();
@Override
protected void onStop() {
super.onStop();
- if (mOperationsServiceBinder != null) {
- mOperationsServiceBinder.removeOperationListener(this);
- mOperationsServiceBinder = null;
- }
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
protected void onDestroy() {
super.onDestroy();
- if (mOperationsServiceConnection != null)
+ if (mOperationsServiceConnection != null) {
+ if (mOperationsServiceBinder != null) {
+ mOperationsServiceBinder.removeOperationListener(this);
+ mOperationsServiceBinder = null;
+ }
unbindService(mOperationsServiceConnection);
unbindService(mOperationsServiceConnection);
+ }
}
}