Glass: properly send end signal. fix wakelock bug