Class ShadowAccessibilityWindowInfo

java.lang.Object
org.robolectric.shadows.ShadowAccessibilityWindowInfo

@Implements(value=android.view.accessibility.AccessibilityWindowInfo.class, minSdk=21) public class ShadowAccessibilityWindowInfo extends Object
Shadow of AccessibilityWindowInfo that allows a test to set properties that are locked in the original class.
  • Constructor Details

    • ShadowAccessibilityWindowInfo

      public ShadowAccessibilityWindowInfo()
  • Method Details

    • __constructor__

      @Implementation protected void __constructor__()
    • obtain

      @Implementation protected static AccessibilityWindowInfo obtain()
    • obtain

      @Implementation protected static AccessibilityWindowInfo obtain(AccessibilityWindowInfo window)
    • resetObtainedInstances

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

      public static boolean areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)
      Check for leaked objects that were obtained but never recycled.
      Parameters:
      printUnrecycledWindowsToSystemErr - - 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 windows
    • deepEquals

      public boolean deepEquals(Object object)
    • hashCode

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

      @Implementation protected int getType()
    • getChildCount

      @Implementation protected int getChildCount()
    • getChild

      @Implementation protected AccessibilityWindowInfo getChild(int index)
    • getParent

      @Implementation protected AccessibilityWindowInfo getParent()
    • getRoot

      @Implementation protected AccessibilityNodeInfo getRoot()
    • getAnchor

      @Implementation(minSdk=24) protected AccessibilityNodeInfo getAnchor()
    • isActive

      @Implementation protected boolean isActive()
    • getId

      @Implementation protected int getId()
    • getBoundsInScreen

      @Implementation protected void getBoundsInScreen(Rect outBounds)
    • getLayer

      @Implementation protected int getLayer()
    • getTitle

      @Implementation(minSdk=24) protected CharSequence getTitle()
      Returns the title of this window, or null if none is available.
    • isFocused

      @Implementation protected boolean isFocused()
    • isAccessibilityFocused

      @Implementation protected boolean isAccessibilityFocused()
    • isInPictureInPictureMode

      @Implementation(minSdk=26) protected boolean isInPictureInPictureMode()
    • recycle

      @Implementation protected void recycle()
    • setRoot

      public void setRoot(AccessibilityNodeInfo root)
    • setAnchor

      public void setAnchor(AccessibilityNodeInfo anchor)
    • setType

      @Implementation public void setType(int value)
    • setBoundsInScreen

      @Implementation(maxSdk=29) public void setBoundsInScreen(Rect bounds)
    • setAccessibilityFocused

      @Implementation public void setAccessibilityFocused(boolean value)
    • setActive

      @Implementation public void setActive(boolean value)
    • setId

      @Implementation public void setId(int value)
    • setLayer

      @Implementation public void setLayer(int value)
    • setTitle

      @Implementation(minSdk=24) public void setTitle(CharSequence value)
      Sets the title of this window.
      Parameters:
      value - The CharSequence to set as the title of this window
    • setFocused

      @Implementation public void setFocused(boolean focused)
    • setPictureInPicture

      @Implementation(minSdk=26) public void setPictureInPicture(boolean pictureInPicture)
    • addChild

      public void addChild(AccessibilityWindowInfo child)
    • toString

      @Implementation public String toString()
      Overrides:
      toString in class Object