Package org.robolectric.shadows
Class ShadowAccessibilityWindowInfo
java.lang.Object
org.robolectric.shadows.ShadowAccessibilityWindowInfo
@Implements(android.view.accessibility.AccessibilityWindowInfo.class)
public class ShadowAccessibilityWindowInfo
extends Object
Shadow of
AccessibilityWindowInfo
that allows a test to set
properties that are locked in the original class.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
addChild
(AccessibilityWindowInfo child) static boolean
areThereUnrecycledWindows
(boolean printUnrecycledWindowsToSystemErr) Check for leaked objects that wereobtain
ed but neverrecycle
d.boolean
deepEquals
(Object object) protected AccessibilityNodeInfo
protected void
getBoundsInScreen
(Rect outBounds) protected AccessibilityWindowInfo
getChild
(int index) protected int
protected int
getId()
protected int
getLayer()
protected AccessibilityWindowInfo
protected AccessibilityNodeInfo
getRoot()
protected CharSequence
getTitle()
Returns the title of this window, ornull
if none is available.protected int
getType()
int
hashCode()
protected boolean
protected boolean
isActive()
protected boolean
protected boolean
protected static AccessibilityWindowInfo
obtain()
protected static AccessibilityWindowInfo
obtain
(AccessibilityWindowInfo window) protected void
recycle()
static void
Clear list of obtained instance objects.void
setAccessibilityFocused
(boolean value) void
setActive
(boolean value) void
setAnchor
(AccessibilityNodeInfo anchor) void
setBoundsInScreen
(Rect bounds) void
setFocused
(boolean focused) void
setId
(int value) void
setLayer
(int value) void
setPictureInPicture
(boolean pictureInPicture) void
setRoot
(AccessibilityNodeInfo root) void
setTitle
(CharSequence value) Sets the title of this window.void
setType
(int value) toString()
-
Constructor Details
-
ShadowAccessibilityWindowInfo
public ShadowAccessibilityWindowInfo()
-
-
Method Details
-
__constructor__
-
obtain
-
obtain
-
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 wereobtain
ed but neverrecycle
d.- Parameters:
printUnrecycledWindowsToSystemErr
- - if true, stack traces of calls toobtain
that lack matching calls torecycle
are dumped to System.err.- Returns:
true
if there are unrecycled windows
-
deepEquals
-
hashCode
-
getType
-
getChildCount
-
getChild
-
getParent
-
getRoot
-
getAnchor
-
isActive
-
getId
-
getBoundsInScreen
-
getLayer
-
getTitle
Returns the title of this window, ornull
if none is available. -
isFocused
-
isAccessibilityFocused
-
isInPictureInPictureMode
-
recycle
-
setRoot
-
setAnchor
-
setType
-
setBoundsInScreen
-
setAccessibilityFocused
-
setActive
-
setId
-
setLayer
-
setTitle
Sets the title of this window.- Parameters:
value
- TheCharSequence
to set as the title of this window
-
setFocused
-
setPictureInPicture
-
addChild
-
toString
-