Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index 3a2dbe2..155a0b8 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -91,10 +91,6 @@
if (rc)
return;
- property_get("ro.camera.sound.forced", value, "0");
- forced_val = strtol(value, NULL, 0);
- mpAudioPolicy->set_can_mute_enforced_audible(mpAudioPolicy, !forced_val);
-
ALOGI("Loaded audio policy from %s (%s)", module->name, module->id);
// load audio pre processing modules
diff --git a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
index 5156539..fe4abc0 100644
--- a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
+++ b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
@@ -40,6 +40,7 @@
mNewAEState(false),
mNewFrameReceived(false),
mNewCaptureReceived(false),
+ mShutterNotified(false),
mClient(client),
mCaptureState(IDLE),
mTriggerId(0),
@@ -308,6 +309,7 @@
} else {
nextState = STANDARD_START;
}
+ mShutterNotified = false;
return nextState;
}
@@ -342,7 +344,7 @@
SharedParameters::Lock l(client->getParameters());
/* warning: this also locks a SharedCameraClient */
shutterNotifyLocked(l.mParameters, client);
-
+ mShutterNotified = true;
mTimeoutCount = kMaxTimeoutsForCaptureEnd;
return STANDARD_CAPTURE_WAIT;
}
@@ -474,9 +476,6 @@
return DONE;
}
- /* warning: this also locks a SharedCameraClient */
- shutterNotifyLocked(l.mParameters, client);
-
mTimeoutCount = kMaxTimeoutsForCaptureEnd;
return STANDARD_CAPTURE_WAIT;
}
@@ -493,7 +492,13 @@
break;
}
}
- while (!mNewCaptureReceived) {
+ if (mNewFrameReceived && !mShutterNotified) {
+ SharedParameters::Lock l(client->getParameters());
+ /* warning: this also locks a SharedCameraClient */
+ shutterNotifyLocked(l.mParameters, client);
+ mShutterNotified = true;
+ }
+ while (mNewFrameReceived && !mNewCaptureReceived) {
res = mNewCaptureSignal.waitRelative(mInputMutex, kWaitDuration);
if (res == TIMED_OUT) {
mTimeoutCount--;
diff --git a/services/camera/libcameraservice/camera2/CaptureSequencer.h b/services/camera/libcameraservice/camera2/CaptureSequencer.h
index 8df6d95..4cde9c8 100644
--- a/services/camera/libcameraservice/camera2/CaptureSequencer.h
+++ b/services/camera/libcameraservice/camera2/CaptureSequencer.h
@@ -94,6 +94,8 @@
sp<MemoryBase> mCaptureBuffer;
Condition mNewCaptureSignal;
+ bool mShutterNotified;
+
/**
* Internal to CaptureSequencer
*/