Clean up some frame handling code in the AndroidDriver to give a clearer exception on the local end