| 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 |
|
| 39 |
oneway void interrupt(int userId); |
| 40 |
|
| 41 |
oneway void sendAccessibilityEvent(in AccessibilityEvent uiEvent, int userId); |
| 42 |
|
| 43 |
long addClient(IAccessibilityManagerClient client, int userId); |
| 44 |
|
| 45 |
boolean removeClient(IAccessibilityManagerClient client, int userId); |
| 46 |
|
| 47 |
List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList(int userId); |
| 48 |
|
| 49 |
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553) |
| 50 |
List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(int feedbackType, int userId); |
| 51 |
|
| 52 |
int addAccessibilityInteractionConnection(IWindow windowToken, IBinder leashToken, |
| 53 |
in IAccessibilityInteractionConnection connection, |
| 54 |
String packageName, int userId); |
| 55 |
|
| 56 |
void removeAccessibilityInteractionConnection(IWindow windowToken); |
| 57 |
|
| 58 |
void setPictureInPictureActionReplacingConnection( |
| 59 |
in IAccessibilityInteractionConnection connection); |
| 60 |
|
| 61 |
void registerUiTestAutomationService(IBinder owner, IAccessibilityServiceClient client, |
| 62 |
in AccessibilityServiceInfo info, int flags); |
| 63 |
|
| 64 |
void unregisterUiTestAutomationService(IAccessibilityServiceClient client); |
| 65 |
|
| 66 |
void temporaryEnableAccessibilityStateUntilKeyguardRemoved(in ComponentName service, |
| 67 |
boolean touchExplorationEnabled); |
| 68 |
|
| 69 |
// Used by UiAutomation |
| 70 |
IBinder getWindowToken(int windowId, int userId); |
| 71 |
|
| 72 |
void notifyAccessibilityButtonClicked(int displayId, String targetName); |
| 73 |
|
| 74 |
void notifyAccessibilityButtonVisibilityChanged(boolean available); |
| 75 |
|
| 76 |
// Requires Manifest.permission.MANAGE_ACCESSIBILITY |
| 77 |
void performAccessibilityShortcut(String targetName); |
| 78 |
|
| 79 |
// Requires Manifest.permission.MANAGE_ACCESSIBILITY |
| 80 |
List<String> getAccessibilityShortcutTargets(int shortcutType); |
| 81 |
|
| 82 |
// System process only |
| 83 |
boolean sendFingerprintGesture(int gestureKeyCode); |
| 84 |
|
| 85 |
// System process only |
| 86 |
int getAccessibilityWindowId(IBinder windowToken); |
| 87 |
|
| 88 |
long getRecommendedTimeoutMillis(); |
| 89 |
|
| 90 |
oneway void registerSystemAction(in RemoteAction action, int actionId); |
| 91 |
oneway void unregisterSystemAction(int actionId); |
| 92 |
oneway void setWindowMagnificationConnection(in IWindowMagnificationConnection connection); |
| 93 |
|
| 94 |
void associateEmbeddedHierarchy(IBinder host, IBinder embedded); |
| 95 |
|
| 96 |
void disassociateEmbeddedHierarchy(IBinder token); |
| 97 |
|
| 98 |
int getFocusStrokeWidth(); |
| 99 |
|
| 100 |
int getFocusColor(); |
| 101 |
|
| 102 |
boolean isAudioDescriptionByDefaultEnabled(); |
| 103 |
|
| 104 |
@JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.SET_SYSTEM_AUDIO_CAPTION)") |
| 105 |
void setSystemAudioCaptioningEnabled(boolean isEnabled, int userId); |
| 106 |
|
| 107 |
boolean isSystemAudioCaptioningUiEnabled(int userId); |
| 108 |
|
| 109 |
@JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.SET_SYSTEM_AUDIO_CAPTION)") |
| 110 |
void setSystemAudioCaptioningUiEnabled(boolean isEnabled, int userId); |
| 111 |
} |