OSDN Git Service

Fix wrong orientation after suspend and resume.
authorWu-cheng Li <wuchengli@google.com>
Tue, 31 Aug 2010 20:57:23 +0000 (13:57 -0700)
committerWu-cheng Li <wuchengli@google.com>
Wed, 1 Sep 2010 16:06:44 +0000 (09:06 -0700)
commitd4a37518c3b73fcf1860ab10fd3bb7e7ceffba99
tree80cb5a0e35b58c4a7b11f9227b10d035e6c12aca
parent1ba127ec81106c9f63ef945137f315a55da59f4a
Fix wrong orientation after suspend and resume.

Camera application calls setDisplayOrientation according to
Display.getRotation and sensor orientation. After power key is
pressed, camera app resumes behind the lock screen and preview
is started. Rotation is 90 at the time. After the screen is
unlocked, surfaceChanged is called because the orientation is
changed from portrait to landscape. Preview is stopped and
restarted. setDisplayOrientation should be called again because
the rotation has changed to 0.

bug:2870671
Change-Id: I1ca5106087c168d88cc8eb4f2a9f192d7fa75a8a
src/com/android/camera/Camera.java
src/com/android/camera/VideoCamera.java