From e169235d961d93105f210d0c3c4dc29a21008c68 Mon Sep 17 00:00:00 2001 From: Felix Bechstein Date: Wed, 2 Aug 2017 11:15:31 +0200 Subject: Fix more lint (#325) * fix/ignore lint errors, run lint on travis * fix/ignore some lint warnings --- .../pwdstore/autofill/AutofillRecyclerAdapter.java | 39 +++++++++++----------- 1 file changed, 19 insertions(+), 20 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 80942c58..b28687d8 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java @@ -18,23 +18,23 @@ import com.zeapo.pwdstore.R; import java.util.ArrayList; import java.util.List; -public class AutofillRecyclerAdapter extends RecyclerView.Adapter { +class AutofillRecyclerAdapter extends RecyclerView.Adapter { private SortedList apps; private ArrayList allApps; // for filtering, maintain a list of all private AutofillPreferenceActivity activity; - Drawable browserIcon = null; + private Drawable browserIcon = null; - public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { + class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { public View view; public TextView name; - public TextView secondary; + TextView secondary; public ImageView icon; - public String packageName; - public String appName; - public Boolean isWeb; + String packageName; + String appName; + Boolean isWeb; - public ViewHolder(View view) { + ViewHolder(View view) { super(view); this.view = view; name = (TextView) view.findViewById(R.id.app_name); @@ -50,13 +50,13 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter allApps, final PackageManager pm + AutofillRecyclerAdapter(List allApps, final PackageManager pm , AutofillPreferenceActivity activity) { SortedList.Callback callback = new SortedListAdapterCallback(this) { // don't take into account secondary text. This is good enough @@ -92,7 +92,6 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter(AppInfo.class, callback); this.apps.addAll(allApps); this.allApps = new ArrayList<>(allApps); - PackageManager pm1 = pm; this.activity = activity; try { browserIcon = activity.getPackageManager().getApplicationIcon("com.android.browser"); @@ -155,28 +154,28 @@ public class AutofillRecyclerAdapter extends RecyclerView.Adapter