Reduce unnecessary calculation from input device change
The notifyConfigurationChanged can be called for any attributes change of InputDevice. And the change may be unrelated to display configuration. E.g. motion range change of touch panel. So before asking window manager to recompute entire display configuration, check if attributes which can affect display are changed. That reduces the execution time of the method from 5ms to <0.1ms when turning on/off screen, and it reduces lock contention between other important operations. Bug: 368461853 Flag: com.android.window.flags.filter_irrelevant_input_device_change Test: atest WindowManagerServiceTests# \ testInputDeviceNotifyConfigurationChanged Change-Id: Ifce6778d8180865b7597a391b5fddd0009a04162
Loading
Please register or sign in to comment