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 import android.view.accessibility.AccessibilityWindowInfo;
     25 
     26 /**
     27  * Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService.
     28  *
     29  * @hide
     30  */
     31 interface IAccessibilityServiceConnection {
     32 
     33     void setServiceInfo(in AccessibilityServiceInfo info);
     34 
     35     boolean findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
     36         long accessibilityNodeId, int interactionId,
     37         IAccessibilityInteractionConnectionCallback callback, int flags, long threadId);
     38 
     39     boolean findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
     40         String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
     41         long threadId);
     42 
     43     boolean findAccessibilityNodeInfosByViewId(int accessibilityWindowId,
     44         long accessibilityNodeId, String viewId, int interactionId,
     45         IAccessibilityInteractionConnectionCallback callback, long threadId);
     46 
     47     boolean findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType,
     48         int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
     49 
     50     boolean focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction,
     51         int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
     52 
     53     boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId,
     54         int action, in Bundle arguments, int interactionId,
     55         IAccessibilityInteractionConnectionCallback callback, long threadId);
     56 
     57     AccessibilityWindowInfo getWindow(int windowId);
     58 
     59     List<AccessibilityWindowInfo> getWindows();
     60 
     61     AccessibilityServiceInfo getServiceInfo();
     62 
     63     boolean performGlobalAction(int action);
     64 
     65     oneway void setOnKeyEventResult(boolean handled, int sequence);
     66 }
     67