@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 and Description |
---|
ShadowAccessibilityWindowInfo() |
Modifier and Type | Method and Description |
---|---|
protected void |
__constructor__() |
void |
addChild(AccessibilityWindowInfo child) |
static boolean |
areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)
Check for leaked objects that were
obtain ed but never recycle d. |
boolean |
equals(Object object) |
protected void |
getBoundsInScreen(Rect outBounds) |
protected AccessibilityWindowInfo |
getChild(int index) |
protected int |
getChildCount() |
protected int |
getId() |
protected int |
getLayer() |
protected AccessibilityWindowInfo |
getParent() |
protected AccessibilityNodeInfo |
getRoot() |
protected 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 AccessibilityWindowInfo |
obtain() |
protected static AccessibilityWindowInfo |
obtain(AccessibilityWindowInfo window) |
protected void |
recycle() |
static void |
resetObtainedInstances()
Clear list of obtained instance objects.
|
void |
setAccessibilityFocused(boolean value) |
void |
setActive(boolean value) |
void |
setBoundsInScreen(Rect bounds) |
void |
setFocused(boolean focused) |
void |
setId(int value) |
void |
setLayer(int value) |
void |
setRoot(AccessibilityNodeInfo root) |
void |
setTitle(CharSequence value)
Sets the title of this window.
|
void |
setType(int value) |
@Implementation protected void __constructor__()
@Implementation protected static AccessibilityWindowInfo obtain()
@Implementation protected static AccessibilityWindowInfo obtain(AccessibilityWindowInfo window)
public static void resetObtainedInstances()
Clear list of obtained instance objects. areThereUnrecycledWindows
will always return false if called immediately afterwards.
public static boolean areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)
Check for leaked objects that were obtain
ed but never recycle
d.
printUnrecycledWindowsToSystemErr
- obtain
that lack matching calls to recycle
are dumped to System.err.true
if there are unrecycled windows@Implementation public boolean equals(Object object)
@Implementation public int hashCode()
@Implementation protected int getType()
@Implementation protected int getChildCount()
@Implementation protected AccessibilityWindowInfo getChild(int index)
@Implementation protected AccessibilityWindowInfo getParent()
@Implementation protected AccessibilityNodeInfo getRoot()
@Implementation protected boolean isActive()
@Implementation protected int getId()
@Implementation protected void getBoundsInScreen(Rect outBounds)
@Implementation protected int getLayer()
@Implementation(minSdk=24) protected CharSequence getTitle()
Returns the title of this window, or null
if none is available.
@Implementation protected boolean isFocused()
@Implementation protected boolean isAccessibilityFocused()
@Implementation protected void recycle()
public void setRoot(AccessibilityNodeInfo root)
public void setType(int value)
public void setBoundsInScreen(Rect bounds)
public void setAccessibilityFocused(boolean value)
public void setActive(boolean value)
public void setId(int value)
public void setLayer(int value)
public void setTitle(CharSequence value)
Sets the title of this window.
value
- The CharSequence
to set as the title of this windowpublic void setFocused(boolean focused)
public void addChild(AccessibilityWindowInfo child)