AccessibilityManagerCompat

Added in 1.1.0

class AccessibilityManagerCompat


Helper for accessing features in AccessibilityManager.

Summary

Nested types

This interface is deprecated.

Use AccessibilityManager.AccessibilityStateChangeListener directly instead of this listener.

This class is deprecated.

Use AccessibilityManager.AccessibilityStateChangeListener directly instead of this listener.

Listener for the system touch exploration state.

Public functions

java-static Boolean

This function is deprecated.

Use addAccessibilityStateChangeListener directly.

java-static Boolean
@ReplaceWith(expression = "manager.addTouchExplorationStateChangeListener(listener)")
addTouchExplorationStateChangeListener(
    manager: AccessibilityManager,
    listener: AccessibilityManagerCompat.TouchExplorationStateChangeListener
)

This function is deprecated.

Call addTouchExplorationStateChangeListener directly.

java-static (Mutable)List<AccessibilityServiceInfo!>!
@ReplaceWith(expression = "manager.getEnabledAccessibilityServiceList(feedbackTypeFlags)")
getEnabledAccessibilityServiceList(
    manager: AccessibilityManager!,
    feedbackTypeFlags: Int
)

This function is deprecated.

Use getEnabledAccessibilityServiceList directly.

java-static (Mutable)List<AccessibilityServiceInfo!>!
@ReplaceWith(expression = "manager.getInstalledAccessibilityServiceList()")
getInstalledAccessibilityServiceList(manager: AccessibilityManager!)

This function is deprecated.

Use getInstalledAccessibilityServiceList directly.

java-static Boolean

Whether the current accessibility request comes from an android.accessibilityservice.AccessibilityService with the isAccessibilityTool property set to true.

java-static Boolean
@ReplaceWith(expression = "manager.isTouchExplorationEnabled()")
isTouchExplorationEnabled(manager: AccessibilityManager!)

This function is deprecated.

Use isTouchExplorationEnabled directly.

java-static Boolean

This function is deprecated.

Use removeAccessibilityStateChangeListener directly.

java-static Boolean
@ReplaceWith(expression = "manager.removeTouchExplorationStateChangeListener(listener)")
removeTouchExplorationStateChangeListener(
    manager: AccessibilityManager,
    listener: AccessibilityManagerCompat.TouchExplorationStateChangeListener
)

This function is deprecated.

Call removeTouchExplorationStateChangeListener directly.

Public functions

addAccessibilityStateChangeListener

Added in 1.1.0
Deprecated in 1.1.0
java-static fun addAccessibilityStateChangeListener(
    manager: AccessibilityManager!,
    listener: AccessibilityManagerCompat.AccessibilityStateChangeListener!
): Boolean

Registers an AccessibilityManager.AccessibilityStateChangeListener for changes in the global accessibility state of the system.

Parameters
manager: AccessibilityManager!

The accessibility manager.

listener: AccessibilityManagerCompat.AccessibilityStateChangeListener!

The listener.

Returns
Boolean

True if successfully registered.

addTouchExplorationStateChangeListener

Added in 1.1.0
Deprecated in 1.15.0
@ReplaceWith(expression = "manager.addTouchExplorationStateChangeListener(listener)")
java-static fun addTouchExplorationStateChangeListener(
    manager: AccessibilityManager,
    listener: AccessibilityManagerCompat.TouchExplorationStateChangeListener
): Boolean

Registers a TouchExplorationStateChangeListener for changes in the global touch exploration state of the system.

Parameters
manager: AccessibilityManager

AccessibilityManager for which to add the listener.

listener: AccessibilityManagerCompat.TouchExplorationStateChangeListener

The listener.

Returns
Boolean

True if successfully registered.

getEnabledAccessibilityServiceList

Added in 1.1.0
Deprecated in 1.1.0
@ReplaceWith(expression = "manager.getEnabledAccessibilityServiceList(feedbackTypeFlags)")
java-static fun getEnabledAccessibilityServiceList(
    manager: AccessibilityManager!,
    feedbackTypeFlags: Int
): (Mutable)List<AccessibilityServiceInfo!>!

Returns the AccessibilityServiceInfos of the enabled accessibility services for a given feedback type.

Parameters
manager: AccessibilityManager!

The accessibility manager.

feedbackTypeFlags: Int

The feedback type flags.

Returns
(Mutable)List<AccessibilityServiceInfo!>!

An unmodifiable list with AccessibilityServiceInfos.

getInstalledAccessibilityServiceList

Added in 1.1.0
Deprecated in 1.1.0
@ReplaceWith(expression = "manager.getInstalledAccessibilityServiceList()")
java-static fun getInstalledAccessibilityServiceList(manager: AccessibilityManager!): (Mutable)List<AccessibilityServiceInfo!>!

Returns the AccessibilityServiceInfos of the installed accessibility services.

Parameters
manager: AccessibilityManager!

The accessibility manager.

Returns
(Mutable)List<AccessibilityServiceInfo!>!

An unmodifiable list with AccessibilityServiceInfos.

isRequestFromAccessibilityTool

Added in 1.12.0
java-static fun isRequestFromAccessibilityTool(manager: AccessibilityManager): Boolean

Whether the current accessibility request comes from an android.accessibilityservice.AccessibilityService with the isAccessibilityTool property set to true.

You can use this method inside android.view.accessibility.AccessibilityNodeProvider to decide how to populate your nodes.

Note: The return value is valid only when an android.view.accessibility.AccessibilityNodeInfo request is in progress, can change from one request to another, and has no meaning when a request is not in progress.

Returns
Boolean

True if the current request is from a tool that sets isAccessibilityTool.

isTouchExplorationEnabled

Added in 1.1.0
Deprecated in 1.1.0
@ReplaceWith(expression = "manager.isTouchExplorationEnabled()")
java-static fun isTouchExplorationEnabled(manager: AccessibilityManager!): Boolean

Returns if the touch exploration in the system is enabled.

Parameters
manager: AccessibilityManager!

The accessibility manager.

Returns
Boolean

True if touch exploration is enabled, false otherwise.

removeAccessibilityStateChangeListener

Added in 1.1.0
Deprecated in 1.1.0
java-static fun removeAccessibilityStateChangeListener(
    manager: AccessibilityManager!,
    listener: AccessibilityManagerCompat.AccessibilityStateChangeListener!
): Boolean

Unregisters an AccessibilityManager.AccessibilityStateChangeListener.

Parameters
manager: AccessibilityManager!

The accessibility manager.

listener: AccessibilityManagerCompat.AccessibilityStateChangeListener!

The listener.

Returns
Boolean

True if successfully unregistered.

removeTouchExplorationStateChangeListener

Added in 1.1.0
Deprecated in 1.15.0
@ReplaceWith(expression = "manager.removeTouchExplorationStateChangeListener(listener)")
java-static fun removeTouchExplorationStateChangeListener(
    manager: AccessibilityManager,
    listener: AccessibilityManagerCompat.TouchExplorationStateChangeListener
): Boolean

Unregisters a TouchExplorationStateChangeListener.

Parameters
manager: AccessibilityManager

AccessibilityManager for which to remove the listener.

listener: AccessibilityManagerCompat.TouchExplorationStateChangeListener

The listener.

Returns
Boolean

True if successfully unregistered.