Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#constants) \| [Inherited Constants](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#inhconstants) \| [Fields](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#lfields) \| [Ctors](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#inhmethods)

# AccessibilityWindowInfo

*** ** * ** ***


`
public

final

class
AccessibilityWindowInfo
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.accessibility.AccessibilityWindowInfo |

<br />

*** ** * ** ***

This class represents a state snapshot of a window for accessibility
purposes. The screen content contains one or more windows where some
windows can be descendants of other windows, which is the windows are
hierarchically ordered. Note that there is no root window. Hence, the
screen content can be seen as a collection of window trees.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_ACCESSIBILITY_OVERLAY` Window type: Windows that are overlaid *only* by an `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService` for interception of user interactions without changing the windows an accessibility service can introspect. |
| `int` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_APPLICATION` Window type: This is an application window. |
| `int` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_INPUT_METHOD` Window type: This is an input method window. |
| `int` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_MAGNIFICATION_OVERLAY` Window type: A system window used to show the UI for the interaction with window-based magnification, which includes the magnified content and the option menu. |
| `int` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_SPLIT_SCREEN_DIVIDER` Window type: A system window used to divide the screen in split-screen mode. |
| `int` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_SYSTEM` Window type: This is a system window. |
| `int` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_WINDOW_CONTROL` Window type: A system window that has the function to control an associated window. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that
the Parcelable object's flattened representation includes a file descriptor.


`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written
is a return value, that is the result of a function such as
"`Parcelable someFunction()`",
"`void someFunction(out Parcelable)`", or
"`void someFunction(inout Parcelable)`".


| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo>` | `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#CREATOR` |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#AccessibilityWindowInfo()() ` Creates a new `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo`. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#AccessibilityWindowInfo(android.view.accessibility.AccessibilityWindowInfo)(https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo info) ` Copy constructor. |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` boolean` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getAnchor()() ` Gets the node that anchors this window to another. |
| ` void` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getBoundsInScreen(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect outBounds) ` Gets the bounds of this window in the screen. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getChild(int)(int index) ` Gets the child window at a given index. |
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getChildCount()() ` Gets the number of child windows. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getControlledWindow(int)(int index) ` Gets the controlled window at the given index. |
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getControlledWindowsCount()() ` Gets the number of windows which are controlled by this window, if there are any. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getControllingWindow()() ` Gets the system window which has the functionality to control this window. |
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getDisplayId()() ` Returns the ID of the display this window is on, for use with `https://developer.android.com/reference/android/hardware/display/DisplayManager#getDisplay(int)`. |
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getId()() ` Gets the unique window id. |
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getLayer()() ` Gets the layer which determines the Z-order of the window. |
| ` https://developer.android.com/reference/android/os/LocaleList` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getLocales()() ` Return the `https://developer.android.com/reference/android/os/LocaleList` of the window. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getParent()() ` Gets the parent window. |
| ` void` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getRegionInScreen(android.graphics.Region)(https://developer.android.com/reference/android/graphics/Region outRegion) ` Gets the touchable region of this window in the screen. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getRoot(int)(int prefetchingStrategy) ` Gets the root node in the window's hierarchy. |
| ` https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getRoot()() ` Gets the root node in the window's hierarchy. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getTitle()() ` Gets the title of the window. |
| ` long` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getTransitionTimeMillis()() ` Return the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` at which the last transition happens. |
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getType()() ` Gets the type of the window. |
| ` int` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#hashCode()() ` Returns a hash code value for the object. |
| ` boolean` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#isAccessibilityFocused()() ` Gets if this window has accessibility focus. |
| ` boolean` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#isActive()() ` Gets if this window is active. |
| ` boolean` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#isFocused()() ` Gets if this window has input focus. |
| ` boolean` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#isInPictureInPictureMode()() ` Check if the window is in picture-in-picture mode. |
| ` static https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#obtain()() ` Returns a cached instance if such is available or a new one is created. |
| ` static https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#obtain(android.view.accessibility.AccessibilityWindowInfo)(https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo info) ` Returns a cached instance if such is available or a new one is created. |
| ` void` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#recycle()() ` Return an instance back to be reused. |
| ` boolean` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#refresh()() ` Refreshes this window with the latest state of the window it represents. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel parcel, int flags) ` Flatten this object in to a Parcel. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/android/os/Parcelable

` `
abstract


int` `
https://developer.android.com/reference/android/os/Parcelable#describeContents()()
`

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.


`
abstract


void` `
https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags)
`

Flatten this object in to a Parcel.


## Constants

### TYPE_ACCESSIBILITY_OVERLAY

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_ACCESSIBILITY_OVERLAY
```

Window type: Windows that are overlaid *only* by an `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService` for interception of
user interactions without changing the windows an accessibility service
can introspect. In particular, an accessibility service can introspect
only windows that a sighted user can interact with which they can touch
these windows or can type into these windows. For example, if there
is a full screen accessibility overlay that is touchable, the windows
below it will be introspectable by an accessibility service regardless
they are covered by a touchable window.

<br />

Constant Value:

4
(0x00000004)


