mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
Fixed subscription of stopped FileActivities as listeners for results of operations in OperationsService
This commit is contained in:
parent
7b4afce57e
commit
8394350082
1 changed files with 7 additions and 4 deletions
|
@ -154,12 +154,19 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp
|
|||
if (mAccountWasSet) {
|
||||
onAccountSet(mAccountWasRestored);
|
||||
}
|
||||
if (mOperationsServiceBinder != null) {
|
||||
mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
if (mOperationsServiceBinder != null) {
|
||||
mOperationsServiceBinder.removeOperationListener(this);
|
||||
mOperationsServiceBinder = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -167,10 +174,6 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp
|
|||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (mOperationsServiceConnection != null) {
|
||||
if (mOperationsServiceBinder != null) {
|
||||
mOperationsServiceBinder.removeOperationListener(this);
|
||||
mOperationsServiceBinder = null;
|
||||
}
|
||||
unbindService(mOperationsServiceConnection);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue