fix for screenshot animation glitch in portrait

Summary:
edits by Stefano Semeraro aka Suxsem.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6

framework: fix screenshot and rotation animation for devices with abnormal hw rotation

port foreward from cm10.1:
https://github.com/CyanogenMod/android_frameworks_base/commit/ac555b9ca9a76d13a26fc9ea40980fe57258761b#diff-d6f7bba268a742c91252cc9e64e2381a

Change-Id: I14b6e2403b9be345a1a591138f8a3a12ca8e4f89

Test Plan: build, test, merge

Reviewers: synergy, jriordan001, donald.munn, raymanfx, randall.rushing, anders3408

Reviewed By: anders3408

Differential Revision: http://review.codefirex.com/D187