Fixed visibility of authorization details when the device is turned aside; removed...
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / AuthenticatorActivity.java
index 4d17a83..1185307 100644 (file)
@@ -126,8 +126,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
     \r
     private TextView mOAuthAuthEndpointText;\r
     private TextView mOAuthTokenEndpointText;\r
-\r
-\r
     \r
     \r
     /**\r
@@ -264,7 +262,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         // state of oAuth2 components\r
         mOAuth2StatusIcon = savedInstanceState.getInt(KEY_OAUTH2_STATUS_ICON);\r
         mOAuth2StatusText = savedInstanceState.getInt(KEY_OAUTH2_STATUS_TEXT);\r
-        changeViewByOAuth2Check(mOAuth2Check.isChecked());\r
         \r
         /* Leave old OAuth flow\r
         // We store a JSon object with all the data returned from oAuth2 server when we get user_code.\r
@@ -305,6 +302,9 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
     @Override\r
     protected void onResume() {\r
         super.onResume();\r
+        changeViewByOAuth2Check(mOAuth2Check.isChecked());  \r
+            // the state of mOAuth2Check is automatically recovered between configuration changes, but not before onCreate() finishes\r
+        \r
         /* LEAVE OLD OAUTH FLOW ; \r
         // (old oauth code) Registering token receiver. We must listening to the service that is pooling to the oAuth server for a token.\r
         if (tokenReceiver == null) {\r