mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 05:48:09 +00:00
fix stackoverflow case by limiting the depth of search to 10
This commit is contained in:
parent
72e441aafe
commit
2a3b82eb8a
@ -221,8 +221,11 @@ public class AutofillService extends AccessibilityService {
|
|||||||
}
|
}
|
||||||
showDialog(packageName, appName, isWeb);
|
showDialog(packageName, appName, isWeb);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String searchWebView(AccessibilityNodeInfo source) {
|
private String searchWebView(AccessibilityNodeInfo source) {
|
||||||
|
return searchWebView(source, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String searchWebView(AccessibilityNodeInfo source, int depth) {
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -237,8 +240,9 @@ public class AutofillService extends AccessibilityService {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if (searchWebView(u) != null) {
|
String webView = searchWebView(u, depth - 1);
|
||||||
return searchWebView(u);
|
if (webView != null) {
|
||||||
|
return webView;
|
||||||
}
|
}
|
||||||
u.recycle();
|
u.recycle();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user