On the Tarako device, when the camera is invoked for a pick activity, it can be quite slow. It isn't so bad when invoked from the SMS app, but when invoked by the Facebook app (which is not certified) it gets run in a separate process and can be very laggy. This bug is a followup to bug 1007019 to attempt to address or disguise some of the lagginess.
Created attachment 8430352 [details] [review] link to patch on github This patch does a few things: 1) for pick activities when the user clicks the select button, it keeps the image preview and spinner up until the app dies and the user goes back to their invoking app. Previously we went back to the viewfinder and sometimes had a black screen before the Facebook app reappeared 2) It displays a focus ring before taking a picture even though Tarako is a fixed-focus camera. Because the camera can be slow to take a picture, this helps give the user feedback that somethign is actually happening. 3) It synchronizes the focus ring with the shutter sound. Because it is so laggy, the sound can play well after the photo is taken. By not hiding the focus ring until after the sound completes the experience seems less broken. The main changes are in camera.js. The changes to confirm.js enable the "don't hide the confirm dialog" change. And the changes to soundeffect.js enable us to hide the focus ring on the shutter sound. Note that even with this patch, when invoking the camera pick activity from Facebook, there can still be a more than a second delay between tapping the shutter button and anything happening on the screen. This seems to be completely out of our control. The shutter button callback just isn't getting called for a very long time. (I tried switching from click to touchstart, but it didn't help much and caused other problems, so that is not in this patch.)
Fabrice: based on our discussion in bug 1007019, I'm nominating this for 1.3T.
Comment on attachment 8430352 [details] [review] link to patch on github Looks good. All good ideas IMO to help improve the perception of the app's performance on Tarako.
Looks like my patch broke a unit test. I'll have to fix that tomorrow before landing this.
Okay, I've got the tests fixed. Just waiting for Travis to be green.
Landed on v1.3t: https://github.com/mozilla-b2g/gaia/commit/7f858edf2c8021ba651ab14b1dbfa31112129460
Verified as fixed on the latest Tarako build. 1.3T Environmental Variables: Device: Tarako 1.3T BuildID: 20140602014001 Gaia: 335486c42498fa7a93c21e4d6121199728602ab8 Gecko: 55e4d83019e5 Version: 28.1 Firmware Version: SP6821a-Gonk-4.0-4-29 Camera does not appear laggy.