(Android) Rewrite sensor functions slightly