replacing setInputData by setInputConnection when possible