summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoUI.java
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2013-07-15 12:42:41 -0700
committerAngus Kong <shkong@google.com>2013-07-15 17:06:12 -0700
commit395ee2d6d3c8fa9e16363517dc9e8afc8cbd609e (patch)
tree5a55b3a04409b16eeec9efe5ce0ed25adfdc5aff /src/com/android/camera/VideoUI.java
parent0dca1b590f4cae2fe42afc9245f1a8ea81f9e6d3 (diff)
downloadandroid_packages_apps_Snap-395ee2d6d3c8fa9e16363517dc9e8afc8cbd609e.tar.gz
android_packages_apps_Snap-395ee2d6d3c8fa9e16363517dc9e8afc8cbd609e.tar.bz2
android_packages_apps_Snap-395ee2d6d3c8fa9e16363517dc9e8afc8cbd609e.zip
Remove unnecessary startPreview thread in video.
Change-Id: I42dc46748fad3b321178280069555ecdd5c4a962
Diffstat (limited to 'src/com/android/camera/VideoUI.java')
-rw-r--r--src/com/android/camera/VideoUI.java19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 4ee199be5..551b72596 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -57,7 +57,7 @@ public class VideoUI implements PieRenderer.PieListener,
PreviewGestures.SingleTapListener,
CameraRootView.MyDisplayListener,
SurfaceTextureListener, SurfaceHolder.Callback {
- private final static String TAG = "CAM_VideoUI";
+ private static final String TAG = "CAM_VideoUI";
private static final int UPDATE_TRANSFORM_MATRIX = 1;
// module fields
private CameraActivity mActivity;
@@ -653,31 +653,20 @@ public class VideoUI implements PieRenderer.PieListener,
}
public SurfaceTexture getSurfaceTexture() {
- synchronized (mLock) {
- if (mSurfaceTexture == null) {
- try {
- mLock.wait();
- } catch (InterruptedException e) {
- Log.w(TAG, "Unexpected interruption when waiting to get surface texture");
- }
- }
- }
return mSurfaceTexture;
}
// SurfaceTexture callbacks
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
- synchronized (mLock) {
- mSurfaceTexture = surface;
- mLock.notifyAll();
- }
+ mSurfaceTexture = surface;
+ mController.onPreviewUIReady();
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
mSurfaceTexture = null;
- mController.stopPreview();
+ mController.onPreviewUIDestroyed();
Log.d(TAG, "surfaceTexture is destroyed");
return true;
}