(Android) Move logic out of frontend_android.c and into input_android.c