Java Code Examples for android.view.accessibility.AccessibilityNodeInfo#isPassword()

The following examples show how to use android.view.accessibility.AccessibilityNodeInfo#isPassword() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Tree.java    From oversec with GNU General Public License v3.0 6 votes vote down vote up
public void refresh(AccessibilityNodeInfo node) {
    if (sealed) {
        throw new IllegalArgumentException("sealed! " + super.toString());
    }

    mFocused = node.isFocused();
    node.getBoundsInScreen(mBoundsInScreen);
    node.getBoundsInParent(mBoundsInParent);

    mBoundsInScreen.offset(0, -OverlayDecryptView.SCREEN_OFFSET_Y);


    mText = AccessibilityNodeInfoUtils.getNodeText(node);
    mTextString = mText == null ? null : mText.toString();

    mIsEncoded = mText == null ? false : CryptoHandlerFacade.Companion.isEncoded(mCtx, mTextString);
    if (mIsEncoded) {
        mIsTextView = true;
    }
    mIsEditableTextNode = (node.isEditable()
            && node.isEnabled()
            && mIsEditText
            && !node.isPassword());
}
 
Example 2
Source File: AccessibilityNodeInfoDumper.java    From JsDroidCmd with Mozilla Public License 2.0 5 votes vote down vote up
public static void dumpNode(AccessibilityNodeInfo info, Node root,
		int index, int width, int height) {
	root.sourceId = info.getSourceNodeId();
	root.index = index;
	root.text = safeCharSeqToString(info.getText());
	root.res = safeCharSeqToString(info.getViewIdResourceName());
	root.clazz = safeCharSeqToString(info.getClassName());
	root.pkg = safeCharSeqToString(info.getPackageName());
	root.desc = safeCharSeqToString(info.getContentDescription());
	root.checkable = info.isCheckable();
	root.checked = info.isChecked();
	root.clickable = info.isClickable();
	root.enabled = info.isEnabled();
	root.focusable = info.isFocusable();
	root.focused = info.isFocused();
	root.scrollable = info.isScrollable();
	root.longClickable = info.isLongClickable();
	root.password = info.isPassword();
	root.selected = info.isSelected();
	android.graphics.Rect r = AccessibilityNodeInfoHelper
			.getVisibleBoundsInScreen(info, width, height);
	root.rect = new Rect(r.left, r.top, r.right, r.bottom);
	root.children = new ArrayList<Node>();
	int count = info.getChildCount();
	for (int i = 0; i < count; i++) {
		AccessibilityNodeInfo child = info.getChild(i);
		if (child != null) {
			if (child.isVisibleToUser()) {
				Node childNode = new Node();
				dumpNode(child, childNode, i, width, height);
				root.children.add(childNode);
				child.recycle();
			}
		}
	}
}
 
Example 3
Source File: AccessibilityNodeInfoHelpers.java    From appium-uiautomator2-server with Apache License 2.0 4 votes vote down vote up
public static boolean isPassword(@Nullable AccessibilityNodeInfo nodeInfo) {
    return nodeInfo != null && nodeInfo.isPassword();
}