Fixed bug: grant that paused FileActivity behind ShareActivity is not registered as a listener with OperationService when the devide is rotated, preventing CRASH when password is enforced in server

This commit is contained in:
David A. Velasco 2015-11-21 20:18:56 +01:00
parent 9b4d153e90
commit 5384f6ff86

View file

@ -145,6 +145,8 @@ public class FileActivity extends AppCompatActivity
private OperationsServiceBinder mOperationsServiceBinder = null;
private boolean mResumed = false;
protected FileDownloaderBinder mDownloaderBinder = null;
protected FileUploaderBinder mUploaderBinder = null;
private ServiceConnection mDownloadServiceConnection, mUploadServiceConnection = null;
@ -257,7 +259,7 @@ public class FileActivity extends AppCompatActivity
@Override
protected void onResume() {
super.onResume();
mResumed = true;
if (mOperationsServiceBinder != null) {
doOnResumeAndBound();
}
@ -268,7 +270,7 @@ public class FileActivity extends AppCompatActivity
if (mOperationsServiceBinder != null) {
mOperationsServiceBinder.removeOperationListener(this);
}
mResumed = false;
super.onPause();
}
@ -903,7 +905,9 @@ public class FileActivity extends AppCompatActivity
/*if (!mOperationsServiceBinder.isPerformingBlockingOperation()) {
dismissLoadingDialog();
}*/
doOnResumeAndBound();
if (mResumed) {
doOnResumeAndBound();
}
} else {
return;