From: David A. Velasco Date: Mon, 21 Apr 2014 12:49:00 +0000 (+0200) Subject: Fixed lost automatic check of OC server on enforced update of password X-Git-Tag: oc-android-1.7.0_signed~332^2~1 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/e2f0af1c26fcb56ee9f06ac903bd5a7ad83c593b?ds=inline Fixed lost automatic check of OC server on enforced update of password --- diff --git a/src/com/owncloud/android/authentication/AuthenticatorActivity.java b/src/com/owncloud/android/authentication/AuthenticatorActivity.java index f6decb81..1247f3f5 100644 --- a/src/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/src/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -153,6 +153,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { private boolean mServerIsChecked = false; private boolean mServerIsValid = false; + private boolean mPendingAutoCheck = false; private GetServerInfoOperation.ServerInfo mServerInfo = new GetServerInfoOperation.ServerInfo(); @@ -174,7 +175,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { /// Identifier of operation in progress which result shouldn't be lost private long mWaitingForOpId = Long.MAX_VALUE; - + /** * {@inheritDoc} @@ -406,12 +407,9 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { }); - /// step 4 - automatic actions to start - if (savedInstanceState == null) { - if (mAction != ACTION_CREATE || !isUrlInputAllowed) { - checkOcServer(); - } - } + /// step 4 - mark automatic check to be started when OperationsService is ready + mPendingAutoCheck = (savedInstanceState == null && + (mAction != ACTION_CREATE || !isUrlInputAllowed)); } @@ -729,6 +727,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { if (mOperationsServiceBinder != null) { //Log_OC.wtf(TAG, "checking server..." ); mWaitingForOpId = mOperationsServiceBinder.newOperation(getServerInfoIntent); + } else { + Log_OC.wtf(TAG, "Server check tried with OperationService unbound!" ); } } else { @@ -1745,6 +1745,10 @@ SsoWebViewClientListener, OnSslUntrustedCertListener { if (mWaitingForOpId <= Integer.MAX_VALUE) { mOperationsServiceBinder.dispatchResultIfFinished((int)mWaitingForOpId, this); } + + if (mPendingAutoCheck) { + checkOcServer(); + } }