@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();
+ }
}
}