summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamera Software Integration <camswint@localhost>2016-12-20 02:56:32 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-12-20 02:56:32 -0800
commit910b6ef9c0caa64fe83b6ec2ff5687995852e67c (patch)
treeb3f39b1f5e7eb72b003adc88ce588cc89ed65d0d
parent153c017a5fcc1ff2ea92ea265b9eb14aaf05a5c8 (diff)
parent6f62c42fb9b9895493cf82b2f7a833e677e6ae7c (diff)
downloadandroid_packages_apps_Snap-910b6ef9c0caa64fe83b6ec2ff5687995852e67c.tar.gz
android_packages_apps_Snap-910b6ef9c0caa64fe83b6ec2ff5687995852e67c.tar.bz2
android_packages_apps_Snap-910b6ef9c0caa64fe83b6ec2ff5687995852e67c.zip
Merge "SnapdragonCamera: Fix shutter button grey" into camera.lnx.1.0-dev.1.0
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index dd63a9f66..4d4b1d750 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -923,7 +923,7 @@ public class CaptureModule implements CameraModule, PhotoController,
@Override
public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) {
- Log.e(TAG, "cameracapturesession - onConfigureFailed "+id);
+ Log.e(TAG, "cameracapturesession - onConfigureFailed "+ id);
if (mActivity.isFinishing()) {
return;
}
@@ -1144,6 +1144,7 @@ public class CaptureModule implements CameraModule, PhotoController,
private void lockFocus(int id) {
if (mActivity == null || mCameraDevice[id] == null
|| !checkSessionAndBuilder(mCaptureSession[id], mPreviewRequestBuilder[id])) {
+ mUI.enableShutter(true);
warningToast("Camera is not ready yet to take a picture.");
return;
}
@@ -3343,7 +3344,7 @@ public class CaptureModule implements CameraModule, PhotoController,
}
private void estimateJpegFileSize() {
- String quality = mSettingsManager.getValue(SettingsManager
+ String quality = mSettingsManager.getValue(SettingsManager
.KEY_JPEG_QUALITY);
int[] ratios = mActivity.getResources().getIntArray(R.array.jpegquality_compression_ratio);
String[] qualities = mActivity.getResources().getStringArray(
@@ -3903,6 +3904,7 @@ public class CaptureModule implements CameraModule, PhotoController,
}
public void restartSession(boolean isSurfaceChanged) {
+ Log.d(TAG, "restartSession isSurfaceChanged = " + isSurfaceChanged);
if (isAllSessionClosed()) return;
closeProcessors();
@@ -3921,8 +3923,17 @@ public class CaptureModule implements CameraModule, PhotoController,
if(isTrackingFocusSettingOn()) {
mUI.resetTrackingFocus();
}
+ resetStateMachine();
+ }
+
+ private void resetStateMachine() {
+ for (int i = 0; i < MAX_NUM_CAM; i++) {
+ mState[i] = STATE_PREVIEW;
+ }
+ mUI.enableShutter(true);
}
+
private Size getOptimalPreviewSize(Size pictureSize, Size[] prevSizes, int screenW, int
screenH) {
if (pictureSize.getWidth() <= screenH && pictureSize.getHeight() <= screenW) {