소스 검색

dialog committed with allow state loss

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 6 년 전
부모
커밋
d396bbf772
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java

+ 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);