use of android.accessibilityservice.AccessibilityService in project Auto.js by hyb1996.
the class SimpleActionAutomator method performGlobalAction.
private boolean performGlobalAction(final int action) {
ensureAccessibilityServiceEnabled();
AccessibilityService service = mAccessibilityBridge.getService();
if (service == null)
return false;
return service.performGlobalAction(action);
}
use of android.accessibilityservice.AccessibilityService in project android_frameworks_base by ParanoidAndroid.
the class AccessibilityManagerService method notifyAccessibilityServicesDelayedLocked.
/**
* Performs {@link AccessibilityService}s delayed notification. The delay is configurable
* and denotes the period after the last event before notifying the service.
*
* @param event The event.
* @param isDefault True to notify default listeners, not default services.
*/
private void notifyAccessibilityServicesDelayedLocked(AccessibilityEvent event, boolean isDefault) {
try {
UserState state = getCurrentUserStateLocked();
for (int i = 0, count = state.mBoundServices.size(); i < count; i++) {
Service service = state.mBoundServices.get(i);
if (service.mIsDefault == isDefault) {
if (canDispathEventLocked(service, event, state.mHandledFeedbackTypes)) {
state.mHandledFeedbackTypes |= service.mFeedbackType;
service.notifyAccessibilityEvent(event);
}
}
}
} catch (IndexOutOfBoundsException oobe) {
// there are no more services to notify.
return;
}
}
Aggregations