5.1 fixes for Android. (dm)