Enforce VirtualTouchscreen dimensions are positive
Adds an IllegalArgumentException to the implementation of createVirtualTouchscreen if the dimension has one or two non positive components. Without this check the native layer silently fails (only a warning is printed in the logs). The creation of the VirtualTouchscreen looks successful because the DeviceCretionException does not get passed past the Binder call. When the first VirtualTouchEvent is sent to the VirtualTouchscreen the sendTouchEvent() method throws an exception because it can't find the underlying input device descriptor. Bug: 259554911 Test: atest FrameworksServicesTests:VirtualDeviceManagerServiceTest Change-Id: I085b8822d0f364b49060404480795626554fc155
Loading
Please register or sign in to comment