From 1c3a4fe763e6722d7398afe518f22c66254c356e Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Thu, 31 Dec 2015 03:47:51 -0500 Subject: Use URL as package name for app/website settings and match Chrome using URL. But use site title for automatching attempts when URL match not found --- .../pwdstore/autofill/AutofillRecyclerAdapter.java | 41 ++++++++++++++-------- 1 file changed, 26 insertions(+), 15 deletions(-) (limited to 'app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java') 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 2a567254..901ff903 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java @@ -24,6 +24,7 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter allApps; // for filtering, maintain a list of all private PackageManager pm; private AutofillPreferenceActivity activity; + Drawable browserIcon = null; public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { public View view; @@ -32,6 +33,7 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter(allApps); this.pm = pm; this.activity = activity; + try { + browserIcon = activity.getPackageManager().getApplicationIcon("com.android.browser"); + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } } @Override @@ -105,6 +114,7 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter