fix 类型判断异常
This commit is contained in:
@@ -398,7 +398,6 @@ object AccessibilityUtil {
|
||||
var currentTime = startTime
|
||||
while (currentTime - startTime <= timeout) {
|
||||
val result = findOnceByText(node, *textList, exact = exact)
|
||||
LogUtils.v("text: ${textList.joinToString()} result == null: ${result == null}")
|
||||
if (result != null) return result
|
||||
sleep(SHORT_INTERVAL)
|
||||
if (root) {
|
||||
@@ -424,7 +423,7 @@ object AccessibilityUtil {
|
||||
else if (textNodeList.size > 0) {
|
||||
for (textNode in textNodeList) {
|
||||
for (text in textList) {
|
||||
if (textNode.text == text) {
|
||||
if (textNode.text?.toString() == text) {
|
||||
return textNode
|
||||
}
|
||||
}
|
||||
@@ -480,7 +479,7 @@ object AccessibilityUtil {
|
||||
list: ArrayList<AccessibilityNodeInfo> = ArrayList()
|
||||
): ArrayList<AccessibilityNodeInfo> {
|
||||
if (node == null) return list
|
||||
val nodeText = node.text
|
||||
val nodeText = node.text?.toString()
|
||||
if (nodeText != null) {
|
||||
for (text in textList) {
|
||||
if (exact && nodeText == text) {
|
||||
|
||||
Reference in New Issue
Block a user