Browse Source

dialog committed with allow state loss

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 6 years ago
parent
commit
d396bbf772

+ 5 - 3
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -1305,9 +1305,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         }
 
         /// be gentle with the user
-        IndeterminateProgressDialog dialog =
-                IndeterminateProgressDialog.newInstance(R.string.auth_trying_to_login, true);
-        dialog.show(getSupportFragmentManager(), WAIT_DIALOG_TAG);
+        IndeterminateProgressDialog dialog = IndeterminateProgressDialog.newInstance(R.string.auth_trying_to_login,
+                                                                                     true);
+        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+        ft.add(dialog, WAIT_DIALOG_TAG);
+        ft.commitAllowingStateLoss();
 
         /// validate credentials accessing the root folder
         OwnCloudCredentials credentials = OwnCloudCredentialsFactory.newBasicCredentials(username, password);