### TYPE_APPLICATION

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_APPLICATION
```

Window type: This is an application window. Such a window shows UI for
interacting with an application.

<br />

Constant Value:

1
(0x00000001)


### TYPE_INPUT_METHOD

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_INPUT_METHOD
```

Window type: This is an input method window. Such a window shows UI for
inputting text such as keyboard, suggestions, etc.

<br />

Constant Value:

2
(0x00000002)


### TYPE_MAGNIFICATION_OVERLAY

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_MAGNIFICATION_OVERLAY
```

Window type: A system window used to show the UI for the interaction with
window-based magnification, which includes the magnified content and the option menu.

<br />

Constant Value:

6
(0x00000006)


### TYPE_SPLIT_SCREEN_DIVIDER

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_SPLIT_SCREEN_DIVIDER
```

Window type: A system window used to divide the screen in split-screen mode.
This type of window is present only in split-screen mode.

<br />

Constant Value:

5
(0x00000005)


### TYPE_SYSTEM

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_SYSTEM
```

Window type: This is a system window. Such a window shows UI for
interacting with the system.

<br />

Constant Value:

3
(0x00000003)


### TYPE_WINDOW_CONTROL

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TYPE_WINDOW_CONTROL
```

Window type: A system window that has the function to control an associated window.

Window associations can be determined using
`https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getControllingWindow()`,
`https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getControlledWindowsCount()` and
`https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getControlledWindow(int)`.

<br />

Constant Value:

7
(0x00000007)


## Fields

### CREATOR

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<AccessibilityWindowInfo> CREATOR
```

<br />

<br />

## Public constructors

### AccessibilityWindowInfo

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityWindowInfo ()
```

Creates a new `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo`.

<br />

### AccessibilityWindowInfo

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityWindowInfo (AccessibilityWindowInfo info)
```

Copy constructor. Creates a new `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo`, and this new instance is
initialized from given `info`.

<br />

| Parameters ||
|---|---|
| `info` | `AccessibilityWindowInfo`: The other info. This value cannot be `null`. <br /> |

## Public methods

### describeContents

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### equals

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object obj)
```

Indicates whether some other object is "equal to" this one.


The `equals` method implements an equivalence relation
on non-null object references:

- It is *reflexive*: for any non-null reference value `x`, `x.equals(x)` should return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


An equivalence relation partitions the elements it operates on
into *equivalence classes*; all the members of an
equivalence class are equal to each other. Members of an
equivalence class are substitutable for each other, at least
for some purposes.

<br />

| Parameters ||
|---|---|
| `obj` | `Object`: This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getAnchor

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo getAnchor ()
```

Gets the node that anchors this window to another.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` | The anchor node, or `null` if none exists. <br /> |

### getBoundsInScreen

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getBoundsInScreen (Rect outBounds)
```

Gets the bounds of this window in the screen. This is equivalent to get the bounds of the
Region from `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getRegionInScreen(android.graphics.Region)`.

<br />

| Parameters ||
|---|---|
| `outBounds` | `Rect`: The out window bounds. <br /> |

### getChild

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityWindowInfo getChild (int index)
```

Gets the child window at a given index.

<br />

| Parameters ||
|---|---|
| `index` | `int`: The index. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | The child. <br /> |

### getChildCount

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getChildCount ()
```

Gets the number of child windows.

<br />

| Returns ||
|---|---|
| `int` | The child count. <br /> |

### getControlledWindow

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public AccessibilityWindowInfo getControlledWindow (int index)
```

Gets the controlled window at the given index.

Clients should not depend on the order of the controlled windows. If the
controlled windows change, clients will receive a
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOWS_CHANGED`.

<br />

| Parameters ||
|---|---|
| `index` | `int`: The index. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | The `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` controlled by this window at the given `index`, or `null` if the connection is invalid or the window is no longer available. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IndexOutOfBoundsException` | If the index is out of range. |

### getControlledWindowsCount

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public int getControlledWindowsCount ()
```

Gets the number of windows which are controlled by this window, if there are any. If this
window is not of type `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_WINDOW_CONTROL` then this will
always return 0.

The returned list will not include children of the top level controlled windows. If the
number of controlled windows changes, clients will receive a
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOWS_CHANGED`.

<br />

| Returns ||
|---|---|
| `int` | The count of `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` controlled by this window, or 0 if this window does not control other windows. <br /> |

### getControllingWindow

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public AccessibilityWindowInfo getControllingWindow ()
```

Gets the system window which has the functionality to control this window.

If this window is the child of another window it may not be controlled directly.
In that case, to find the window control, check those of its ancestor windows.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | The window of `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_WINDOW_CONTROL` that controls this window if one exists, or `null` otherwise. <br /> |

### getDisplayId

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getDisplayId ()
```

Returns the ID of the display this window is on, for use with
`https://developer.android.com/reference/android/hardware/display/DisplayManager#getDisplay(int)`.

<br />

| Returns ||
|---|---|
| `int` | The logical display id. <br /> |

### getId

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getId ()
```

Gets the unique window id.

<br />

| Returns ||
|---|---|
| `int` | windowId The window id. <br /> |

### getLayer

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLayer ()
```

