merge in jb-mr1-release history after reset to jb-mr1-dev
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index 155a0b8..3a2dbe2 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -91,6 +91,10 @@
     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/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp
index 7a6e344..e073e39 100644
--- a/services/camera/libcameraservice/Camera2Client.cpp
+++ b/services/camera/libcameraservice/Camera2Client.cpp
@@ -959,21 +959,6 @@
             return INVALID_OPERATION;
         }
 
-        /**
-          * If the camera does not support auto-focus, it is a no-op and
-          * onAutoFocus(boolean, Camera) callback will be called immediately
-          * with a fake value of success set to true.
-          */
-        if (l.mParameters.focusMode == Parameters::FOCUS_MODE_FIXED) {
-            SharedCameraClient::Lock l(mSharedCameraClient);
-            if (l.mCameraClient != 0) {
-                l.mCameraClient->notifyCallback(CAMERA_MSG_FOCUS,
-                    /*success*/1, 0);
-            }
-
-            return OK;
-        }
-
         if (l.mParameters.quirks.triggerAfWithAuto &&
                 l.mParameters.sceneMode != ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED &&
                 l.mParameters.focusMode != Parameters::FOCUS_MODE_AUTO) {
diff --git a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
index fe4abc0..5156539 100644
--- a/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
+++ b/services/camera/libcameraservice/camera2/CaptureSequencer.cpp
@@ -40,7 +40,6 @@
         mNewAEState(false),
         mNewFrameReceived(false),
         mNewCaptureReceived(false),
-        mShutterNotified(false),
         mClient(client),
         mCaptureState(IDLE),
         mTriggerId(0),
@@ -309,7 +308,6 @@
     } else {
         nextState = STANDARD_START;
     }
-    mShutterNotified = false;
 
     return nextState;
 }
@@ -344,7 +342,7 @@
     SharedParameters::Lock l(client->getParameters());
     /* warning: this also locks a SharedCameraClient */
     shutterNotifyLocked(l.mParameters, client);
-    mShutterNotified = true;
+
     mTimeoutCount = kMaxTimeoutsForCaptureEnd;
     return STANDARD_CAPTURE_WAIT;
 }
@@ -476,6 +474,9 @@
         return DONE;
     }
 
+    /* warning: this also locks a SharedCameraClient */
+    shutterNotifyLocked(l.mParameters, client);
+
     mTimeoutCount = kMaxTimeoutsForCaptureEnd;
     return STANDARD_CAPTURE_WAIT;
 }
@@ -492,13 +493,7 @@
             break;
         }
     }
-    if (mNewFrameReceived && !mShutterNotified) {
-        SharedParameters::Lock l(client->getParameters());
-        /* warning: this also locks a SharedCameraClient */
-        shutterNotifyLocked(l.mParameters, client);
-        mShutterNotified = true;
-    }
-    while (mNewFrameReceived && !mNewCaptureReceived) {
+    while (!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 4cde9c8..8df6d95 100644
--- a/services/camera/libcameraservice/camera2/CaptureSequencer.h
+++ b/services/camera/libcameraservice/camera2/CaptureSequencer.h
@@ -94,8 +94,6 @@
     sp<MemoryBase> mCaptureBuffer;
     Condition mNewCaptureSignal;
 
-    bool mShutterNotified;
-
     /**
      * Internal to CaptureSequencer
      */