|
@@ -176,6 +176,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
private EditText mUsernameInput;
|
|
|
private EditText mPasswordInput;
|
|
|
private View mOkButton;
|
|
|
+ private View mCenteredRefreshButton;
|
|
|
private TextView mAuthStatusView;
|
|
|
|
|
|
private int mAuthStatusText = 0, mAuthStatusIcon = 0;
|
|
@@ -252,6 +253,23 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
initOverallUi();
|
|
|
|
|
|
mOkButton = findViewById(R.id.buttonOK);
|
|
|
+ mOkButton.setOnClickListener(new View.OnClickListener() {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ onOkClick();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ mCenteredRefreshButton = findViewById(R.id.centeredRefreshButton);
|
|
|
+ mCenteredRefreshButton.setOnClickListener(new View.OnClickListener() {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ checkOcServer();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
/// initialize block to be moved to single Fragment to check server and get info about it
|
|
|
initServerPreFragment(savedInstanceState);
|
|
@@ -683,7 +701,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
|
|
|
mHostUrlInput.removeTextChangedListener(mHostUrlInputWatcher);
|
|
|
mHostUrlInput.setOnFocusChangeListener(null);
|
|
|
-
|
|
|
+
|
|
|
super.onPause();
|
|
|
}
|
|
|
|
|
@@ -792,8 +810,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
Intent getServerInfoIntent = new Intent();
|
|
|
getServerInfoIntent.setAction(OperationsService.ACTION_GET_SERVER_INFO);
|
|
|
getServerInfoIntent.putExtra(
|
|
|
- OperationsService.EXTRA_SERVER_URL,
|
|
|
- normalizeUrlSuffix(uri)
|
|
|
+ OperationsService.EXTRA_SERVER_URL,
|
|
|
+ normalizeUrlSuffix(uri)
|
|
|
);
|
|
|
if (mOperationsServiceBinder != null) {
|
|
|
mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent);
|
|
@@ -870,10 +888,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
* is postponed until it is available.
|
|
|
*
|
|
|
* IMPORTANT ENTRY POINT 4
|
|
|
- *
|
|
|
- * @param view OK button
|
|
|
*/
|
|
|
- public void onOkClick(View view) {
|
|
|
+ public void onOkClick() {
|
|
|
// this check should be unnecessary
|
|
|
if (mServerInfo.mVersion == null ||
|
|
|
!mServerInfo.mVersion.isVersionValid() ||
|
|
@@ -1606,18 +1622,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Called when the refresh button in the input field for ownCloud host is clicked.
|
|
|
- *
|
|
|
- * Performs a new check on the URL in the input field.
|
|
|
- *
|
|
|
- * @param view Refresh 'button'
|
|
|
- */
|
|
|
- public void onRefreshClick(View view) {
|
|
|
- checkOcServer();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* Called when the eye icon in the password field is clicked.
|
|
|
*
|