1282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski/*
2282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Copyright (C) 2009 The Android Open Source Project
3282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
4282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Licensed under the Apache License, Version 2.0 (the "License");
5282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * you may not use this file except in compliance with the License.
6282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * You may obtain a copy of the License at
7282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
8282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *      http://www.apache.org/licenses/LICENSE-2.0
9282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
10282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Unless required by applicable law or agreed to in writing, software
11282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * distributed under the License is distributed on an "AS IS" BASIS,
12282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * See the License for the specific language governing permissions and
14282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * limitations under the License.
15282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski */
16282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
17282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskipackage android.view.accessibility;
18282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
19282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport android.accessibilityservice.AccessibilityServiceInfo;
20476e582d2ffdf25102d4c55f8c242baa3d21d37fDeepanshu Guptaimport android.annotation.NonNull;
21282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport android.content.Context;
22282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport android.content.pm.ServiceInfo;
23282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport android.view.IWindow;
24282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport android.view.View;
25282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
26282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport java.util.Collections;
27282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskiimport java.util.List;
28282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
29282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski/**
30282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * System level service that serves as an event dispatch for {@link AccessibilityEvent}s.
31282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * Such events are generated when something notable happens in the user interface,
32282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * for example an {@link android.app.Activity} starts, the focus or selection of a
33282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * {@link android.view.View} changes etc. Parties interested in handling accessibility
34282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * events implement and register an accessibility service which extends
351840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta * {@code android.accessibilityservice.AccessibilityService}.
36282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski *
37282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * @see AccessibilityEvent
38282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski * @see android.content.Context#getSystemService
39282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski */
401840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta@SuppressWarnings("UnusedDeclaration")
41282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinskipublic final class AccessibilityManager {
421840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
431840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    private static AccessibilityManager sInstance = new AccessibilityManager(null, null, 0);
441840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
45282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
46282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /**
47282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * Listener for the accessibility state.
48282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     */
49282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public interface AccessibilityStateChangeListener {
50282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
51282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        /**
52282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski         * Called back on change in the accessibility state.
53282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski         *
54282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski         * @param enabled Whether accessibility is enabled.
55282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski         */
56282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        public void onAccessibilityStateChanged(boolean enabled);
57282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
58282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
59282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /**
601840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Listener for the system touch exploration state. To listen for changes to
611840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * the touch exploration state on the device, implement this interface and
621840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * register it with the system by calling
631840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * {@link #addTouchExplorationStateChangeListener}.
641840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
651840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public interface TouchExplorationStateChangeListener {
661840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
671840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        /**
681840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         * Called when the touch exploration enabled state changes.
691840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         *
701840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         * @param enabled Whether touch exploration is enabled.
711840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         */
721840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        public void onTouchExplorationStateChanged(boolean enabled);
731840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
741840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
751840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
761840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Listener for the system high text contrast state. To listen for changes to
771840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * the high text contrast state on the device, implement this interface and
781840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * register it with the system by calling
791840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * {@link #addHighTextContrastStateChangeListener}.
801840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
811840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public interface HighTextContrastChangeListener {
821840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
831840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        /**
841840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         * Called when the high text contrast enabled state changes.
851840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         *
861840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         * @param enabled Whether high text contrast is enabled.
871840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta         */
881840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        public void onHighTextContrastStateChanged(boolean enabled);
891840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
901840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
911840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    private final IAccessibilityManagerClient.Stub mClient =
921840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta            new IAccessibilityManagerClient.Stub() {
931840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta                public void setState(int state) {
941840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta                }
951840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta            };
961840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
971840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
98282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * Get an AccessibilityManager instance (create one if necessary).
99282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     *
100282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     */
101282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public static AccessibilityManager getInstance(Context context) {
102282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        return sInstance;
103282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
104282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
105282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /**
106282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * Create an instance.
107282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     *
108282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * @param context A {@link Context}.
109282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     */
1101840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public AccessibilityManager(Context context, IAccessibilityManager service, int userId) {
1111840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
1121840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
1131840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public IAccessibilityManagerClient getClient() {
1141840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return mClient;
115282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
116282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
117282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /**
118282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * Returns if the {@link AccessibilityManager} is enabled.
119282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     *
120282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * @return True if this {@link AccessibilityManager} is enabled, false otherwise.
121282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     */
122282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public boolean isEnabled() {
123282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        return false;
124282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
125282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
126282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /**
1271840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Returns if the touch exploration in the system is enabled.
128282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     *
1291840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @return True if touch exploration is enabled, false otherwise.
1301840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
1311840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public boolean isTouchExplorationEnabled() {
1321840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return true;
1331840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
1341840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
1351840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
1361840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Returns if the high text contrast in the system is enabled.
1371840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * <p>
1381840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * <strong>Note:</strong> You need to query this only if you application is
1391840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * doing its own rendering and does not rely on the platform rendering pipeline.
1401840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * </p>
141282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     *
1421840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
1431840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public boolean isHighTextContrastEnabled() {
1441840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return false;
1451840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
1461840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
1471840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
1481840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Sends an {@link AccessibilityEvent}.
149282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     */
150282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public void sendAccessibilityEvent(AccessibilityEvent event) {
151282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
152282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
153282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /**
154282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * Requests interruption of the accessibility feedback from all accessibility services.
155282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     */
156282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public void interrupt() {
157282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
158282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
159282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    /**
160282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * Returns the {@link ServiceInfo}s of the installed accessibility services.
161282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     *
162282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     * @return An unmodifiable list with {@link ServiceInfo}s.
163282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski     */
1641840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    @Deprecated
165282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public List<ServiceInfo> getAccessibilityServiceList() {
1661840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return Collections.emptyList();
167282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
168282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
169282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public List<AccessibilityServiceInfo> getInstalledAccessibilityServiceList() {
1701840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return Collections.emptyList();
1711840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
1721840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
1731840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
1741840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Returns the {@link AccessibilityServiceInfo}s of the enabled accessibility services
1751840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * for a given feedback type.
1761840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
1771840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @param feedbackTypeFlags The feedback type flags.
1781840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @return An unmodifiable list with {@link AccessibilityServiceInfo}s.
1791840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
1801840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @see AccessibilityServiceInfo#FEEDBACK_AUDIBLE
1811840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @see AccessibilityServiceInfo#FEEDBACK_GENERIC
1821840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @see AccessibilityServiceInfo#FEEDBACK_HAPTIC
1831840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @see AccessibilityServiceInfo#FEEDBACK_SPOKEN
1841840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @see AccessibilityServiceInfo#FEEDBACK_VISUAL
1851840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
1861840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public List<AccessibilityServiceInfo> getEnabledAccessibilityServiceList(
1871840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta            int feedbackTypeFlags) {
1881840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return Collections.emptyList();
189282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
190282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
1911840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
1921840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Registers an {@link AccessibilityStateChangeListener} for changes in
1931840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * the global accessibility state of the system.
1941840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
1951840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @param listener The listener.
1961840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @return True if successfully registered.
1971840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
198282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public boolean addAccessibilityStateChangeListener(
199282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski            AccessibilityStateChangeListener listener) {
200282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        return true;
201282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
202282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
203282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public boolean removeAccessibilityStateChangeListener(
204282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski            AccessibilityStateChangeListener listener) {
205282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        return true;
206282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
207282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
2081840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
2091840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Registers a {@link TouchExplorationStateChangeListener} for changes in
2101840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * the global touch exploration state of the system.
2111840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
2121840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @param listener The listener.
2131840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @return True if successfully registered.
2141840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
2151840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public boolean addTouchExplorationStateChangeListener(
2161840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta            @NonNull TouchExplorationStateChangeListener listener) {
2171840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return true;
2181840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
2191840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
2201840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
2211840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Unregisters a {@link TouchExplorationStateChangeListener}.
2221840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
2231840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @param listener The listener.
2241840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @return True if successfully unregistered.
2251840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
2261840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public boolean removeTouchExplorationStateChangeListener(
2271840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta            @NonNull TouchExplorationStateChangeListener listener) {
2281840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return true;
2291840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
2301840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
2311840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
2321840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Registers a {@link HighTextContrastChangeListener} for changes in
2331840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * the global high text contrast state of the system.
2341840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
2351840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @param listener The listener.
2361840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @return True if successfully registered.
2371840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
2381840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
2391840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public boolean addHighTextContrastStateChangeListener(
2401840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta            @NonNull HighTextContrastChangeListener listener) {
2411840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return true;
2421840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
2431840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
2441840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
2451840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Unregisters a {@link HighTextContrastChangeListener}.
2461840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
2471840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @param listener The listener.
2481840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @return True if successfully unregistered.
2491840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
2501840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
2511840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    public boolean removeHighTextContrastStateChangeListener(
2521840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta            @NonNull HighTextContrastChangeListener listener) {
2531840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta        return true;
2541840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
2551840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
2561840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    /**
2571840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * Sets the current state and notifies listeners, if necessary.
2581840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     *
2591840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     * @param stateFlags The state flags.
2601840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta     */
2611840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    private void setStateLocked(int stateFlags) {
2621840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta    }
2631840e8f2c73570e7b51c66c03d3a50bd00f3f742Deepanshu Gupta
264282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public int addAccessibilityInteractionConnection(IWindow windowToken,
265282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski            IAccessibilityInteractionConnection connection) {
266282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski        return View.NO_ID;
267282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
268282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
269282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    public void removeAccessibilityInteractionConnection(IWindow windowToken) {
270282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski    }
271282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski
272282e181b58cf72b6ca770dc7ca5f91f135444502Adam Lesinski}
273