Fixed setting of screen saver state crashing on some version of Android.

Setting Window flags seems to affect Views and must be handled on UI thread.