Send gesture cancellation on correct thread

CancellationSignal listener should be called on main thread instead of
Binder thread.

Fix: 275426397
Test: atest InputConnectionEndToEndTest
Change-Id: Ief253699d52a19fb36996dd1f6b3487a59f87526
This commit is contained in:
Taran Singh
2023-03-27 22:54:17 +00:00
parent 2d07610d2c
commit e81ddfe3e7

View File

@@ -424,12 +424,15 @@ final class RemoteInputConnectionImpl extends IRemoteInputConnection.Stub {
});
}
@Dispatching(cancellable = false)
@Override
public void cancelCancellationSignal(IBinder token) {
if (mBeamer == null) {
return;
}
mBeamer.cancel(token);
dispatch(() -> {
mBeamer.cancel(token);
});
}
@Override