| 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.accessibilityservice.MagnificationConfig; |
| 21 |
import android.content.pm.ParceledListSlice; |
| 22 |
import android.graphics.Bitmap; |
| 23 |
import android.graphics.Region; |
| 24 |
import android.os.Bundle; |
| 25 |
import android.os.RemoteCallback; |
| 26 |
import android.view.MagnificationSpec; |
| 27 |
import android.view.MotionEvent; |
| 28 |
import android.view.accessibility.AccessibilityNodeInfo; |
| 29 |
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; |
| 30 |
import android.view.accessibility.IAccessibilityInteractionConnectionCallback; |
| 31 |
import android.view.accessibility.AccessibilityWindowInfo; |
| 32 |
import java.util.List; |
| 33 |
|
| 34 |
/** |
| 35 |
* Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService. |
| 36 |
* |
| 37 |
* @hide |
| 38 |
*/ |
| 39 |
interface IAccessibilityServiceConnection { |
| 40 |
|
| 41 |
void setServiceInfo(in AccessibilityServiceInfo info); |
| 42 |
|
| 43 |
void setAttributionTag(in String attributionTag); |
| 44 |
|
| 45 |
String[] findAccessibilityNodeInfoByAccessibilityId(int accessibilityWindowId, |
| 46 |
long accessibilityNodeId, int interactionId, |
| 47 |
IAccessibilityInteractionConnectionCallback callback, int flags, long threadId, |
| 48 |
in Bundle arguments); |
| 49 |
|
| 50 |
String[] findAccessibilityNodeInfosByText(int accessibilityWindowId, long accessibilityNodeId, |
| 51 |
String text, int interactionId, IAccessibilityInteractionConnectionCallback callback, |
| 52 |
long threadId); |
| 53 |
|
| 54 |
String[] findAccessibilityNodeInfosByViewId(int accessibilityWindowId, |
| 55 |
long accessibilityNodeId, String viewId, int interactionId, |
| 56 |
IAccessibilityInteractionConnectionCallback callback, long threadId); |
| 57 |
|
| 58 |
String[] findFocus(int accessibilityWindowId, long accessibilityNodeId, int focusType, |
| 59 |
int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId); |
| 60 |
|
| 61 |
String[] focusSearch(int accessibilityWindowId, long accessibilityNodeId, int direction, |
| 62 |
int interactionId, IAccessibilityInteractionConnectionCallback callback, long threadId); |
| 63 |
|
| 64 |
boolean performAccessibilityAction(int accessibilityWindowId, long accessibilityNodeId, |
| 65 |
int action, in Bundle arguments, int interactionId, |
| 66 |
IAccessibilityInteractionConnectionCallback callback, long threadId); |
| 67 |
|
| 68 |
AccessibilityWindowInfo getWindow(int windowId); |
| 69 |
|
| 70 |
AccessibilityWindowInfo.WindowListSparseArray getWindows(); |
| 71 |
|
| 72 |
AccessibilityServiceInfo getServiceInfo(); |
| 73 |
|
| 74 |
boolean performGlobalAction(int action); |
| 75 |
List<AccessibilityNodeInfo.AccessibilityAction> getSystemActions(); |
| 76 |
|
| 77 |
void disableSelf(); |
| 78 |
|
| 79 |
oneway void setOnKeyEventResult(boolean handled, int sequence); |
| 80 |
|
| 81 |
MagnificationConfig getMagnificationConfig(int displayId); |
| 82 |
|
| 83 |
float getMagnificationScale(int displayId); |
| 84 |
|
| 85 |
float getMagnificationCenterX(int displayId); |
| 86 |
|
| 87 |
float getMagnificationCenterY(int displayId); |
| 88 |
|
| 89 |
Region getMagnificationRegion(int displayId); |
| 90 |
|
| 91 |
Region getCurrentMagnificationRegion(int displayId); |
| 92 |
|
| 93 |
boolean resetMagnification(int displayId, boolean animate); |
| 94 |
|
| 95 |
boolean resetCurrentMagnification(int displayId, boolean animate); |
| 96 |
|
| 97 |
boolean setMagnificationConfig(int displayId, in MagnificationConfig config, boolean animate); |
| 98 |
|
| 99 |
void setMagnificationCallbackEnabled(int displayId, boolean enabled); |
| 100 |
|
| 101 |
boolean setSoftKeyboardShowMode(int showMode); |
| 102 |
|
| 103 |
int getSoftKeyboardShowMode(); |
| 104 |
|
| 105 |
void setSoftKeyboardCallbackEnabled(boolean enabled); |
| 106 |
|
| 107 |
boolean switchToInputMethod(String imeId); |
| 108 |
|
| 109 |
int setInputMethodEnabled(String imeId, boolean enabled); |
| 110 |
|
| 111 |
boolean isAccessibilityButtonAvailable(); |
| 112 |
|
| 113 |
void sendGesture(int sequence, in ParceledListSlice gestureSteps); |
| 114 |
|
| 115 |
void dispatchGesture(int sequence, in ParceledListSlice gestureSteps, int displayId); |
| 116 |
|
| 117 |
boolean isFingerprintGestureDetectionAvailable(); |
| 118 |
|
| 119 |
IBinder getOverlayWindowToken(int displayid); |
| 120 |
|
| 121 |
int getWindowIdForLeashToken(IBinder token); |
| 122 |
|
| 123 |
void takeScreenshot(int displayId, in RemoteCallback callback); |
| 124 |
|
| 125 |
void setGestureDetectionPassthroughRegion(int displayId, in Region region); |
| 126 |
|
| 127 |
void setTouchExplorationPassthroughRegion(int displayId, in Region region); |
| 128 |
|
| 129 |
void setFocusAppearance(int strokeWidth, int color); |
| 130 |
|
| 131 |
void setCacheEnabled(boolean enabled); |
| 132 |
|
| 133 |
oneway void logTrace(long timestamp, String where, long loggingTypes, String callingParams, |
| 134 |
int processId, long threadId, int callingUid, in Bundle serializedCallingStackInBundle); |
| 135 |
|
| 136 |
void setServiceDetectsGesturesEnabled(int displayId, boolean mode); |
| 137 |
|
| 138 |
void requestTouchExploration(int displayId); |
| 139 |
|
| 140 |
void requestDragging(int displayId, int pointerId); |
| 141 |
|
| 142 |
void requestDelegating(int displayId); |
| 143 |
|
| 144 |
void onDoubleTap(int displayId); |
| 145 |
|
| 146 |
void onDoubleTapAndHold(int displayId); |
| 147 |
|
| 148 |
void setAnimationScale(float scale); |
| 149 |
} |