summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-04-25 16:56:43 -0700
committerDoris Liu <tianliu@google.com>2013-04-25 16:56:43 -0700
commitbbbef74c4d2cbcd3c01395b02ad4534e32e9fe53 (patch)
tree6de8c64e3fdd62cfab2604cfc71fed73d14f5f90 /src
parent2e7f1704c6a30f0d6febfa6ac29d5b3f665c656c (diff)
downloadandroid_packages_apps_Gallery2-bbbef74c4d2cbcd3c01395b02ad4534e32e9fe53.tar.gz
android_packages_apps_Gallery2-bbbef74c4d2cbcd3c01395b02ad4534e32e9fe53.tar.bz2
android_packages_apps_Gallery2-bbbef74c4d2cbcd3c01395b02ad4534e32e9fe53.zip
Make sure the initial rotation is set
Bug: 8718884 Change-Id: I4d1890f5dc9a4838b84872b1de395440757a7b4b
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ui/RotatableLayout.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/RotatableLayout.java b/src/com/android/camera/ui/RotatableLayout.java
index bf8060528..2dea58d9d 100644
--- a/src/com/android/camera/ui/RotatableLayout.java
+++ b/src/com/android/camera/ui/RotatableLayout.java
@@ -62,6 +62,7 @@ public class RotatableLayout extends FrameLayout {
@Override
public void onAttachedToWindow() {
+ mPrevRotation = Util.getDisplayRotation((Activity) getContext());
// check if there is any rotation before the view is attached to window
int currentOrientation = getResources().getConfiguration().orientation;
if (mInitialOrientation == currentOrientation) {
@@ -74,7 +75,6 @@ public class RotatableLayout extends FrameLayout {
&& currentOrientation == Configuration.ORIENTATION_LANDSCAPE) {
rotateLayout(false);
}
- mPrevRotation = Util.getDisplayRotation((Activity) getContext());
}
@Override