Package org.robolectric.shadows
Class ShadowAccessibilityManager
java.lang.Object
org.robolectric.shadows.ShadowAccessibilityManager
@Implements(android.view.accessibility.AccessibilityManager.class)
public class ShadowAccessibilityManager
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected void
addAccessibilityStateChangeListener
(AccessibilityManager.AccessibilityStateChangeListener listener, Handler handler) protected List<ServiceInfo>
protected List<AccessibilityServiceInfo>
getEnabledAccessibilityServiceList
(int feedbackTypeFlags) protected List<AccessibilityServiceInfo>
static AccessibilityManager
getInstance
(Context context) com.google.common.collect.ImmutableList<AccessibilityEvent>
Returns a list of all accessibility events that have been sent viasendAccessibilityEvent(android.view.accessibility.AccessibilityEvent)
.protected Object
getWindowTransformationSpec
(int windowId) This shadow method is required becauseDirectAccessibilityConnection
calls it to determine if any transformations have occurred on this window.protected static boolean
Returnstrue
by default, or the value specified viasetAccessibilityButtonSupported(boolean)
.protected boolean
protected boolean
protected void
protected boolean
removeAccessibilityStateChangeListener
(AccessibilityManager.AccessibilityStateChangeListener listener) static void
reset()
protected void
static void
setAccessibilityButtonSupported
(boolean supported) Sets that the system navigation area is supported accessibility button; controls the return value ofAccessibilityManager.isAccessibilityButtonSupported()
.void
setAccessibilityServiceList
(List<ServiceInfo> accessibilityServiceList) void
setEnabled
(boolean enabled) void
setEnabledAccessibilityServiceList
(List<AccessibilityServiceInfo> enabledAccessibilityServiceList) void
setInstalledAccessibilityServiceList
(List<AccessibilityServiceInfo> installedAccessibilityServiceList) void
setInteractiveUiTimeout
(int interactiveUiTimeoutMillis) void
setNonInteractiveUiTimeout
(int nonInteractiveUiTimeoutMillis) void
setTouchExplorationEnabled
(boolean touchExplorationEnabled)
-
Constructor Details
-
ShadowAccessibilityManager
public ShadowAccessibilityManager()
-
-
Method Details
-
reset
-
getInstance
@HiddenApi @Implementation public static AccessibilityManager getInstance(Context context) throws Exception - Throws:
Exception
-
addAccessibilityStateChangeListener
@Implementation protected boolean addAccessibilityStateChangeListener(AccessibilityManager.AccessibilityStateChangeListener listener) -
addAccessibilityStateChangeListener
@Implementation(minSdk=26) protected void addAccessibilityStateChangeListener(AccessibilityManager.AccessibilityStateChangeListener listener, Handler handler) -
removeAccessibilityStateChangeListener
@Implementation protected boolean removeAccessibilityStateChangeListener(AccessibilityManager.AccessibilityStateChangeListener listener) -
getAccessibilityServiceList
-
setInteractiveUiTimeout
public void setInteractiveUiTimeout(int interactiveUiTimeoutMillis) -
setNonInteractiveUiTimeout
public void setNonInteractiveUiTimeout(int nonInteractiveUiTimeoutMillis) -
setAccessibilityServiceList
-
getEnabledAccessibilityServiceList
@Nullable @Implementation protected List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(int feedbackTypeFlags) -
setEnabledAccessibilityServiceList
public void setEnabledAccessibilityServiceList(List<AccessibilityServiceInfo> enabledAccessibilityServiceList) -
getInstalledAccessibilityServiceList
-
setInstalledAccessibilityServiceList
public void setInstalledAccessibilityServiceList(List<AccessibilityServiceInfo> installedAccessibilityServiceList) -
sendAccessibilityEvent
-
getSentAccessibilityEvents
Returns a list of all accessibility events that have been sent viasendAccessibilityEvent(android.view.accessibility.AccessibilityEvent)
. -
isEnabled
-
setEnabled
public void setEnabled(boolean enabled) -
isTouchExplorationEnabled
-
setTouchExplorationEnabled
public void setTouchExplorationEnabled(boolean touchExplorationEnabled) -
isAccessibilityButtonSupported
Returnstrue
by default, or the value specified viasetAccessibilityButtonSupported(boolean)
. -
performAccessibilityShortcut
-
getWindowTransformationSpec
This shadow method is required becauseDirectAccessibilityConnection
calls it to determine if any transformations have occurred on this window. -
setAccessibilityButtonSupported
public static void setAccessibilityButtonSupported(boolean supported) Sets that the system navigation area is supported accessibility button; controls the return value ofAccessibilityManager.isAccessibilityButtonSupported()
.
-