diff options
| author | Matthew Wong <wongma@protonmail.ch> | 2015-08-14 16:51:39 -0400 |
|---|---|---|
| committer | Matthew Wong <wongma@protonmail.ch> | 2015-08-14 17:38:18 -0400 |
| commit | ebe1f831e7659b63b76c2b39498b68d1fec61673 (patch) | |
| tree | 7a74bb999bb882f27bf8e0e31a082f6df10bd0ea /app/src/main/java/com/zeapo/pwdstore/autofill | |
| parent | b1807197f85c4d6ceccc3ca23654bb184f9caa13 (diff) | |
| download | HardenedPass-ebe1f831e7659b63b76c2b39498b68d1fec61673.tar.gz HardenedPass-ebe1f831e7659b63b76c2b39498b68d1fec61673.zip | |
strings & enable service preference
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/autofill')
3 files changed, 8 insertions, 7 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java index c2a30ffe..8cf58206 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java @@ -68,6 +68,7 @@ public class AutofillFragment extends DialogFragment { View.OnClickListener matchPassword = new View.OnClickListener() { @Override public void onClick(View v) { + ((RadioButton) view.findViewById(R.id.match)).toggle(); Intent intent = new Intent(getActivity(), PasswordStore.class); intent.putExtra("matchWith", true); startActivityForResult(intent, MATCH_WITH); @@ -77,7 +78,7 @@ public class AutofillFragment extends DialogFragment { view.findViewById(R.id.matched).setOnClickListener(matchPassword); final SharedPreferences.Editor editor = prefs.edit(); - builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { + builder.setPositiveButton(R.string.dialog_ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { RadioGroup radioGroup = (RadioGroup) view.findViewById(R.id.autofill_radiogroup); @@ -105,7 +106,7 @@ public class AutofillFragment extends DialogFragment { } } }); - builder.setNegativeButton("Cancel", null); + builder.setNegativeButton(R.string.dialog_cancel, null); return builder.create(); } diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java index 01916650..8971c0af 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java @@ -105,10 +105,10 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter<AutofillRecycl holder.view.setBackgroundResource(R.color.indigo_50); break; case "first": - holder.secondary.setText("Automatically match"); + holder.secondary.setText(R.string.autofill_apps_first); break; case "never": - holder.secondary.setText("Never match"); + holder.secondary.setText(R.string.autofill_apps_never); break; default: holder.secondary.setText("Match with " + preference); diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java index 1e64e8c8..cd318394 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -152,8 +152,8 @@ public class AutofillService extends AccessibilityService { if (dialog == null) { AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.Theme_AppCompat_Dialog); - builder.setNegativeButton("Cancel", null); - builder.setPositiveButton("Fill", new DialogInterface.OnClickListener() { + builder.setNegativeButton(R.string.dialog_cancel, null); + builder.setPositiveButton(R.string.autofill_fill, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { decryptAndVerify(); @@ -161,7 +161,7 @@ public class AutofillService extends AccessibilityService { }); builder.setNeutralButton("Settings", new DialogInterface.OnClickListener() { @Override - public void onClick(DialogInterface dialog, int which) { + public void onClick(DialogInterface dialog, int which) { //TODO make icon? gear? // the user will have to return to the app themselves. Intent intent = new Intent(AutofillService.this, AutofillPreferenceActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); |
