Home | History | Annotate | Download | only in accessibilityservice
      1 /*
      2  * Copyright (C) 2009 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package android.accessibilityservice;
     18 
     19 import android.os.Bundle;
     20 import android.accessibilityservice.AccessibilityServiceInfo;
     21 import android.view.MagnificationSpec;
     22 import android.view.accessibility.AccessibilityNodeInfo;
     23 import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
     24 
     25 /**
     26  * Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService.
     27  *
     28  * @hide
     29  */
     30 interface IAccessibilityServiceConnection {
     31 
     32     void setServiceInfo(in AccessibilityServiceInfo info);
     33 
     34     boolean findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
     35         long accessibilityNodeId, int interactionId,
     36         IAccessibilityInteractionConnectionCallback callback, int flags, long threadId);
     37 
     38     boolean findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
     39         String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
     40         long threadId);
     41 
     42     boolean findAccessibilityNodeInfosByViewId(int accessibilityWindowId,
     43         long accessibilityNodeId, String viewId, int interactionId,
     44         IAccessibilityInteractionConnectionCallback callback, long threadId);
     45 
     46     boolean findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType,
     47         int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
     48 
     49     boolean focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction,
     50         int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
     51 
     52     boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId,
     53         int action, in Bundle arguments, int interactionId,
     54         IAccessibilityInteractionConnectionCallback callback, long threadId);
     55 
     56     AccessibilityServiceInfo getServiceInfo();
     57 
     58     boolean performGlobalAction(int action);
     59 
     60     oneway void setOnKeyEventResult(boolean handled, int sequence);
     61 }
     62