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

Commit 2e46ba4e authored by Vaibhav Devmurari's avatar Vaibhav Devmurari Committed by Android (Google) Code Review
Browse files

Merge "Shift configuration change policy call out of reader thread" into main

parents 0f2c8029 48c3ac8e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2451,6 +2451,12 @@ public class InputManagerService extends IInputManager.Stub
    // Native callback.
    @SuppressWarnings("unused")
    private void notifyInputDevicesChanged(InputDevice[] inputDevices) {
        mHandler.post(() -> {
            // Input device change can possibly change configuration, so notify window manager to
            // update its configuration.
            // Shift to main thread and release InputReader thread.
            mWindowManagerCallbacks.notifyConfigurationChanged();
        });
        synchronized (mInputDevicesLock) {
            if (!mInputDevicesChangedPending) {
                mInputDevicesChangedPending = true;
@@ -2460,9 +2466,6 @@ public class InputManagerService extends IInputManager.Stub

            mInputDevices = inputDevices;
        }
        // Input device change can possibly change configuration, so notify window manager to update
        // its configuration.
        mWindowManagerCallbacks.notifyConfigurationChanged();
    }

    // Native callback.