Keep instance of BinderInputWindow for the same token.
Some code in InputDispatcher uses pointer value comparison to track if a BinderInputWindow is the same. Therefore just keep the initial instance and reuse that for every update. This is better than changing all pointer comparisons to token comparisons because it would be hard to make sure every comparison is changed. Later we could simply drop InputWindowHandle and use InputWindowInfo value instead. It would also be better if it could implement move constructor so that we can use move semantics. Bug: 120289807 Bug: 120463595 Bug: 120481017 Test: Verified that input focus stops constantly changing by inpecting logcat after enabling DEBUG_FOCUS in InputDispatcher.cpp. Freeform drag-resize works with a workaround to another race condition. Change-Id: I34bbf8c076373ef23494f858536c5188eff95abd
Loading
Please register or sign in to comment