@Implements(value=android.view.accessibility.AccessibilityWindowInfo.class, minSdk=21) public class ShadowAccessibilityWindowInfo extends Object
AccessibilityWindowInfo
that allows a test to set
properties that are locked in the original class.Constructor | Description |
---|---|
ShadowAccessibilityWindowInfo() |
Modifier and Type | Method | 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 |
deepEquals(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) |
|
String |
toString() |
@Implementation protected void __constructor__()
@Implementation protected static AccessibilityWindowInfo obtain()
@Implementation protected static AccessibilityWindowInfo obtain(AccessibilityWindowInfo window)
public static void resetObtainedInstances()
areThereUnrecycledWindows
will always
return false if called immediately afterwards.public static boolean areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)
obtain
ed but never
recycle
d.printUnrecycledWindowsToSystemErr
- - if true, stack traces of calls
to obtain
that lack matching calls to recycle
are
dumped to System.err.true
if there are unrecycled windowspublic boolean deepEquals(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()
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)
value
- The CharSequence
to set as the title of this windowpublic void setFocused(boolean focused)
public void addChild(AccessibilityWindowInfo child)
@Implementation public String toString()