summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-10-13 10:48:57 +0800
committerAngus Kong <shkong@google.com>2011-10-13 10:48:57 +0800
commitef011a1e479f8e801318eba2dccb50fac1590d3c (patch)
treed16d5dcc7aa067d44729cfd87147e5fd55a273d6 /src/com/android
parentc4534909cd5aee636edeef852a87b9eb36f5cc4a (diff)
downloadpackages_apps_LegacyCamera-ef011a1e479f8e801318eba2dccb50fac1590d3c.zip
packages_apps_LegacyCamera-ef011a1e479f8e801318eba2dccb50fac1590d3c.tar.gz
packages_apps_LegacyCamera-ef011a1e479f8e801318eba2dccb50fac1590d3c.tar.bz2
Cancel the mosaic computation when paused.
bug:5447804 Change-Id: Id8e3a9d0c140b572fa76cbe9cfb38abc6b53d871
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 d465bf7..225f6d1 100755
--- a/src/com/android/camera/panorama/PanoramaActivity.java
+++ b/src/com/android/camera/panorama/PanoramaActivity.java
@@ -813,9 +813,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();
@@ -823,6 +821,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();
@@ -895,6 +899,7 @@ public class PanoramaActivity extends ActivityBase implements
super.onPause();
mPausing = true;
+ cancelHighResComputation();
// Stop the capturing first.
if (mCaptureState == CAPTURE_STATE_MOSAIC) {
stopCapture(true);