Fix NPE in UinputTouchDevice

The waitForDeviceUpdatesUntil method was not checking if the inputDevice was null before accessing its associatedDisplayId property. This could cause a NullPointerException if the inputDevice was not found.

This CL fixes the issue by checking if the inputDevice is null before accessing its associatedDisplayId property.

Bug: 366300252
Change-Id: Icb7c9a5751b13cc685b3c3c63c43f23aed1ade02
Test: Presubmit
Flag: TEST_ONLY
1 file changed