mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 14:15:44 +03:00
Modify DetectAuthenticationMethodOperation so that , when returning its result through the callback, there is no crash if AuthenticatorActivity is not ready (rotating)
This commit is contained in:
parent
2812120456
commit
2628eceb6b
2 changed files with 27 additions and 2 deletions
|
@ -537,6 +537,27 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
if (mOperationsServiceBinder != null) {
|
||||
mOperationsServiceBinder.addOperationListener(AuthenticatorActivity.this, mHandler);
|
||||
}
|
||||
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
if (mOperationsServiceBinder != null) {
|
||||
mOperationsServiceBinder.removeOperationListener(this);
|
||||
}
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The redirection triggered by the OAuth authentication server as response to the GET AUTHORIZATION, and
|
||||
* deferred in {@link #onNewIntent(Intent)}, is processed here.
|
||||
|
|
|
@ -150,22 +150,26 @@ public class FileActivity extends SherlockFragmentActivity implements OnRemoteOp
|
|||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
||||
if (mAccountWasSet) {
|
||||
onAccountSet(mAccountWasRestored);
|
||||
}
|
||||
if (mOperationsServiceBinder != null) {
|
||||
mOperationsServiceBinder.addOperationListener(FileActivity.this, mHandler);
|
||||
}
|
||||
|
||||
super.onStart();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
super.onStop();
|
||||
|
||||
if (mOperationsServiceBinder != null) {
|
||||
mOperationsServiceBinder.removeOperationListener(this);
|
||||
}
|
||||
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue