Class ShadowAccessibilityWindowInfo


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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void __constructor__()  
      void addChild​(android.view.accessibility.AccessibilityWindowInfo child)  
      static boolean areThereUnrecycledWindows​(boolean printUnrecycledWindowsToSystemErr)
      Check for leaked objects that were obtained but never recycled.
      boolean deepEquals​(java.lang.Object object)  
      protected void getBoundsInScreen​(android.graphics.Rect outBounds)  
      protected android.view.accessibility.AccessibilityWindowInfo getChild​(int index)  
      protected int getChildCount()  
      protected int getId()  
      protected int getLayer()  
      protected android.view.accessibility.AccessibilityWindowInfo getParent()  
      protected android.view.accessibility.AccessibilityNodeInfo getRoot()  
      protected java.lang.CharSequence getTitle()
      Returns the title of this window, or null if none is available.
      protected int getType()  
      int hashCode()  
      protected boolean isAccessibilityFocused()  
      protected boolean isActive()  
      protected boolean isFocused()  
      protected static android.view.accessibility.AccessibilityWindowInfo obtain()  
      protected static android.view.accessibility.AccessibilityWindowInfo obtain​(android.view.accessibility.AccessibilityWindowInfo window)  
      protected void recycle()  
      static void resetObtainedInstances()
      Clear list of obtained instance objects.
      void setAccessibilityFocused​(boolean value)  
      void setActive​(boolean value)  
      void setBoundsInScreen​(android.graphics.Rect bounds)  
      void setFocused​(boolean focused)  
      void setId​(int value)  
      void setLayer​(int value)  
      void setRoot​(android.view.accessibility.AccessibilityNodeInfo root)  
      void setTitle​(java.lang.CharSequence value)
      Sets the title of this window.
      void setType​(int value)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ShadowAccessibilityWindowInfo

        public ShadowAccessibilityWindowInfo()
    • Method Detail

      • __constructor__

        @Implementation
        protected void __constructor__()
      • obtain

        @Implementation
        protected static android.view.accessibility.AccessibilityWindowInfo obtain()
      • obtain

        @Implementation
        protected static android.view.accessibility.AccessibilityWindowInfo obtain​(android.view.accessibility.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​(java.lang.Object object)
      • hashCode

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

        @Implementation
        protected int getType()
      • getChildCount

        @Implementation
        protected int getChildCount()
      • getChild

        @Implementation
        protected android.view.accessibility.AccessibilityWindowInfo getChild​(int index)
      • getParent

        @Implementation
        protected android.view.accessibility.AccessibilityWindowInfo getParent()
      • getRoot

        @Implementation
        protected android.view.accessibility.AccessibilityNodeInfo getRoot()
      • isActive

        @Implementation
        protected boolean isActive()
      • getId

        @Implementation
        protected int getId()
      • getBoundsInScreen

        @Implementation
        protected void getBoundsInScreen​(android.graphics.Rect outBounds)
      • getLayer

        @Implementation
        protected int getLayer()
      • getTitle

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

        @Implementation
        protected boolean isFocused()
      • isAccessibilityFocused

        @Implementation
        protected boolean isAccessibilityFocused()
      • recycle

        @Implementation
        protected void recycle()
      • setRoot

        public void setRoot​(android.view.accessibility.AccessibilityNodeInfo root)
      • setType

        public void setType​(int value)
      • setBoundsInScreen

        public void setBoundsInScreen​(android.graphics.Rect bounds)
      • setAccessibilityFocused

        public void setAccessibilityFocused​(boolean value)
      • setActive

        public void setActive​(boolean value)
      • setId

        public void setId​(int value)
      • setLayer

        public void setLayer​(int value)
      • setTitle

        public void setTitle​(java.lang.CharSequence value)
        Sets the title of this window.
        Parameters:
        value - The CharSequence to set as the title of this window
      • setFocused

        public void setFocused​(boolean focused)
      • addChild

        public void addChild​(android.view.accessibility.AccessibilityWindowInfo child)
      • toString

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