Prepend first/never keywords with / . file names won't begin with /
This commit is contained in:
parent
5caa665111
commit
640f6ff9bd
3 changed files with 9 additions and 9 deletions
|
@ -54,10 +54,10 @@ public class AutofillFragment extends DialogFragment {
|
||||||
case "":
|
case "":
|
||||||
((RadioButton) view.findViewById(R.id.use_default)).toggle();
|
((RadioButton) view.findViewById(R.id.use_default)).toggle();
|
||||||
break;
|
break;
|
||||||
case "first":
|
case "/first":
|
||||||
((RadioButton) view.findViewById(R.id.first)).toggle();
|
((RadioButton) view.findViewById(R.id.first)).toggle();
|
||||||
break;
|
break;
|
||||||
case "never":
|
case "/never":
|
||||||
((RadioButton) view.findViewById(R.id.never)).toggle();
|
((RadioButton) view.findViewById(R.id.never)).toggle();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -87,10 +87,10 @@ public class AutofillFragment extends DialogFragment {
|
||||||
editor.remove(packageName);
|
editor.remove(packageName);
|
||||||
break;
|
break;
|
||||||
case R.id.first:
|
case R.id.first:
|
||||||
editor.putString(packageName, "first");
|
editor.putString(packageName, "/first");
|
||||||
break;
|
break;
|
||||||
case R.id.never:
|
case R.id.never:
|
||||||
editor.putString(packageName, "never");
|
editor.putString(packageName, "/never");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
EditText matched = (EditText) view.findViewById(R.id.matched);
|
EditText matched = (EditText) view.findViewById(R.id.matched);
|
||||||
|
|
|
@ -104,10 +104,10 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter<AutofillRecycl
|
||||||
// "android:windowBackground"
|
// "android:windowBackground"
|
||||||
holder.view.setBackgroundResource(R.color.indigo_50);
|
holder.view.setBackgroundResource(R.color.indigo_50);
|
||||||
break;
|
break;
|
||||||
case "first":
|
case "/first":
|
||||||
holder.secondary.setText(R.string.autofill_apps_first);
|
holder.secondary.setText(R.string.autofill_apps_first);
|
||||||
break;
|
break;
|
||||||
case "never":
|
case "/never":
|
||||||
holder.secondary.setText(R.string.autofill_apps_never);
|
holder.secondary.setText(R.string.autofill_apps_never);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -125,17 +125,17 @@ public class AutofillService extends AccessibilityService {
|
||||||
final String appName = (applicationInfo != null ? packageManager.getApplicationLabel(applicationInfo) : "").toString();
|
final String appName = (applicationInfo != null ? packageManager.getApplicationLabel(applicationInfo) : "").toString();
|
||||||
|
|
||||||
// if autofill_default is checked and prefs.getString DNE, 'Automatically match with password'/"first" otherwise "never"
|
// if autofill_default is checked and prefs.getString DNE, 'Automatically match with password'/"first" otherwise "never"
|
||||||
String defValue = settings.getBoolean("autofill_default", true) ? "first" : "never";
|
String defValue = settings.getBoolean("autofill_default", true) ? "/first" : "/never";
|
||||||
SharedPreferences prefs = getSharedPreferences("autofill", Context.MODE_PRIVATE);
|
SharedPreferences prefs = getSharedPreferences("autofill", Context.MODE_PRIVATE);
|
||||||
String preference = prefs.getString(event.getPackageName().toString(), defValue);
|
String preference = prefs.getString(event.getPackageName().toString(), defValue);
|
||||||
switch (preference) {
|
switch (preference) {
|
||||||
case "first":
|
case "/first":
|
||||||
if (!PasswordRepository.isInitialized()) {
|
if (!PasswordRepository.isInitialized()) {
|
||||||
PasswordRepository.initialize(this);
|
PasswordRepository.initialize(this);
|
||||||
}
|
}
|
||||||
items = recursiveFilter(appName, null);
|
items = recursiveFilter(appName, null);
|
||||||
break;
|
break;
|
||||||
case "never":
|
case "/never":
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
if (!PasswordRepository.isInitialized()) {
|
if (!PasswordRepository.isInitialized()) {
|
||||||
|
|
Loading…
Reference in a new issue