Class ShadowAccessibilityNodeInfo

    • Constructor Detail

      • ShadowAccessibilityNodeInfo

        public ShadowAccessibilityNodeInfo()
    • Method Detail

      • __constructor__

        @Implementation
        protected void __constructor__()
      • areThereUnrecycledNodes

        public static boolean areThereUnrecycledNodes​(boolean printUnrecycledNodesToSystemErr)
        Check for leaked objects that were obtained but never recycled.
        Parameters:
        printUnrecycledNodesToSystemErr - - if true, stack traces of calls to obtain that lack matching calls to recycle are dumped to System.err.
        Returns:
        true if there are unrecycled nodes
      • resetObtainedInstances

        @Resetter
        public static void resetObtainedInstances()
        Clear list of obtained instance objects. areThereUnrecycledNodes will always return false if called immediately afterwards.
      • recycle

        @Implementation
        protected void recycle()
      • getChildCount

        @Implementation
        protected int getChildCount()
      • refresh

        @Implementation(minSdk=18)
        protected boolean refresh()
      • setRefreshReturnValue

        public void setRefreshReturnValue​(boolean refreshReturnValue)
      • isPasteable

        public boolean isPasteable()
      • isTextSelectionSetable

        public boolean isTextSelectionSetable()
      • setTextSelectionSetable

        public void setTextSelectionSetable​(boolean isTextSelectionSetable)
      • setPasteable

        public void setPasteable​(boolean isPasteable)
      • setText

        @Implementation
        protected void setText​(CharSequence t)
      • getText

        @Implementation
        protected CharSequence getText()
      • setTraversalAfter

        @Implementation(minSdk=22)
        protected void setTraversalAfter​(View view,
                                         int virtualDescendantId)
      • setTraversalAfter

        public void setTraversalAfter​(AccessibilityNodeInfo info)
        Sets the view whose node is visited after this one in accessibility traversal. This may be useful for configuring traversal order in tests before the corresponding views have been inflated.
        Parameters:
        info - The previous node.
        See Also:
        getTraversalAfter()
      • setTraversalBefore

        @Implementation(minSdk=22)
        protected void setTraversalBefore​(View info,
                                          int virtualDescendantId)
      • setTraversalBefore

        public void setTraversalBefore​(AccessibilityNodeInfo info)
        Sets the view before whose node this one should be visited during traversal. This may be useful for configuring traversal order in tests before the corresponding views have been inflated.
        Parameters:
        info - The view providing the preceding node.
        See Also:
        getTraversalBefore()
      • setSource

        @Implementation
        protected void setSource​(View source)
      • setSource

        @Implementation
        protected void setSource​(View root,
                                 int virtualDescendantId)
      • getWindowId

        @Implementation
        protected int getWindowId()
        Returns the id of the window from which the info comes.
      • performAction

        @Implementation
        protected boolean performAction​(int action)
      • performAction

        @Implementation
        protected boolean performAction​(int action,
                                        Bundle arguments)
      • equals

        @Implementation
        public boolean equals​(Object object)
        Equality check based on reference equality of the Views from which these instances were created, or the equality of their assigned IDs.
        Overrides:
        equals in class Object
      • hashCode

        @Implementation
        public int hashCode()
        Overrides:
        hashCode in class Object
      • addChild

        public void addChild​(AccessibilityNodeInfo child)
        Add a child node to this one. Also initializes the parent field of the child.
        Parameters:
        child - The node to be added as a child.
      • addChild

        @Implementation
        protected void addChild​(View child)
      • addChild

        @Implementation
        protected void addChild​(View root,
                                int virtualDescendantId)
      • getPerformedActions

        public List<Integer> getPerformedActions()
        Returns:
        The list of arguments for the various calls to performAction. Unmodifiable.
      • getPerformedActionsWithArgs

        public List<Pair<Integer,​Bundle>> getPerformedActionsWithArgs()
        Returns:
        The list of arguments for the various calls to performAction. Unmodifiable.
      • describeContents

        @Implementation
        protected int describeContents()
      • writeToParcel

        @Implementation
        protected void writeToParcel​(Parcel dest,
                                     int flags)