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.accessibilityservice.AccessibilityServiceInfo;
20 import android.accessibilityservice.IAccessibilityServiceConnection;
21 import android.accessibilityservice.IAccessibilityServiceClient;
22 import android.content.ComponentName;
23 import android.view.accessibility.AccessibilityEvent;
24 import android.view.accessibility.AccessibilityNodeInfo;
25 import android.view.accessibility.IAccessibilityInteractionConnection;
26 import android.view.accessibility.IAccessibilityManagerClient;
27 import android.view.IWindow;
28 
29 /**
30  * Interface implemented by the AccessibilityManagerService called by
31  * the AccessibilityManagers.
32  *
33  * @hide
34  */
35 interface IAccessibilityManager {
36 
interrupt(int userId)37     oneway void interrupt(int userId);
38 
sendAccessibilityEvent(in AccessibilityEvent uiEvent, int userId)39     oneway void sendAccessibilityEvent(in AccessibilityEvent uiEvent, int userId);
40 
addClient(IAccessibilityManagerClient client, int userId)41     long addClient(IAccessibilityManagerClient client, int userId);
42 
getInstalledAccessibilityServiceList(int userId)43     List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList(int userId);
44 
getEnabledAccessibilityServiceList(int feedbackType, int userId)45     List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(int feedbackType, int userId);
46 
addAccessibilityInteractionConnection(IWindow windowToken, in IAccessibilityInteractionConnection connection, String packageName, int userId)47     int addAccessibilityInteractionConnection(IWindow windowToken,
48             in IAccessibilityInteractionConnection connection,
49             String packageName, int userId);
50 
removeAccessibilityInteractionConnection(IWindow windowToken)51     void removeAccessibilityInteractionConnection(IWindow windowToken);
52 
setPictureInPictureActionReplacingConnection( in IAccessibilityInteractionConnection connection)53     void setPictureInPictureActionReplacingConnection(
54             in IAccessibilityInteractionConnection connection);
55 
registerUiTestAutomationService(IBinder owner, IAccessibilityServiceClient client, in AccessibilityServiceInfo info, int flags)56     void registerUiTestAutomationService(IBinder owner, IAccessibilityServiceClient client,
57         in AccessibilityServiceInfo info, int flags);
58 
unregisterUiTestAutomationService(IAccessibilityServiceClient client)59     void unregisterUiTestAutomationService(IAccessibilityServiceClient client);
60 
temporaryEnableAccessibilityStateUntilKeyguardRemoved(in ComponentName service, boolean touchExplorationEnabled)61     void temporaryEnableAccessibilityStateUntilKeyguardRemoved(in ComponentName service,
62             boolean touchExplorationEnabled);
63 
getWindowToken(int windowId, int userId)64     IBinder getWindowToken(int windowId, int userId);
65 
notifyAccessibilityButtonClicked()66     void notifyAccessibilityButtonClicked();
67 
notifyAccessibilityButtonVisibilityChanged(boolean available)68     void notifyAccessibilityButtonVisibilityChanged(boolean available);
69 
70     // Requires WRITE_SECURE_SETTINGS
performAccessibilityShortcut()71     void performAccessibilityShortcut();
72 
73     // System process only
sendFingerprintGesture(int gestureKeyCode)74     boolean sendFingerprintGesture(int gestureKeyCode);
75 }
76