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

Commit 04088d19 authored by Daniel Norman's avatar Daniel Norman Committed by Automerger Merge Worker
Browse files

Merge "Enforce permission INJECT_EVENTS for injecting to input filter." into...

Merge "Enforce permission INJECT_EVENTS for injecting to input filter." into udc-dev am: 48adc75e am: d4fb03ff

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/25410669



Change-Id: I82e315c4a9656b18a5bc8c94eccf176bd8b99b95
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 36d894e7 d4fb03ff
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -180,6 +180,11 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub {

    @Override
    public void injectInputEventToInputFilter(InputEvent event) throws RemoteException {
        synchronized (mLock) {
            throwIfCalledByNotTrustedUidLocked();
            throwIfShutdownLocked();
            throwIfNotConnectedLocked();
        }
        mAccessibilityManager.injectInputEventToInputFilter(event);
    }

+2 −0
Original line number Diff line number Diff line
@@ -5232,6 +5232,8 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub

    @Override
    public void injectInputEventToInputFilter(InputEvent event) {
        mSecurityPolicy.enforceCallingPermission(Manifest.permission.INJECT_EVENTS,
                "injectInputEventToInputFilter");
        synchronized (mLock) {
            final long endMillis =
                    SystemClock.uptimeMillis() + WAIT_INPUT_FILTER_INSTALL_TIMEOUT_MS;