FileDocCategorySizeDatePackage
AccessibilityManager.javaAPI DocAndroid 5.1 API8539Thu Mar 12 22:22:44 GMT 2015android.view.accessibility

AccessibilityManager

public final class AccessibilityManager extends Object
System level service that serves as an event dispatch for {@link AccessibilityEvent}s. Such events are generated when something notable happens in the user interface, for example an {@link android.app.Activity} starts, the focus or selection of a {@link android.view.View} changes etc. Parties interested in handling accessibility events implement and register an accessibility service which extends {@code android.accessibilityservice.AccessibilityService}.
see
AccessibilityEvent
see
android.content.Context#getSystemService

Fields Summary
private static AccessibilityManager
sInstance
private final IAccessibilityManagerClient.Stub
mClient
Constructors Summary
public AccessibilityManager(android.content.Context context, IAccessibilityManager service, int userId)
Create an instance.

param
context A {@link Context}.

    
Methods Summary
public intaddAccessibilityInteractionConnection(android.view.IWindow windowToken, IAccessibilityInteractionConnection connection)

        return View.NO_ID;
    
public booleanaddAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager$AccessibilityStateChangeListener listener)
Registers an {@link AccessibilityStateChangeListener} for changes in the global accessibility state of the system.

param
listener The listener.
return
True if successfully registered.

        return true;
    
public booleanaddHighTextContrastStateChangeListener(android.view.accessibility.AccessibilityManager$HighTextContrastChangeListener listener)
Registers a {@link HighTextContrastChangeListener} for changes in the global high text contrast state of the system.

param
listener The listener.
return
True if successfully registered.

        return true;
    
public booleanaddTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager$TouchExplorationStateChangeListener listener)
Registers a {@link TouchExplorationStateChangeListener} for changes in the global touch exploration state of the system.

param
listener The listener.
return
True if successfully registered.

        return true;
    
public java.util.ListgetAccessibilityServiceList()
Returns the {@link ServiceInfo}s of the installed accessibility services.

return
An unmodifiable list with {@link ServiceInfo}s.

        return Collections.emptyList();
    
public IAccessibilityManagerClientgetClient()

        return mClient;
    
public java.util.ListgetEnabledAccessibilityServiceList(int feedbackTypeFlags)
Returns the {@link AccessibilityServiceInfo}s of the enabled accessibility services for a given feedback type.

param
feedbackTypeFlags The feedback type flags.
return
An unmodifiable list with {@link AccessibilityServiceInfo}s.
see
AccessibilityServiceInfo#FEEDBACK_AUDIBLE
see
AccessibilityServiceInfo#FEEDBACK_GENERIC
see
AccessibilityServiceInfo#FEEDBACK_HAPTIC
see
AccessibilityServiceInfo#FEEDBACK_SPOKEN
see
AccessibilityServiceInfo#FEEDBACK_VISUAL

        return Collections.emptyList();
    
public java.util.ListgetInstalledAccessibilityServiceList()

        return Collections.emptyList();
    
public static android.view.accessibility.AccessibilityManagergetInstance(android.content.Context context)
Get an AccessibilityManager instance (create one if necessary).


                 
         
        return sInstance;
    
public voidinterrupt()
Requests interruption of the accessibility feedback from all accessibility services.

    
public booleanisEnabled()
Returns if the {@link AccessibilityManager} is enabled.

return
True if this {@link AccessibilityManager} is enabled, false otherwise.

        return false;
    
public booleanisHighTextContrastEnabled()
Returns if the high text contrast in the system is enabled.

Note: You need to query this only if you application is doing its own rendering and does not rely on the platform rendering pipeline.

        return false;
    
public booleanisTouchExplorationEnabled()
Returns if the touch exploration in the system is enabled.

return
True if touch exploration is enabled, false otherwise.

        return true;
    
public voidremoveAccessibilityInteractionConnection(android.view.IWindow windowToken)

    
public booleanremoveAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager$AccessibilityStateChangeListener listener)

        return true;
    
public booleanremoveHighTextContrastStateChangeListener(android.view.accessibility.AccessibilityManager$HighTextContrastChangeListener listener)
Unregisters a {@link HighTextContrastChangeListener}.

param
listener The listener.
return
True if successfully unregistered.

        return true;
    
public booleanremoveTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager$TouchExplorationStateChangeListener listener)
Unregisters a {@link TouchExplorationStateChangeListener}.

param
listener The listener.
return
True if successfully unregistered.

        return true;
    
public voidsendAccessibilityEvent(AccessibilityEvent event)
Sends an {@link AccessibilityEvent}.

    
private voidsetStateLocked(int stateFlags)
Sets the current state and notifies listeners, if necessary.

param
stateFlags The state flags.