OSDN Git Service

Fix a bug that captured image in review is rotated
authorSheng-Hao Tsao <shenghao@google.com>
Wed, 12 Oct 2016 09:36:44 +0000 (18:36 +0900)
committerSheng-hao Tsao <shenghao@google.com>
Wed, 19 Oct 2016 02:47:20 +0000 (02:47 +0000)
commit8b17de0f4321fd981da98c64ad8a379ed6c0432a
tree19c1cb79d31648ce97daca710b1e1152f08bec11
parentb2a26ebe8018fda70211d20c0b18ce83648e92f3
Fix a bug that captured image in review is rotated

If the default camera app is triggered by intent and the app
orientation is different from the screen orientation, the
captured image in review will be rotated.

This is because calling setScale() clears the whole matrix and make the
previous preRotate() call meaningless. Changing to postScale() solves
the problem.

BUG=31939529
TEST=Verify that the captured image in review is not rotated

Change-Id: I6d93bac094ba9b6381e350d4007e3c65c1425e31
(cherry picked from commit 3399d3acca6a65a28784185e8164e0bb40d4ef45)
src/com/android/camera/captureintent/PictureDecoder.java