Gets the layer which determines the Z-order of the window. Windows
with greater layer appear on top of windows with lesser layer.

<br />

| Returns ||
|---|---|
| `int` | The window layer. <br /> |

### getLocales

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LocaleList getLocales ()
```

Return the `https://developer.android.com/reference/android/os/LocaleList` of the window.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/LocaleList` | the locales of the window. This value cannot be `null`. <br /> |

### getParent

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityWindowInfo getParent ()
```

Gets the parent window.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | The parent window, or `null` if none exists. <br /> |

### getRegionInScreen

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getRegionInScreen (Region outRegion)
```

Gets the touchable region of this window in the screen.

<br />

| Parameters ||
|---|---|
| `outRegion` | `Region`: The out window region. This value cannot be `null`. <br /> |

### getRoot

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo getRoot (int prefetchingStrategy)
```

Gets the root node in the window's hierarchy.


Returns `null` if connection is invalid. Otherwise, always returns a node, even if the
root is considered unimportant for accessibility. In this case, calling
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#isImportantForAccessibility()` on the returned node will return
`false`.

<br />

| Parameters ||
|---|---|
| `prefetchingStrategy` | `int`: the prefetching strategy. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#FLAG_PREFETCH_ANCESTORS` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#FLAG_PREFETCH_SIBLINGS` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#FLAG_PREFETCH_DESCENDANTS_HYBRID` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#FLAG_PREFETCH_DESCENDANTS_DEPTH_FIRST` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#FLAG_PREFETCH_DESCENDANTS_BREADTH_FIRST` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#FLAG_PREFETCH_UNINTERRUPTIBLE` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` | The root node. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getParent(int)`

### getRoot

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo getRoot ()
```

Gets the root node in the window's hierarchy.


Returns `null` if connection is invalid. Otherwise, always returns a node, even if the
root is considered unimportant for accessibility. In this case, calling
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#isImportantForAccessibility()` on the returned node will return
`false`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` | The root node. <br /> |

### getTitle

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getTitle ()
```

Gets the title of the window.


This is taken from the `https://developer.android.com/reference/android/view/Window`'s title, or its `https://developer.android.com/reference/android/view/WindowManager.LayoutParams` if that is unset.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The title of the window, or `null` if none is available. <br /> |

### getTransitionTimeMillis

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getTransitionTimeMillis ()
```

Return the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` at which the last transition happens.
A transition happens when `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getBoundsInScreen(android.graphics.Rect)` is changed.


Value is a non-negative timestamp in the
`https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base.

<br />

| Returns ||
|---|---|
| `long` | The transition timestamp. Value is a non-negative timestamp in the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` time base. <br /> |

### getType

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getType ()
```

Gets the type of the window.

<br />

| Returns ||
|---|---|
| `int` | The type. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_APPLICATION`
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_INPUT_METHOD`
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_SYSTEM`
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#TYPE_ACCESSIBILITY_OVERLAY`

### hashCode

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### isAccessibilityFocused

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAccessibilityFocused ()
```

Gets if this window has accessibility focus.

<br />

| Returns ||
|---|---|
| `boolean` | Whether has accessibility focus. <br /> |

### isActive

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isActive ()
```

Gets if this window is active. An active window is the one
the user is currently touching or the window has input focus
and the user is not touching any window.


This is defined as the window that most recently fired one
of the following events:
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED`,
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_VIEW_HOVER_ENTER`,
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_VIEW_HOVER_EXIT`.
In other words, the last window shown that also has input focus.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | Whether this is the active window. <br /> |

### isFocused

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isFocused ()
```

Gets if this window has input focus.

<br />

| Returns ||
|---|---|
| `boolean` | Whether has input focus. <br /> |

### isInPictureInPictureMode

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isInPictureInPictureMode ()
```

Check if the window is in picture-in-picture mode.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the window is in picture-in-picture mode, `false` otherwise. <br /> |

### obtain

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static AccessibilityWindowInfo obtain ()
```

Returns a cached instance if such is available or a new one is
created.

In most situations object pooling is not beneficial. Create a new instance using the
constructor `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#AccessibilityWindowInfo()` instead.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | An instance. <br /> |

### obtain

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static AccessibilityWindowInfo obtain (AccessibilityWindowInfo info)
```

Returns a cached instance if such is available or a new one is
created. The returned instance is initialized from the given
`info`.

In most situations object pooling is not beneficial. Create a new instance using the
constructor `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#AccessibilityWindowInfo(android.view.accessibility.AccessibilityWindowInfo)` instead.

<br />

| Parameters ||
|---|---|
| `info` | `AccessibilityWindowInfo`: The other info. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo` | An instance. <br /> |

### recycle

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void recycle ()
```

Return an instance back to be reused.


**Note:** You must not touch the object after calling this function.

In most situations object pooling is not beneficial, and recycling is not necessary.

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | If the info is already recycled. |

### refresh

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean refresh ()
```

Refreshes this window with the latest state of the window it represents.


**Note:** If this method returns false this info is obsolete
since it represents a window that is no longer exist.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the refresh succeeded. `false` if this window is no longer in the window tree (and thus it has become stale). <br /> |

### toString

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel parcel, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `parcel` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |