diff options
author | Angus Kong <shkong@google.com> | 2013-08-09 14:55:20 -0700 |
---|---|---|
committer | Angus Kong <shkong@google.com> | 2013-08-09 17:12:11 -0700 |
commit | b50b5cbfbc0a67db6fc43373363b10381c9c61a3 (patch) | |
tree | b66054bcd1fbbae3ccf4f79d82c29ea1fb643ebf /src/com/android/camera/ui/RotatableLayout.java | |
parent | 4b2cb93c3f652734c41b4eb7449215178c586e8a (diff) | |
download | android_packages_apps_Snap-b50b5cbfbc0a67db6fc43373363b10381c9c61a3.tar.gz android_packages_apps_Snap-b50b5cbfbc0a67db6fc43373363b10381c9c61a3.tar.bz2 android_packages_apps_Snap-b50b5cbfbc0a67db6fc43373363b10381c9c61a3.zip |
Clean up Gallery codes.
bug:10263696
Change-Id: I3a16dba3aabe52b8103a2c591cfa39907265a263
Diffstat (limited to 'src/com/android/camera/ui/RotatableLayout.java')
-rw-r--r-- | src/com/android/camera/ui/RotatableLayout.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/camera/ui/RotatableLayout.java b/src/com/android/camera/ui/RotatableLayout.java index 965d62a90..e9ee0f358 100644 --- a/src/com/android/camera/ui/RotatableLayout.java +++ b/src/com/android/camera/ui/RotatableLayout.java @@ -25,7 +25,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; -import com.android.camera.Util; +import com.android.camera.util.CameraUtil; /* RotatableLayout rotates itself as well as all its children when orientation * changes. Specifically, when going from portrait to landscape, camera @@ -62,7 +62,7 @@ public class RotatableLayout extends FrameLayout { @Override public void onAttachedToWindow() { - mPrevRotation = Util.getDisplayRotation((Activity) getContext()); + mPrevRotation = CameraUtil.getDisplayRotation((Activity) getContext()); // check if there is any rotation before the view is attached to window int currentOrientation = getResources().getConfiguration().orientation; int orientation = getUnifiedRotation(); @@ -89,7 +89,7 @@ public class RotatableLayout extends FrameLayout { // all the layout code assumes camera device orientation to be portrait // adjust rotation for landscape int orientation = getResources().getConfiguration().orientation; - int rotation = Util.getDisplayRotation((Activity) getContext()); + int rotation = CameraUtil.getDisplayRotation((Activity) getContext()); int camOrientation = (rotation % 180 == 0) ? Configuration.ORIENTATION_PORTRAIT : Configuration.ORIENTATION_LANDSCAPE; if (camOrientation != orientation) { @@ -99,7 +99,7 @@ public class RotatableLayout extends FrameLayout { } public void checkLayoutFlip() { - int currentRotation = Util.getDisplayRotation((Activity) getContext()); + int currentRotation = CameraUtil.getDisplayRotation((Activity) getContext()); if ((currentRotation - mPrevRotation + 360) % 360 == 180) { mPrevRotation = currentRotation; flipChildren(); @@ -118,7 +118,7 @@ public class RotatableLayout extends FrameLayout { @Override public void onConfigurationChanged(Configuration config) { super.onConfigurationChanged(config); - int rotation = Util.getDisplayRotation((Activity) getContext()); + int rotation = CameraUtil.getDisplayRotation((Activity) getContext()); int diff = (rotation - mPrevRotation + 360) % 360; if ( diff == 0) { // No rotation |