summaryrefslogtreecommitdiffstats
path: root/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2014-08-29 22:24:31 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-29 22:24:32 +0000
commit58774cf3543e06c4b51a54bccd603a2cbcd7a816 (patch)
tree86524bb5e97071234353e144b4eecf390a723d83 /camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
parentf73c6cf2f04451ba4517abccd36a114667c69ae3 (diff)
parent2569329d6cff25bfe9941df539df14a0aeb4c4f4 (diff)
downloadandroid_frameworks_ex-58774cf3543e06c4b51a54bccd603a2cbcd7a816.tar.gz
android_frameworks_ex-58774cf3543e06c4b51a54bccd603a2cbcd7a816.tar.bz2
android_frameworks_ex-58774cf3543e06c4b51a54bccd603a2cbcd7a816.zip
Merge "camera2-portability: Touch-to-focus accounting for effective crop" into lmp-dev
Diffstat (limited to 'camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java')
-rw-r--r--camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java b/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
index 847ca22..913a575 100644
--- a/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
+++ b/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
@@ -305,6 +305,10 @@ class AndroidCamera2AgentImpl extends CameraAgent {
break;
}
+ // FIXME: We need to tear down the CameraCaptureSession here
+ // (and unlock the CameraSettings object from our
+ // CameraProxy) so that the preview/photo sizes can be
+ // changed again while no preview is running.
case CameraActions.STOP_PREVIEW: {
if (mCameraState.getState() <
AndroidCamera2StateHolder.CAMERA_PREVIEW_ACTIVE) {
@@ -972,6 +976,26 @@ class AndroidCamera2AgentImpl extends CameraAgent {
return mCapabilities;
}
+ // FIXME: Unlock the sizes in stopPreview(), as per the corresponding
+ // explanation on the STOP_PREVIEW case in the handler.
+ @Override
+ public void setPreviewTexture(SurfaceTexture surfaceTexture) {
+ // Once the Surface has been selected, we configure the session and
+ // are no longer able to change the sizes.
+ getSettings().setSizesLocked(true);
+ super.setPreviewTexture(surfaceTexture);
+ }
+
+ // FIXME: Unlock the sizes in stopPreview(), as per the corresponding
+ // explanation on the STOP_PREVIEW case in the handler.
+ @Override
+ public void setPreviewTextureSync(SurfaceTexture surfaceTexture) {
+ // Once the Surface has been selected, we configure the session and
+ // are no longer able to change the sizes.
+ getSettings().setSizesLocked(true);
+ super.setPreviewTexture(surfaceTexture);
+ }
+
// TODO: Implement
@Override
public void setPreviewDataCallback(Handler handler, CameraPreviewDataCallback cb) {}