summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-11-20 03:07:22 -0800
committerSteve Kondik <steve@cyngn.com>2016-11-20 03:07:22 -0800
commit5438ae10adc08d46e1e05febabeaab8b854497bc (patch)
treecffa00f69daf992673246004cc39f7ab55e45e91
parent8b612081c091e6ffa8a20d334cbe788ca0928425 (diff)
downloadandroid_packages_apps_Snap-5438ae10adc08d46e1e05febabeaab8b854497bc.zip
android_packages_apps_Snap-5438ae10adc08d46e1e05febabeaab8b854497bc.tar.gz
android_packages_apps_Snap-5438ae10adc08d46e1e05febabeaab8b854497bc.tar.bz2
snap: Fix reset of camera controls
* Need to post a runnable so everything currently in the queue finishes first. * Also force reset when hiding the preview cover to ensure no stray scroll events throw us off. Change-Id: Id1419e91f7624b4276c566228fe77d1a774ecc2b
-rw-r--r--src/com/android/camera/BaseUI.java3
-rw-r--r--src/com/android/camera/ui/CameraControls.java10
2 files changed, 12 insertions, 1 deletions
diff --git a/src/com/android/camera/BaseUI.java b/src/com/android/camera/BaseUI.java
index 83ea015..4dad158 100644
--- a/src/com/android/camera/BaseUI.java
+++ b/src/com/android/camera/BaseUI.java
@@ -109,6 +109,9 @@ public abstract class BaseUI {
mPreviewCover.setVisibility(View.GONE);
enableOverlays();
}
+ if (mCameraControls != null) {
+ mCameraControls.reset();
+ }
}
}
}
diff --git a/src/com/android/camera/ui/CameraControls.java b/src/com/android/camera/ui/CameraControls.java
index 9d023bb..66bf4e0 100644
--- a/src/com/android/camera/ui/CameraControls.java
+++ b/src/com/android/camera/ui/CameraControls.java
@@ -122,7 +122,15 @@ public class CameraControls extends RotatableLayout {
return mAnimationHelper.isAnimating();
}
- public void reset() { mAnimationHelper.reset(); }
+ public void reset() {
+ post(new Runnable() {
+ @Override
+ public void run() {
+ mAnimationHelper.reset();
+ enableTouch(true);
+ }
+ });
+ }
private void setChildrenVisibility(ViewGroup parent, boolean visible) {
for (int i = 0; i < parent.getChildCount(); i++) {