summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java3
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java7
2 files changed, 5 insertions, 5 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 1ebf4828..474c3e35 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java
@@ -137,7 +137,8 @@ public class AutofillFragment extends DialogFragment {
builder.setNeutralButton(R.string.autofill_apps_delete, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
- if (packageName != null && !packageName.equals("")) {
+ if (((AutofillPreferenceActivity) getActivity()).recyclerAdapter != null
+ && packageName != null && !packageName.equals("")) {
editor.remove(packageName);
((AutofillPreferenceActivity) getActivity()).recyclerAdapter.removeWebsite(packageName);
editor.apply();
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 c17d25d5..305dfdfa 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
@@ -111,10 +111,9 @@ public class AutofillService extends AccessibilityService {
webViewURL = null;
if (webViewTitle != null) {
- List<AccessibilityNodeInfo> nodes = new ArrayList<>();
- if (event.getSource().getPackageName().equals("com.android.chrome")) {
- nodes = getRootInActiveWindow().findAccessibilityNodeInfosByViewId("com.android.chrome:id/url_bar");
- } else if (event.getSource().getPackageName().equals("com.android.browser")) {
+ List<AccessibilityNodeInfo> nodes = getRootInActiveWindow()
+ .findAccessibilityNodeInfosByViewId("com.android.chrome:id/url_bar");
+ if (nodes.size() == 0) {
nodes = getRootInActiveWindow().findAccessibilityNodeInfosByViewId("com.android.browser:id/url");
}
for (AccessibilityNodeInfo node : nodes)