mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
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:
parent
9b4d153e90
commit
5384f6ff86
1 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue