Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unknown error #1395

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions res/layout/account_setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
android:paddingRight="55dp"
android:textColorHint="@color/login_text_hint_color"
android:contentDescription="@string/auth_host_address"
>
android:autoLink="web"
android:clickable="true">
<requestFocus />
</EditText>
<ImageButton
Expand Down Expand Up @@ -115,7 +116,9 @@
android:textColorHint="@color/login_text_hint_color"
android:text="@string/auth_testing_connection"
android:minHeight="32dp"
android:contentDescription="@string/auth_testing_connection"/>
android:contentDescription="@string/auth_testing_connection"
android:autoLink="web"
/>

<CheckBox
android:id="@+id/oauth_onOff_check"
Expand Down
2 changes: 1 addition & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
<string name="auth_not_configured_title">Malformed server configuration</string>
<string name="auth_account_not_new">An account for the same user and server already exists in the device</string>
<string name="auth_account_not_the_same">The entered user does not match the user of this account</string>
<string name="auth_unknown_error_title">Unknown error occurred!</string>
<string name="auth_unknown_error_title">Unknown error occurred! Please visit %1$s</string>
<string name="auth_unknown_host_title">Couldn\'t find host</string>
<string name="auth_incorrect_path_title">Server instance not found</string>
<string name="auth_timeout_title">The server took too long to respond</string>
Expand Down
12 changes: 10 additions & 2 deletions src/com/owncloud/android/authentication/AuthenticatorActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.text.Editable;
import android.text.Html;
import android.text.InputType;
import android.text.TextWatcher;
import android.text.util.Linkify;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -1614,14 +1616,20 @@ private void showServerStatus() {
mServerStatusView.setVisibility(View.INVISIBLE);

} else {
mServerStatusView.setText(mServerStatusText);
if (mServerStatusText == R.string.auth_unknown_error_title){
String text = getString(R.string.auth_unknown_error_title,
mHostUrlInput.getText().toString().trim() + "/status.php");
mServerStatusView.setText(Html.fromHtml(text));
Linkify.addLinks(mServerStatusView, Linkify.WEB_URLS);
} else {
mServerStatusView.setText(mServerStatusText);
}
mServerStatusView.setCompoundDrawablesWithIntrinsicBounds(mServerStatusIcon, 0, 0, 0);
mServerStatusView.setVisibility(View.VISIBLE);
}

}


/**
* Updates the content and visibility state of the icon and text associated
* to the interactions with the OAuth authorization server.
Expand Down