
org.robolectric.shadows.ShadowAccessibilityService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import android.accessibilityservice.AccessibilityService;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.shadows.ShadowService;
import java.util.ArrayList;
import java.util.List;
/**
* Shadow of AccessibilityService that saves global actions to a list.
*/
@Implements(AccessibilityService.class)
public class ShadowAccessibilityService extends ShadowService {
private final List globalActionsPerformed = new ArrayList<>();
@Implementation
public final boolean performGlobalAction(int action) {
globalActionsPerformed.add(action);
return true;
}
@Implementation
public List getGlobalActionsPerformed() {
return globalActionsPerformed;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy