/** * Returns true if the given child view is the same class or a sub class of * the given parent view class * * @param parentViewFqcn the fully qualified class name of the parent view * @param childViewFqcn the fully qualified class name of the child view * @return true if the child view is a sub view of (or the same class as) * the parent view */ public boolean isSubViewOf(@NonNull String parentViewFqcn, @NonNull String childViewFqcn) { while (!childViewFqcn.equals("android.view.View")) { if (parentViewFqcn.equals(childViewFqcn)) { return true; } String parent = getParentViewClass(childViewFqcn); if (parent == null) { // Unknown view - err on the side of caution return true; } childViewFqcn = parent; } return false; }
String parent = sdkInfo.getParentViewClass(className); if (parent == null) { if (internalName == null) {