#265 unlocking vaults after changing OneDrive password displays error

This should be still enhanced by displaying the login screen but is already better than being stuck in a black screen.
This commit is contained in:
Julian Raufelder 2021-02-12 18:38:57 +01:00
parent a217e58f94
commit 8d6bc95073
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D
3 changed files with 7 additions and 3 deletions

View File

@ -152,7 +152,7 @@ public abstract class MSAAuthAndroidAdapter implements IAuthenticationAdapter {
public void onAuthComplete(final LiveStatus status, final LiveConnectSession session, final Object userState) { public void onAuthComplete(final LiveStatus status, final LiveConnectSession session, final Object userState) {
Timber.tag("MSAAuthAndroidAdapter").d(String.format("LiveStatus: %s, LiveConnectSession good?: %s, UserState %s", status, session != null, userState)); Timber.tag("MSAAuthAndroidAdapter").d(String.format("LiveStatus: %s, LiveConnectSession good?: %s, UserState %s", status, session != null, userState));
if (status == LiveStatus.NOT_CONNECTED) { if (status == LiveStatus.NOT_CONNECTED && session.getRefreshToken() == null) {
Timber.tag("MSAAuthAndroidAdapter").d("Received invalid login failure from silent authentication, ignoring."); Timber.tag("MSAAuthAndroidAdapter").d("Received invalid login failure from silent authentication, ignoring.");
return; return;
} }

View File

@ -112,7 +112,9 @@ class AuthenticateCloudPresenter @Inject constructor( //
} }
private fun failAuthentication(cloudName: Int) { private fun failAuthentication(cloudName: Int) {
activity().runOnUiThread {
view?.showMessage(String.format(getString(R.string.screen_authenticate_auth_authentication_failed), getString(cloudName))) view?.showMessage(String.format(getString(R.string.screen_authenticate_auth_authentication_failed), getString(cloudName)))
}
finish() finish()
} }

View File

@ -116,7 +116,9 @@ class AuthenticateCloudPresenter @Inject constructor( //
} }
private fun failAuthentication(cloudName: Int) { private fun failAuthentication(cloudName: Int) {
activity().runOnUiThread {
view?.showMessage(String.format(getString(R.string.screen_authenticate_auth_authentication_failed), getString(cloudName))) view?.showMessage(String.format(getString(R.string.screen_authenticate_auth_authentication_failed), getString(cloudName)))
}
finish() finish()
} }