Update client/MainActivity.java

update the method onTouch
make the method more efficient and short.