Example usage for android.view.accessibility AccessibilityEvent getClass

List of usage examples for android.view.accessibility AccessibilityEvent getClass

Introduction

In this page you can find the example usage for android.view.accessibility AccessibilityEvent getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:com.ucmap.dingdinghelper.services.DingDingHelperAccessibilityService.java

/**
 * ???//  w  w  w. j  a  va2 s.c  o m
 */
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
    tag_callback_time = System.currentTimeMillis();
    int eventType = event.getEventType();

    Log.i("Info",
            " eventType: " + eventType + "   getEventTime:  " + event.getEventTime() + "     getAction"
                    + event.getAction() + "getContentChangeTypes:" + event.getContentChangeTypes()
                    + " getText :" + event.getText().toString() + "getPackageName :" + event.getPackageName()
                    + "getRecordCount : " + event.getRecordCount() + "  getClassName:" + event.getClassName()
                    + "  :" + event.getClass() + "   getParcelableData:" + event.getParcelableData());

    switch (eventType) {
    /*??*/
    case AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED:
        windowContentChanged();
        break;
    //???
    case AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED:
        notificationChanged(event);
        break;
    //Activity???
    case AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED:
        windowChanged(event);
        break;
    }
}