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.accessibilityservice.AccessibilityServiceInfo;
     20 import android.content.pm.ParceledListSlice;
     21 import android.graphics.Region;
     22 import android.os.Bundle;
     23 import android.view.MagnificationSpec;
     24 import android.view.MotionEvent;
     25 import android.view.accessibility.AccessibilityNodeInfo;
     26 import android.view.accessibility.IAccessibilityInteractionConnectionCallback;
     27 import android.view.accessibility.AccessibilityWindowInfo;
     28 
     29 /**
     30  * Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService.
     31  *
     32  * @hide
     33  */
     34 interface IAccessibilityServiceConnection {
     35 
     36     void setServiceInfo(in AccessibilityServiceInfo info);
     37 
     38     boolean findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId,
     39         long accessibilityNodeId, int interactionId,
     40         IAccessibilityInteractionConnectionCallback callback, int flags, long threadId,
     41         in Bundle arguments);
     42 
     43     boolean findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId,
     44         String text, int interactionId, IAccessibilityInteractionConnectionCallback callback,
     45         long threadId);
     46 
     47     boolean findAccessibilityNodeInfosByViewId(int accessibilityWindowId,
     48         long accessibilityNodeId, String viewId, int interactionId,
     49         IAccessibilityInteractionConnectionCallback callback, long threadId);
     50 
     51     boolean findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType,
     52         int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
     53 
     54     boolean focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction,
     55         int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId);
     56 
     57     boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId,
     58         int action, in Bundle arguments, int interactionId,
     59         IAccessibilityInteractionConnectionCallback callback, long threadId);
     60 
     61     AccessibilityWindowInfo getWindow(int windowId);
     62 
     63     List<AccessibilityWindowInfo> getWindows();
     64 
     65     AccessibilityServiceInfo getServiceInfo();
     66 
     67     boolean performGlobalAction(int action);
     68 
     69     void disableSelf();
     70 
     71     oneway void setOnKeyEventResult(boolean handled, int sequence);
     72 
     73     float getMagnificationScale();
     74 
     75     float getMagnificationCenterX();
     76 
     77     float getMagnificationCenterY();
     78 
     79     Region getMagnificationRegion();
     80 
     81     boolean resetMagnification(boolean animate);
     82 
     83     boolean setMagnificationScaleAndCenter(float scale, float centerX, float centerY,
     84         boolean animate);
     85 
     86     void setMagnificationCallbackEnabled(boolean enabled);
     87 
     88     boolean setSoftKeyboardShowMode(int showMode);
     89 
     90     void setSoftKeyboardCallbackEnabled(boolean enabled);
     91 
     92     boolean isAccessibilityButtonAvailable();
     93 
     94     void sendGesture(int sequence, in ParceledListSlice gestureSteps);
     95 
     96     boolean isFingerprintGestureDetectionAvailable();
     97 }
     98