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

Commit 6fb9caf5 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Always allow updating config from input during booting

There could be pending CONFIG_SCREEN_LAYOUT change (unrelated to
input), which was sent by the way from the callback. If it is
skipped by no input device changes, the change may send on next
time when a change is detected. But that may run on main thread
rather than input reader thread, which could delay boot time.

Bug: 373067702
Flag: com.android.window.flags.filter_irrelevant_input_device_change
Test: BootTimeTest
Change-Id: I2c569793b926aadd17fd07b688bdeed44ab82539
parent 6dcdf8bc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -131,7 +131,9 @@ final class InputManagerCallback implements InputManagerService.WindowManagerCal
        final boolean changed = !com.android.window.flags.Flags.filterIrrelevantInputDeviceChange()
                || updateLastInputConfigurationSources();

        if (changed) {
        // Even if the input devices are not changed, there could be other pending changes
        // during booting. It's fine to apply earlier.
        if (changed || !mService.mDisplayEnabled) {
            synchronized (mService.mGlobalLock) {
                Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "inputDeviceConfigChanged");
                mService.mRoot.forAllDisplays(DisplayContent::sendNewConfiguration);