Merge "Work around instability of Display.getRotation()." into jb-mr1-dev