if (mAccountWasSet) {
onAccountSet(mAccountWasRestored);
}
- if (mOperationsServiceBinder != null) {
- mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
- }
}
@Override
super.onPause();
}
- @Override
- protected void onStop() {
-
- if (mOperationsServiceBinder != null) {
- mOperationsServiceBinder.removeOperationListener(this);
- }
-
- super.onStop();
- }
-
@Override
protected void onDestroy() {
- super.onDestroy();
if (mOperationsServiceConnection != null) {
unbindService(mOperationsServiceConnection);
mOperationsServiceBinder = null;
unbindService(mUploadServiceConnection);
mUploadServiceConnection = null;
}
+ super.onDestroy();
}
mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
long waitingForOpId = mFileOperationsHelper.getOpIdWaitingFor();
if (waitingForOpId <= Integer.MAX_VALUE) {
- mOperationsServiceBinder.dispatchResultIfFinished((int)waitingForOpId, this);
+ boolean wait = mOperationsServiceBinder.dispatchResultIfFinished((int)waitingForOpId, this);
+ if (!wait ) {
+ dismissLoadingDialog();
+ }
}
}