@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.
Constructor and Description |
---|
ShadowAccessibilityWindowInfo() |
Modifier and Type | Method and Description |
---|---|
protected void |
__constructor__() |
void |
addChild(android.view.accessibility.AccessibilityWindowInfo child) |
static boolean |
areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)
Check for leaked objects that were
obtain ed but never recycle d. |
boolean |
equals(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) |
@Implementation protected void __constructor__()
@Implementation protected static android.view.accessibility.AccessibilityWindowInfo obtain()
@Implementation protected static android.view.accessibility.AccessibilityWindowInfo obtain(android.view.accessibility.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(java.lang.Object object)
equals
in class java.lang.Object
@Implementation public int hashCode()
hashCode
in class java.lang.Object
@Implementation protected int getType()
@Implementation protected int getChildCount()
@Implementation protected android.view.accessibility.AccessibilityWindowInfo getChild(int index)
@Implementation protected android.view.accessibility.AccessibilityWindowInfo getParent()
@Implementation protected android.view.accessibility.AccessibilityNodeInfo getRoot()
@Implementation protected boolean isActive()
@Implementation protected int getId()
@Implementation protected void getBoundsInScreen(android.graphics.Rect outBounds)
@Implementation protected int getLayer()
@Implementation(minSdk=24) protected java.lang.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(android.view.accessibility.AccessibilityNodeInfo root)
public void setType(int value)
public void setBoundsInScreen(android.graphics.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(java.lang.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(android.view.accessibility.AccessibilityWindowInfo child)