public static final String EXTRA_USER_NAME = "USER_NAME";\r
public static final String EXTRA_HOST_NAME = "HOST_NAME";\r
public static final String EXTRA_ACTION = "ACTION";\r
+ public static final String EXTRA_ENFORCED_UPDATE = "ENFORCE_UPDATE";\r
\r
private static final String KEY_HOST_URL_TEXT = "HOST_URL_TEXT";\r
private static final String KEY_OC_VERSION = "OC_VERSION";\r
\r
public static final byte ACTION_CREATE = 0;\r
public static final byte ACTION_UPDATE_TOKEN = 1;\r
- \r
+\r
private String mHostBaseUrl;\r
private OwnCloudVersion mDiscoveredVersion;\r
\r
}\r
mOAuth2Check.setChecked(oAuthRequired);\r
changeViewByOAuth2Check(oAuthRequired);\r
-\r
+ mJustCreated = true;\r
\r
} else {\r
/// connection state and info\r
}\r
\r
mPasswordInput.setText(""); // clean password to avoid social hacking (disadvantage: password in removed if the device is turned aside)\r
- mJustCreated = true;\r
\r
/// bind view elements to listeners\r
mHostUrlInput.setOnFocusChangeListener(this);\r
super.onResume();\r
// the state of mOAuth2Check is automatically recovered between configuration changes, but not before onCreate() finishes; so keep the next lines here\r
changeViewByOAuth2Check(mOAuth2Check.isChecked()); \r
- if (mAction == ACTION_UPDATE_TOKEN && mJustCreated) {\r
+ if (mAction == ACTION_UPDATE_TOKEN && mJustCreated && getIntent().getBooleanExtra(EXTRA_ENFORCED_UPDATE, false)) {\r
if (mOAuth2Check.isChecked())\r
Toast.makeText(this, R.string.auth_expired_oauth_token_toast, Toast.LENGTH_LONG).show();\r
else\r