Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.TextUtils;
import android.view.accessibility.AccessibilityNodeInfo;

public class Main {

    public static AccessibilityNodeInfo findParentNodeInfoByClass(AccessibilityNodeInfo nodeInfo,
            String parentClass) {
        if (nodeInfo == null || TextUtils.isEmpty(parentClass)) {
            return null;
        }
        if (parentClass.equals(nodeInfo.getClassName())) {
            return nodeInfo;
        }
        return findParentNodeInfoByClass(nodeInfo.getParent(), parentClass);
    }
}