Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java |
| index 018f58b440862180761fe05a3fd5dc08b191e78b..4dc338bb95a81e066d460af5a93461d58409e99f 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java |
| @@ -51,6 +51,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| * @return whether passphrase was valid. |
| */ |
| boolean onPassphraseEntered(String passphrase); |
| + |
| void onPassphraseCanceled(); |
| } |
| @@ -98,7 +99,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| @Override |
| public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { |
| if (actionId == EditorInfo.IME_ACTION_NEXT) { |
| - handleOk(); |
| + handleSubmit(); |
| } |
| return false; |
| } |
| @@ -106,7 +107,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| final AlertDialog d = new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) |
| .setView(v) |
| - .setPositiveButton(R.string.ok, new Dialog.OnClickListener() { |
| + .setPositiveButton(R.string.submit, new Dialog.OnClickListener() { |
| @Override |
| public void onClick(DialogInterface d, int which) { |
| // We override the onclick. This is a hack to not dismiss the dialog after |
| @@ -114,9 +115,9 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| // is correct. |
| } |
| }) |
| - .setNegativeButton(R.string.cancel, this) |
| - .setTitle(R.string.sign_in_google_account) |
| - .create(); |
| + .setNegativeButton(R.string.cancel, this) |
| + .setTitle(R.string.sign_in_google_account) |
| + .create(); |
| d.getDelegate().setHandleNativeActionModesEnabled(false); |
| d.setOnShowListener(new DialogInterface.OnShowListener() { |
| @Override |
| @@ -125,7 +126,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| b.setOnClickListener(new View.OnClickListener() { |
| @Override |
| public void onClick(View view) { |
| - handleOk(); |
| + handleSubmit(); |
| } |
| }); |
| } |
| @@ -165,7 +166,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| final Context context = getActivity(); |
| return SpanApplier.applySpans( |
| context.getString(R.string.sync_passphrase_reset_instructions), |
| - new SpanInfo("<link>", "</link>", new ClickableSpan() { |
| + new SpanInfo("<resetlink>", "</resetlink>", new ClickableSpan() { |
| @Override |
| public void onClick(View view) { |
| recordPassphraseDialogDismissal(PASSPHRASE_DIALOG_RESET_LINK); |
| @@ -183,8 +184,8 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| } |
| /** |
| - * @return whether the incorrect passphrase text is currently visible. |
| - */ |
| + * @return whether the incorrect passphrase text is currently visible. |
| + */ |
| private boolean isIncorrectPassphraseVisible() { |
| // Check if the verifying TextView is currently showing the incorrect |
| // passphrase text. |
| @@ -203,7 +204,7 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| getListener().onPassphraseCanceled(); |
| } |
| - private void handleOk() { |
| + private void handleSubmit() { |
| TextView verifying = (TextView) getDialog().findViewById(R.id.verifying); |
| verifying.setText(R.string.sync_verifying); |
| @@ -232,5 +233,6 @@ public class PassphraseDialogFragment extends DialogFragment implements OnClickL |
| private void invalidPassphrase() { |
| TextView verifying = (TextView) getDialog().findViewById(R.id.verifying); |
|
newt (away)
2016/02/16 23:05:01
The EditText has a horizontal line below the curso
May
2016/02/17 13:24:31
Oh that underline. Yes, you're right. I added that
|
| verifying.setText(R.string.sync_passphrase_incorrect); |
| + verifying.setTextColor(getResources().getColor(R.color.input_underline_error_color, null)); |
| } |
| } |