summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-10-12 21:51:07 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-10-12 21:51:07 -0700
commit87412bf98591aa08c7981f271932d469da8d3f86 (patch)
treea0ebd24e045b74fe9156cf22f91f89074d0f807b /src/com/android
parentdef576c23bd7b1742896dad96c4fddb8f027d882 (diff)
parentef011a1e479f8e801318eba2dccb50fac1590d3c (diff)
downloadpackages_apps_LegacyCamera-87412bf98591aa08c7981f271932d469da8d3f86.zip
packages_apps_LegacyCamera-87412bf98591aa08c7981f271932d469da8d3f86.tar.gz
packages_apps_LegacyCamera-87412bf98591aa08c7981f271932d469da8d3f86.tar.bz2
am ef011a1e: Cancel the mosaic computation when paused.
* commit 'ef011a1e479f8e801318eba2dccb50fac1590d3c': Cancel the mosaic computation when paused.
Diffstat (limited to 'src/com/android')
-rwxr-xr-xsrc/com/android/camera/panorama/PanoramaActivity.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/camera/panorama/PanoramaActivity.java b/src/com/android/camera/panorama/PanoramaActivity.java
index 0442c09..83b1a1a 100755
--- a/src/com/android/camera/panorama/PanoramaActivity.java
+++ b/src/com/android/camera/panorama/PanoramaActivity.java
@@ -815,9 +815,7 @@ public class PanoramaActivity extends ActivityBase implements
}
}
- @OnClickAttr
- public void onCancelButtonClicked(View v) {
- if (mPausing || mSurfaceTexture == null) return;
+ private void cancelHighResComputation() {
mCancelComputation = true;
synchronized (mWaitObject) {
mWaitObject.notify();
@@ -825,6 +823,12 @@ public class PanoramaActivity extends ActivityBase implements
}
@OnClickAttr
+ public void onCancelButtonClicked(View v) {
+ if (mPausing || mSurfaceTexture == null) return;
+ cancelHighResComputation();
+ }
+
+ @OnClickAttr
public void onThumbnailClicked(View v) {
if (mPausing || mThreadRunning || mSurfaceTexture == null) return;
showSharePopup();
@@ -897,6 +901,7 @@ public class PanoramaActivity extends ActivityBase implements
super.onPause();
mPausing = true;
+ cancelHighResComputation();
// Stop the capturing first.
if (mCaptureState == CAPTURE_STATE_MOSAIC) {
stopCapture(true);