Merge "Check null for top activity when updating orientation" into tm-qpr-dev