1 /* 2 ** Copyright 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.view.accessibility; 18 19 import android.app.RemoteAction; 20 import android.accessibilityservice.AccessibilityServiceInfo; 21 import android.accessibilityservice.IAccessibilityServiceConnection; 22 import android.accessibilityservice.IAccessibilityServiceClient; 23 import android.content.ComponentName; 24 import android.view.accessibility.AccessibilityEvent; 25 import android.view.accessibility.AccessibilityNodeInfo; 26 import android.view.accessibility.IAccessibilityInteractionConnection; 27 import android.view.accessibility.IAccessibilityManagerClient; 28 import android.view.accessibility.IWindowMagnificationConnection; 29 import android.view.IWindow; 30 31 /** 32 * Interface implemented by the AccessibilityManagerService called by 33 * the AccessibilityManagers. 34 * 35 * @hide 36 */ 37 interface IAccessibilityManager { 38 interrupt(int userId)39 oneway void interrupt(int userId); 40 sendAccessibilityEvent(in AccessibilityEvent uiEvent, int userId)41 oneway void sendAccessibilityEvent(in AccessibilityEvent uiEvent, int userId); 42 addClient(IAccessibilityManagerClient client, int userId)43 long addClient(IAccessibilityManagerClient client, int userId); 44 removeClient(IAccessibilityManagerClient client, int userId)45 boolean removeClient(IAccessibilityManagerClient client, int userId); 46 getInstalledAccessibilityServiceList(int userId)47 List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList(int userId); 48 49 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) getEnabledAccessibilityServiceList(int feedbackType, int userId)50 List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(int feedbackType, int userId); 51 addAccessibilityInteractionConnection(IWindow windowToken, IBinder leashToken, in IAccessibilityInteractionConnection connection, String packageName, int userId)52 int addAccessibilityInteractionConnection(IWindow windowToken, IBinder leashToken, 53 in IAccessibilityInteractionConnection connection, 54 String packageName, int userId); 55 removeAccessibilityInteractionConnection(IWindow windowToken)56 void removeAccessibilityInteractionConnection(IWindow windowToken); 57 setPictureInPictureActionReplacingConnection( in IAccessibilityInteractionConnection connection)58 void setPictureInPictureActionReplacingConnection( 59 in IAccessibilityInteractionConnection connection); 60 registerUiTestAutomationService(IBinder owner, IAccessibilityServiceClient client, in AccessibilityServiceInfo info, int flags)61 void registerUiTestAutomationService(IBinder owner, IAccessibilityServiceClient client, 62 in AccessibilityServiceInfo info, int flags); 63 unregisterUiTestAutomationService(IAccessibilityServiceClient client)64 void unregisterUiTestAutomationService(IAccessibilityServiceClient client); 65 temporaryEnableAccessibilityStateUntilKeyguardRemoved(in ComponentName service, boolean touchExplorationEnabled)66 void temporaryEnableAccessibilityStateUntilKeyguardRemoved(in ComponentName service, 67 boolean touchExplorationEnabled); 68 69 // Used by UiAutomation getWindowToken(int windowId, int userId)70 IBinder getWindowToken(int windowId, int userId); 71 notifyAccessibilityButtonClicked(int displayId, String targetName)72 void notifyAccessibilityButtonClicked(int displayId, String targetName); 73 notifyAccessibilityButtonVisibilityChanged(boolean available)74 void notifyAccessibilityButtonVisibilityChanged(boolean available); 75 76 // Requires Manifest.permission.MANAGE_ACCESSIBILITY performAccessibilityShortcut(String targetName)77 void performAccessibilityShortcut(String targetName); 78 79 // Requires Manifest.permission.MANAGE_ACCESSIBILITY getAccessibilityShortcutTargets(int shortcutType)80 List<String> getAccessibilityShortcutTargets(int shortcutType); 81 82 // System process only sendFingerprintGesture(int gestureKeyCode)83 boolean sendFingerprintGesture(int gestureKeyCode); 84 85 // System process only getAccessibilityWindowId(IBinder windowToken)86 int getAccessibilityWindowId(IBinder windowToken); 87 getRecommendedTimeoutMillis()88 long getRecommendedTimeoutMillis(); 89 registerSystemAction(in RemoteAction action, int actionId)90 oneway void registerSystemAction(in RemoteAction action, int actionId); unregisterSystemAction(int actionId)91 oneway void unregisterSystemAction(int actionId); setWindowMagnificationConnection(in IWindowMagnificationConnection connection)92 oneway void setWindowMagnificationConnection(in IWindowMagnificationConnection connection); 93 associateEmbeddedHierarchy(IBinder host, IBinder embedded)94 void associateEmbeddedHierarchy(IBinder host, IBinder embedded); 95 disassociateEmbeddedHierarchy(IBinder token)96 void disassociateEmbeddedHierarchy(IBinder token); 97 getFocusStrokeWidth()98 int getFocusStrokeWidth(); 99 getFocusColor()100 int getFocusColor(); 101 } 102