Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba9b1173 authored by Prabir Pradhan's avatar Prabir Pradhan Committed by Android (Google) Code Review
Browse files

Merge "Deprecate InputMonitor and monitorGestureInput" into main

parents aef31330 5046a179
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1025,8 +1025,18 @@ public final class InputManager {
    /**
     * Monitor input on the specified display for gestures.
     *
     * NOTE: New usages of Gesture Monitors are strongly discouraged. Gesture Monitors are
     * deprecated, in favor of spy windows (see {@link LayoutParams#INPUT_FEATURE_SPY}).
     * The spy window should be configured specifically to receive the desired events,
     * unlike the gesture monitor which receives all events on the display.
     *
     * @hide
     * @deprecated
     * @see LayoutParams#INPUT_FEATURE_SPY
     * @see android.os.InputConfig#SPY
     * @see #pilferPointers(IBinder)
     */
    @Deprecated
    public InputMonitor monitorGestureInput(String name, int displayId) {
        return mGlobal.monitorGestureInput(name, displayId);
    }
+3 −0
Original line number Diff line number Diff line
@@ -32,8 +32,11 @@ import com.android.internal.util.DataClass;
 * registered to monitor that type of event on the targeted display.
 *
 * @hide
 * @deprecated See {@link android.hardware.input.InputManager#monitorGestureInput(String, int)}
 *             for more details.
 */
@DataClass(genToString = true)
@Deprecated
public final class InputMonitor implements Parcelable {
    private static final String TAG = "InputMonitor";

+4 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@
 * limitations under the License.
 */

// InputMonitor is deprecated, but we still need to test it.
@file:Suppress("DEPRECATION")

package com.android.test.input

import android.app.Activity
@@ -43,6 +46,7 @@ class UnresponsiveGestureMonitorActivity : Activity() {
    }
    private lateinit var mInputEventReceiver: InputEventReceiver
    private lateinit var mInputMonitor: InputMonitor

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val inputManager = checkNotNull(getSystemService(InputManager::class.java))