mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 13:27:46 +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);
|
||||
}
|
||||
|
||||
private String searchWebView(AccessibilityNodeInfo source) {
|
||||
return searchWebView(source, 10);
|
||||
}
|
||||
|
||||
private String searchWebView(AccessibilityNodeInfo source, int depth) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
@ -237,8 +240,9 @@ public class AutofillService extends AccessibilityService {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
if (searchWebView(u) != null) {
|
||||
return searchWebView(u);
|
||||
String webView = searchWebView(u, depth - 1);
|
||||
if (webView != null) {
|
||||
return webView;
|
||||
}
|
||||
u.recycle();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user