OSDN Git Service

android-x86/packages-apps-Camera2.git
9 years agoDisabling non available options instead of hiding when hw support is present (camera...
Gabriel Nava [Fri, 1 May 2015 16:28:50 +0000 (09:28 -0700)]
Disabling non available options instead of hiding when hw support is present (camera-haleakala)

- Global scope property persists the support of flash and hdr for the main camera (back)
- If option is not supported at all, option is hidden
- If option is supported in at least one camera but not supported in current module, option is disabled
- If option is supported in current module, option is enabled
- Avoiding race condition where CameraAppUI.applyModuleSpecs was bein called multiple times simultaneously for the same change
- Adding a check so BottomBar UI is updated only when there's a scope (module/camera) change, unless...
- Scope check can be requested within same scope for settings change

Bug: 20630060
Change-Id: Iac5fa2658f04fe8329a2232fb0d5b11d20e566a2

9 years agoFix bug b/20638423
Pengchong Jin [Thu, 30 Apr 2015 21:11:16 +0000 (14:11 -0700)]
Fix bug b/20638423

Catch the AssertionError exception thrown by
CameraAgentFactory.getAndroidCameraAgent, and pop up the reporting
dialog before App termination.

Bug: 20638423
Change-Id: I090ea03b7ff872b40f4b0cc6bcbb33e41f332920

9 years agoMerge "Fix bug b/19965993" into ub-camera-haleakala
Pengchong Jin [Fri, 1 May 2015 06:06:16 +0000 (06:06 +0000)]
Merge "Fix bug b/19965993" into ub-camera-haleakala

9 years agoMerge "Freeze preview after taking shot in capture intent." into ub-camera-haleakala
Senpo Hu [Fri, 1 May 2015 00:42:40 +0000 (00:42 +0000)]
Merge "Freeze preview after taking shot in capture intent." into ub-camera-haleakala

9 years agoFreeze preview after taking shot in capture intent.
Senpo Hu [Thu, 30 Apr 2015 23:23:15 +0000 (16:23 -0700)]
Freeze preview after taking shot in capture intent.

Bug: 20690039
Change-Id: I3402b7d7acb956a886596267ca37bd129ba74e3c

9 years agoFix bug b/19965993
Pengchong Jin [Thu, 30 Apr 2015 22:25:13 +0000 (15:25 -0700)]
Fix bug b/19965993

CameraId null check before checking whether the exposure compensation is
supported.

Bug: 19965993
Change-Id: If5cd7fbfe9ae6d2f83e56c8647836f96fa6e7426

9 years agoMerge "Fix for N4 Video and inclusion of CaptureIntent" into ub-camera-haleakala
I-Jong Lin [Thu, 30 Apr 2015 22:08:05 +0000 (22:08 +0000)]
Merge "Fix for N4 Video and inclusion of CaptureIntent" into ub-camera-haleakala

9 years agoFix for N4 Video and inclusion of CaptureIntent
I-Jong Lin [Thu, 30 Apr 2015 21:23:28 +0000 (14:23 -0700)]
Fix for N4 Video and inclusion of CaptureIntent

Bug: 20694189

Workaround b/19271661 needs to specifically applied in
these circumstances only:
1.  Phone is Nexus4
2.  CaptureModule is enabled
3.  Photo Mode, OR Capture Intent Photo is enabled.

Since we are passing the CameraActivity in TextureViewHelper,
it has enough context to know everything.  Previous implementation
used an invalid CameraProvider to signal that Camera2 was enabled.
Now we just ask the CameraActivity directly.

Change-Id: I47f841ae6476bc034a7ad3f487c40616eed05b71

9 years agoMake sure we cancel countdown before mPaused is set.
Sascha Haeberling [Thu, 30 Apr 2015 21:24:57 +0000 (14:24 -0700)]
Make sure we cancel countdown before mPaused is set.

  Bug: 20696312

Change-Id: I3785a46881e2bb027d0cd06d1c2eba1b38ca2b4a

9 years agoLower the priority of ProcessingService to 'background'.
Sascha Haeberling [Thu, 30 Apr 2015 19:58:54 +0000 (12:58 -0700)]
Lower the priority of ProcessingService to 'background'.

  Bug: 20675397

This should e.g. greatly reduce the jank we see while Lens Blurs are
processing.

Change-Id: I7ffd9bb394a113b913105a6e91c8f12fc067bfbb

9 years agoMerge "Fix for N4 Video Rotation Bug" into ub-camera-haleakala
I-Jong Lin [Thu, 30 Apr 2015 01:18:26 +0000 (01:18 +0000)]
Merge "Fix for N4 Video Rotation Bug" into ub-camera-haleakala

9 years agoFix for N4 Video Rotation Bug
I-Jong Lin [Thu, 30 Apr 2015 00:37:21 +0000 (17:37 -0700)]
Fix for N4 Video Rotation Bug

Previous fix for N4 preview (b/19271661) needed to only be applied
when PhotoModule is active.   Grossly plumbed the correct object
references into TextureViewHelper so that it could know which
module was active.

Bug: 20694189
Change-Id: I0f639ae6ee0832f453213699723dc8aa25e5d9e7

9 years agoMerge "DO NOT MERGE - Show an error if we couldn't connect to the Camera device....
Sascha Haeberling [Thu, 30 Apr 2015 01:09:05 +0000 (01:09 +0000)]
Merge "DO NOT MERGE - Show an error if we couldn't connect to the Camera device." into ub-camera-haleakala

9 years agoDO NOT MERGE - Show an error if we couldn't connect to the Camera device.
Sascha Haeberling [Thu, 30 Apr 2015 00:28:23 +0000 (17:28 -0700)]
DO NOT MERGE - Show an error if we couldn't connect to the Camera device.

  Bug: 20158861

Change-Id: Ib7cec6547a52ef02bb4ab1791d3945ef9e0a99d7

9 years agoMerge "Fix b/20638271: (Part 1)" into ub-camera-haleakala
Pengchong Jin [Thu, 30 Apr 2015 00:03:00 +0000 (00:03 +0000)]
Merge "Fix b/20638271: (Part 1)" into ub-camera-haleakala

9 years agoFix b/20638271: (Part 1)
Pengchong Jin [Wed, 29 Apr 2015 22:56:09 +0000 (15:56 -0700)]
Fix b/20638271: (Part 1)

Handle the case when the instance of CameraDeviceInfo is null.

Bug: b/20638271
Change-Id: If8d9938405f4f2229bc5962c21f3f46e9a2bd1dd

9 years agoMerge "Correctly read AF and AE capabilities for front-camera." into ub-camera-haleakala
Paul Rohde [Wed, 29 Apr 2015 22:44:54 +0000 (22:44 +0000)]
Merge "Correctly read AF and AE capabilities for front-camera." into ub-camera-haleakala

9 years agoMerge "Fix a race condition while tapping retake button." into ub-camera-haleakala
Senpo Hu [Wed, 29 Apr 2015 22:22:13 +0000 (22:22 +0000)]
Merge "Fix a race condition while tapping retake button." into ub-camera-haleakala

9 years agoFix a race condition while tapping retake button.
Senpo Hu [Wed, 29 Apr 2015 21:25:21 +0000 (14:25 -0700)]
Fix a race condition while tapping retake button.

Bug: 19988384
Change-Id: I2dd6c31bdaaf24475b1cb1239a06592b3bd2ec56

9 years agocalling setDrawableByLayerId sets that Drawable's level to 0. reset level of video...
Spike Sprague [Wed, 29 Apr 2015 18:56:50 +0000 (11:56 -0700)]
calling setDrawableByLayerId sets that Drawable's level to 0. reset level of video shutter button to maximum.

bug: 19955500
Change-Id: Ie1fb79dc57edfcd53fa2148b2223a0cd5d6faeb3

9 years agoCorrectly read AF and AE capabilities for front-camera.
Paul Rohde [Wed, 29 Apr 2015 18:13:38 +0000 (11:13 -0700)]
Correctly read AF and AE capabilities for front-camera.

Bug: 20088402
Change-Id: I034bc7db3a52a9ab950da0f41515ceec8f170d03

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 22 Apr 2015 14:23:08 +0000 (07:23 -0700)]
Import translations. DO NOT MERGE

Change-Id: I6daa637a6a0003dd1eb99ae4f2e88c6f4bc8db9a
Auto-generated-cl: translation import

9 years agoEnsure OnScreenHint uses an Activity
Alan Newberger [Mon, 20 Apr 2015 23:57:13 +0000 (16:57 -0700)]
Ensure OnScreenHint uses an Activity

While using an appContext WindowManager is useful in certain cases,
for OnScreenHint is MUST have an Activity-based one so that it
can attach views to it. This was changed before but when moved to
AndroidServices layer, regressed. Added explicit doc comment to
ensure we preserve the activity reference.

Bug: 20430202
Change-Id: Id4977bd8913e8bff8848e5241738111dcc10ac74

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Sat, 18 Apr 2015 03:10:56 +0000 (20:10 -0700)]
Import translations. DO NOT MERGE

Change-Id: Ia9a8b8da5efa281afab9c56c498015f8ae5e4539
Auto-generated-cl: translation import

9 years agoMerge "Add copywrite headers for device lifecycle classes." into ub-camera-haleakala
Paul Rohde [Wed, 15 Apr 2015 20:35:46 +0000 (20:35 +0000)]
Merge "Add copywrite headers for device lifecycle classes." into ub-camera-haleakala

9 years agoAdd copywrite headers for device lifecycle classes.
Paul Rohde [Wed, 15 Apr 2015 20:22:44 +0000 (13:22 -0700)]
Add copywrite headers for device lifecycle classes.

Bug: 20263460

Change-Id: Ia583ec45ba9bec7dbcf41312905f7d92fa9b47dd

9 years agoMerge "Add some basic progress reporting for saving JPEG files." into ub-camera-haleakala
Sascha Haeberling [Wed, 15 Apr 2015 19:54:27 +0000 (19:54 +0000)]
Merge "Add some basic progress reporting for saving JPEG files." into ub-camera-haleakala

9 years agoAdd some basic progress reporting for saving JPEG files.
Sascha Haeberling [Wed, 15 Apr 2015 17:12:25 +0000 (10:12 -0700)]
Add some basic progress reporting for saving JPEG files.

  Bug: 18960470

Change-Id: I8f1547ae6652cd6b81773acf7726751f2d22a55c

9 years agoSend a warmup burst to the camera before attaching the preview.
Paul Rohde [Tue, 14 Apr 2015 23:54:18 +0000 (16:54 -0700)]
Send a warmup burst to the camera before attaching the preview.

This reduces startup jank by submitting a warmup burst of n
frames to the camera before the preview surface is attached to
the camera. This ensures the large internal buffers are
allocated by the HAL before the preview stream is attached. The
change will delay the preview by n frames in exchange for a
smoother preview once the preview is actually shown.

Bug: 19076469

Change-Id: I5abb8b49a64c35686c014001a45239f4eccfe34d

9 years agoMerge "Add a memory pool for reusing direct bytebuffers." into ub-camera-haleakala
Paul Rohde [Tue, 14 Apr 2015 22:55:06 +0000 (22:55 +0000)]
Merge "Add a memory pool for reusing direct bytebuffers." into ub-camera-haleakala

9 years agoAdd a memory pool for reusing direct bytebuffers.
Paul Rohde [Thu, 9 Apr 2015 16:16:29 +0000 (09:16 -0700)]
Add a memory pool for reusing direct bytebuffers.

This should reduce GC's caused by releasing and reusing direct
bytebuffers for subsequent image captures and jpg encoding.

Bug: 20129797
Change-Id: I5dd2538bd3dbc77be1446564f537e7ec0fc56ec4

9 years agoAdd proper support for canceling sessions.
Sascha Haeberling [Mon, 13 Apr 2015 21:06:16 +0000 (14:06 -0700)]
Add proper support for canceling sessions.

  Bug: 19384186

Change-Id: I45b0262947dcd4257d54e706f3cffc69b6bd4bc9

9 years agoMerge "Catch security exception and show error dialog." into ub-camera-haleakala
zafir [Sat, 11 Apr 2015 00:36:09 +0000 (00:36 +0000)]
Merge "Catch security exception and show error dialog." into ub-camera-haleakala

9 years agoCatch security exception and show error dialog.
zafir [Sat, 11 Apr 2015 00:30:50 +0000 (17:30 -0700)]
Catch security exception and show error dialog.

Bug: 20159429
Change-Id: I180ca3d5582d6e5824adc6bdf248af686724ceba

9 years agoMerge "Fix view recycling in filmstrip" into ub-camera-haleakala
Alan Newberger [Fri, 10 Apr 2015 22:49:23 +0000 (22:49 +0000)]
Merge "Fix view recycling in filmstrip" into ub-camera-haleakala

9 years agoFix view recycling in filmstrip
Alan Newberger [Thu, 9 Apr 2015 17:42:06 +0000 (10:42 -0700)]
Fix view recycling in filmstrip

View recycling is pretty broken, with code put in for the old
camera preview in filmstrip being used to avoid recycling in all
cases. This looks like its been broken in a number of releases, but
less so due to a destructive removal of views during updates. I had
fixed that but it then exposed the issue that recycling wasn't occurring
elsewhere. This CL removes views from hierarchy, confirmed no more leaks
when capturing and when swiping through filmstrip.

Bug: 19970885
Change-Id: Ic63b9231bd24db0f44a99567278886eb0998d740

9 years agoAdd average priority speed to ImageBackend
I-Jong Lin [Thu, 9 Apr 2015 17:00:18 +0000 (10:00 -0700)]
Add average priority speed to ImageBackend

Bug: 20129797

Create another priority level for ImageBackend so that
we have finer grain assignment of thread priority.

Change-Id: I291efeab8cf4be561c7d53c52fe13b64dc75f080

9 years agoIncrease the thread priority of critical camera components.
Paul Rohde [Wed, 8 Apr 2015 23:30:22 +0000 (16:30 -0700)]
Increase the thread priority of critical camera components.

This increases the priority of the frame server and metadata
response listeners that must respond immediatly to frames and
callbacks that are returned from the camera HAL. Both threads have
a tiny amout of code and callbacks that get run but must not block
or they will stall the preview on image capture. This appears to
only have limited impact on jank in the app.

Bug: 19076469
Change-Id: I41845e094feffb1ecd3be9613489a3d70f916580

9 years agoMerge "Reduce software jpg encoding priority." into ub-camera-haleakala
Paul Rohde [Wed, 8 Apr 2015 20:31:22 +0000 (20:31 +0000)]
Merge "Reduce software jpg encoding priority." into ub-camera-haleakala

9 years agoReduce software jpg encoding priority.
Paul Rohde [Wed, 8 Apr 2015 19:01:15 +0000 (12:01 -0700)]
Reduce software jpg encoding priority.

This skews the time-to-jpg vs preview jank in favor of a smoother
preview after capturing an image compared to jpg encoding time.
This should remove some of the excessive jank present post-image
capture.

Bug: 19076469
Change-Id: I908ec91153268a0fc9eb3a8e0112dda5bd15a6fb

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 8 Apr 2015 12:36:04 +0000 (05:36 -0700)]
Import translations. DO NOT MERGE

Change-Id: I1638540ca2170f545f32cf3f8a6acba8a45eed75
Auto-generated-cl: translation import

9 years agoOn non-Nexus device, don't show aspect ratio dialog.
Senpo Hu [Tue, 7 Apr 2015 18:21:31 +0000 (11:21 -0700)]
On non-Nexus device, don't show aspect ratio dialog.

Bug: 20101791
Change-Id: I569f0d235c27b87bf5275d7d8f8956162f6de7bf

9 years agoAvoid Camera2 Contanimation in Kit-Kat, Part 2
I-Jong Lin [Mon, 6 Apr 2015 20:20:28 +0000 (13:20 -0700)]
Avoid Camera2 Contanimation in Kit-Kat, Part 2

Bug: 383307

Removed the run-time references to Camera2 API structures
within the face-detection instrumentation code.

Change-Id: Ib2e6acb74446c5abbbb572e28d8cc06f83f01a8f

9 years agoMerge "Defer the ZSL stream by 500 ms" into ub-camera-haleakala
Paul Rohde [Mon, 6 Apr 2015 17:40:26 +0000 (17:40 +0000)]
Merge "Defer the ZSL stream by 500 ms" into ub-camera-haleakala

9 years agoMake sure a 0x0 size is not crashing summary filling.
Sascha Haeberling [Fri, 3 Apr 2015 02:03:11 +0000 (19:03 -0700)]
Make sure a 0x0 size is not crashing summary filling.

  Bug: 20036947

Change-Id: I56a39cd9bf65b84ca5d9820ad6738d16bbc4446e

9 years agoDeclare that Camera2 does not use cleartext network traffic.
Alex Klyubin [Thu, 2 Apr 2015 19:40:54 +0000 (12:40 -0700)]
Declare that Camera2 does not use cleartext network traffic.

This declares to the platform and tools that this app does not use
cleartext network traffic. The platform and tools will be blocking
(on best effort basis) attempts to use such traffic by this app.
For example, attempts to use HTTP (rather than HTTPS) will be blocked.

Bug: 19215516
Change-Id: Icaad30144192b13df87726445e19c37e0fd824bf

9 years agoDefer the ZSL stream by 500 ms
Paul Rohde [Wed, 1 Apr 2015 18:14:37 +0000 (11:14 -0700)]
Defer the ZSL stream by 500 ms

This forces the preview to start before the ZSL stream is
attached, and then attaches the ZSL stream to the repeating
request after a 500ms delay to give the system time to allocate
the underlying buffers for the ZSL image readers.

Bug: 19076469
Change-Id: I75ea28ead5b009e0f65f5f00c0522bcb2219cb22

9 years agoMerge "[CaptureIntent] Disable the shutter button after taking photo." into ub-camera...
Senpo Hu [Thu, 2 Apr 2015 01:00:30 +0000 (01:00 +0000)]
Merge "[CaptureIntent] Disable the shutter button after taking photo." into ub-camera-haleakala

9 years agoMerge "Ignore TRIGGER_CANCEL when tracking AF state" into ub-camera-haleakala
Puneet Lall [Wed, 1 Apr 2015 23:31:18 +0000 (23:31 +0000)]
Merge "Ignore TRIGGER_CANCEL when tracking AF state" into ub-camera-haleakala

9 years agoIgnore TRIGGER_CANCEL when tracking AF state
Puneet Lall [Wed, 1 Apr 2015 23:22:44 +0000 (16:22 -0700)]
Ignore TRIGGER_CANCEL when tracking AF state

Ignores AF state changes caused by the TRIGGER_CANCEL sent before AF
scans resulting from tap-to-focus.

Bug: 20036915
Change-Id: Iea4db57d5683f454dbf929d95af8fa0f0f419f92

9 years ago[CaptureIntent] Disable the shutter button after taking photo.
Senpo Hu [Wed, 1 Apr 2015 22:22:39 +0000 (15:22 -0700)]
[CaptureIntent] Disable the shutter button after taking photo.

Disable the button immediately. The button will be
re-enabled when users press re-take button.

Bug: 19988700
Change-Id: I17088b858e43079bbf17f84fec252a7ba205f5d0

9 years agoMerge "[CaptureIntent] Fix post-capture screen off-by-one pixel issue." into ub-camer...
Sascha Häberling [Wed, 1 Apr 2015 22:01:34 +0000 (22:01 +0000)]
Merge "[CaptureIntent] Fix post-capture screen off-by-one pixel issue." into ub-camera-haleakala

9 years ago[CaptureIntent] Fix post-capture screen off-by-one pixel issue.
Senpo Hu [Wed, 1 Apr 2015 08:18:24 +0000 (01:18 -0700)]
[CaptureIntent] Fix post-capture screen off-by-one pixel issue.

Bug: 19676505
Change-Id: Ifc9b8847f2194d73768e94d426f7ddc56d21f536

9 years agoMerge "Make sure picture sizes are cached on start-up, if they are not already."...
Sascha Haeberling [Wed, 1 Apr 2015 21:06:42 +0000 (21:06 +0000)]
Merge "Make sure picture sizes are cached on start-up, if they are not already." into ub-camera-haleakala

9 years agoMake sure picture sizes are cached on start-up, if they are not already.
Sascha Haeberling [Wed, 1 Apr 2015 19:27:54 +0000 (12:27 -0700)]
Make sure picture sizes are cached on start-up, if they are not already.

  Bug: 20015834

We cache picture sizes on disk, keyed by OS build version number. This makes sure
we update this cache if we start the app on an updated OS. Refocus requires these
sizes and loads them from cache.

Change-Id: Ib8aa9a37481b9a6be441122be41ab81917a5bd37

9 years agoAdd support for dynamic ring-buffer max size
Puneet Lall [Tue, 31 Mar 2015 01:29:20 +0000 (18:29 -0700)]
Add support for dynamic ring-buffer max size

Enables specifying a maximum ring-buffer size.
Setting the ring-buffer size to a value smaller than
ImageReader#getMaxImages reduces the number of android.media.Images held
open at a steady-state at application startup.

Because ImageReader images are allocated on-demand, this mitigates
stuttering in the preview-stream caused by massive allocations that
would otherwise occur as the ring buffer expands.

Bug: 19989536
Change-Id: I5623d0cd0da6542599f430f0dcbf97d581ec8df1

9 years agoMerge "Report jank for simple capture module cameras." into ub-camera-haleakala
Paul Rohde [Tue, 31 Mar 2015 16:39:57 +0000 (16:39 +0000)]
Merge "Report jank for simple capture module cameras." into ub-camera-haleakala

9 years agoReport jank for simple capture module cameras.
Paul Rohde [Tue, 31 Mar 2015 16:01:44 +0000 (09:01 -0700)]
Report jank for simple capture module cameras.

This clarifies the jank statistics by explicitly including a
report if the jank detector is installed.

Bug: 19987252

Change-Id: Ie8e4b9826eb0e3152d7f8358728019d1a81e787b

9 years agoFix build by adding missing imports.
Sascha Haeberling [Mon, 30 Mar 2015 23:49:09 +0000 (16:49 -0700)]
Fix build by adding missing imports.

Change-Id: Ic98b815cd9aa956d1d36db70f85d8bc29d5b8cf6

9 years agoMerge "Add support for new independent Lens Blur quality setting." into ub-camera...
Sascha Haeberling [Mon, 30 Mar 2015 23:30:43 +0000 (23:30 +0000)]
Merge "Add support for new independent Lens Blur quality setting." into ub-camera-haleakala

9 years agoMerge "Collect and log jank statistics in the Camera." into ub-camera-haleakala
Paul Rohde [Mon, 30 Mar 2015 22:08:00 +0000 (22:08 +0000)]
Merge "Collect and log jank statistics in the Camera." into ub-camera-haleakala

9 years agoMerge "Reduce startup preview jank by preventing Glide pre-allocation." into ub-camer...
Paul Rohde [Mon, 30 Mar 2015 21:51:23 +0000 (21:51 +0000)]
Merge "Reduce startup preview jank by preventing Glide pre-allocation." into ub-camera-haleakala

9 years agoAdd support for new independent Lens Blur quality setting.
Sascha Haeberling [Thu, 26 Mar 2015 01:49:40 +0000 (18:49 -0700)]
Add support for new independent Lens Blur quality setting.

  Bug: 19424875

This CL and its sibling do two things:
- Bring back the Lens Blur setting
- Populate the setting with up to three native picture resolutions.
- If needed, choose the default as being the second highest resolution.
  (The list is not a full list, but filterd by what we show to the user).
- Make sure that after a new install a the default is set.
- Extra check in RefocusModule to make sure the default is set if old
  setting is not valid. This is important for upgrades.
- To make the size logic re-usable, I wrapped it into a PictureSizeLoader
  which also makes the CameraSettingsActivity a bit easier to read.

Change-Id: I53fcac8304f19be4f2c5ac053363f6805b933d89

9 years agoCollect and log jank statistics in the Camera.
Paul Rohde [Mon, 30 Mar 2015 18:35:47 +0000 (11:35 -0700)]
Collect and log jank statistics in the Camera.

This detects and logs sequences of camera timestamps where the
delta between the the current and last frame exceeds the
previous delta by a percentage threshold. This should only occur
when there are visible janks in the camera preview.

Bug: 19987252

Change-Id: Icced48be8232bba625aa501b2b1f5c111dbb5573

9 years agoMerge "Detect jank in the preview by measuring sensor timestamps." into ub-camera...
Paul Rohde [Mon, 30 Mar 2015 17:37:21 +0000 (17:37 +0000)]
Merge "Detect jank in the preview by measuring sensor timestamps." into ub-camera-haleakala

9 years agoDetect jank in the preview by measuring sensor timestamps.
Paul Rohde [Fri, 27 Mar 2015 23:34:09 +0000 (16:34 -0700)]
Detect jank in the preview by measuring sensor timestamps.

This detects frames dropped by the camera (Which results in a
preview that skips and jitters) by tracking the delta between
frames and logging when that delta increases by more than 120%.

Bug: 19076469
Change-Id: Icc9f08174097587c850c06ae88007ce784775851

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 30 Mar 2015 12:39:46 +0000 (05:39 -0700)]
Import translations. DO NOT MERGE

Change-Id: I3163846ab4a148369e7ce40e2397e2c470313799
Auto-generated-cl: translation import

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 30 Mar 2015 12:27:42 +0000 (05:27 -0700)]
Import translations. DO NOT MERGE

Change-Id: Ic0ec16a70f3a459175f5d06902c16e39a4c6f3a9
Auto-generated-cl: translation import

9 years agoMerge "Enable exposure compensation in capture intent." into ub-camera-haleakala
zafir [Sat, 28 Mar 2015 06:35:18 +0000 (06:35 +0000)]
Merge "Enable exposure compensation in capture intent." into ub-camera-haleakala

9 years agoEnable exposure compensation in capture intent.
zafir [Sat, 28 Mar 2015 02:07:35 +0000 (19:07 -0700)]
Enable exposure compensation in capture intent.

Bug: 19964499
Change-Id: I2f7d43aa421dba0fa873eaf47c46d955136662e5

9 years agoMerge "Don't use undersore for variable names." into ub-camera-haleakala
Sascha Haeberling [Fri, 27 Mar 2015 23:09:22 +0000 (23:09 +0000)]
Merge "Don't use undersore for variable names." into ub-camera-haleakala

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Fri, 27 Mar 2015 22:29:02 +0000 (15:29 -0700)]
Import translations. DO NOT MERGE

Change-Id: I50e93f74c8b4e26a2431e01133eff7e5c63b67d3
Auto-generated-cl: translation import

9 years agoImport translations. DO NOT MERGE
Geoff Mendal [Fri, 27 Mar 2015 22:16:13 +0000 (15:16 -0700)]
Import translations. DO NOT MERGE

Change-Id: I3f638a70211e60ea731ca24dec0d3358df2e461e
Auto-generated-cl: translation import

9 years agoDon't use undersore for variable names.
Sascha Haeberling [Fri, 27 Mar 2015 19:51:16 +0000 (12:51 -0700)]
Don't use undersore for variable names.

Gets rid of the following compiler warning:
"use of '_' as an identifier might not be supported in releases after Java SE 8)"

Change-Id: Icb7eec3093acdd629f1e5b9994bd157a01fd8781

9 years agoMerge "Sync Video torch setting with on-screen indicator" into ub-camera-haleakala
Spike Sprague [Fri, 27 Mar 2015 17:53:44 +0000 (17:53 +0000)]
Merge "Sync Video torch setting with on-screen indicator" into ub-camera-haleakala

9 years agoHiding manual exposure button in video module.
zafir [Fri, 27 Mar 2015 02:08:17 +0000 (19:08 -0700)]
Hiding manual exposure button in video module.

Manual exposure button should never appear in non-camera modes.
This fix explicitly ensures that it will never appear in either
disabled or greyed out states in video module.

Bug: 19954837
Change-Id: Ia6730da9e3acaa62e2a30f594f344d86e2b25c69

9 years agoSync Video torch setting with on-screen indicator
Spike Sprague [Fri, 27 Mar 2015 01:42:30 +0000 (18:42 -0700)]
Sync Video torch setting with on-screen indicator

bug: 19954583
Change-Id: Ia491b63f31d81038ca8d8841b1f72f5ee76bb64f

9 years agoMerge "Include HDR on/off correctly in event." into ub-camera-haleakala
Andy Huibers [Fri, 27 Mar 2015 00:26:34 +0000 (00:26 +0000)]
Merge "Include HDR on/off correctly in event." into ub-camera-haleakala

9 years agoInclude HDR on/off correctly in event.
Andy Huibers [Fri, 27 Mar 2015 00:15:29 +0000 (17:15 -0700)]
Include HDR on/off correctly in event.

Bug: 19900458
Change-Id: Ifd9a585a61801cd1abe16bdbe47a56d96399b84e

9 years agoMake sure N4 uses the correct texture view transform.
Sascha Haeberling [Fri, 27 Mar 2015 00:06:38 +0000 (17:06 -0700)]
Make sure N4 uses the correct texture view transform.

  Bug: 19948775

Change-Id: Ib489a5a66cf4a667914c8516f71f54219660fc09

9 years agoPrevent countdown cancelation from starting the camera on pause.
Paul Rohde [Thu, 26 Mar 2015 17:29:44 +0000 (10:29 -0700)]
Prevent countdown cancelation from starting the camera on pause.

Bug: 19937825
Change-Id: I13e774afe2da9342b9defcc0f1d304032d931b12

9 years ago[CaptureIntent] Fix NPE crash when open camera.
Senpo Hu [Thu, 26 Mar 2015 01:22:39 +0000 (18:22 -0700)]
[CaptureIntent] Fix NPE crash when open camera.

Change-Id: I09cddae3ce935c92d6829924372a4082bb69f48a

9 years agoMerge "Remove the setFocusRatio verbose logspam." into ub-camera-haleakala
Paul Rohde [Thu, 26 Mar 2015 00:19:20 +0000 (00:19 +0000)]
Merge "Remove the setFocusRatio verbose logspam." into ub-camera-haleakala

9 years agoMerge "Change CaptureSession.saveAndFinish to return a future for the URI." into...
Sascha Haeberling [Wed, 25 Mar 2015 23:39:44 +0000 (23:39 +0000)]
Merge "Change CaptureSession.saveAndFinish to return a future for the URI." into ub-camera-haleakala

9 years agoChange CaptureSession.saveAndFinish to return a future for the URI.
Sascha Haeberling [Wed, 25 Mar 2015 22:08:34 +0000 (15:08 -0700)]
Change CaptureSession.saveAndFinish to return a future for the URI.

  Bug: 19665531

Most callers of saveAndFinish never provided the callback. In addition
it's unclear on what thread the callback is called. This cleans this up
a bit and moves the responsibility to the caller to decide on which
thread the URI should be received. Callers that don't care don't have to
do anything.

Also fixes a bug where we wouldn't even supply a URI for when there was
no placeholder.

Change-Id: I1a186b470d2cca8f34a674e9eb5c533fc01a4409

9 years agoRemove the setFocusRatio verbose logspam.
Paul Rohde [Wed, 25 Mar 2015 23:29:26 +0000 (16:29 -0700)]
Remove the setFocusRatio verbose logspam.

Bug: 19931564
Change-Id: Ib4d9768a95e47879f945f9a869ce1631d43cbbc8

9 years agoFix build error. Mirror API change to Camera2.
Sascha Haeberling [Wed, 25 Mar 2015 22:21:26 +0000 (15:21 -0700)]
Fix build error. Mirror API change to Camera2.

  Bug: 19899007

Change-Id: I51d3e02b42a0bff1bea85c6cd910192e6c239293

9 years agoMerge "Catch HAL error that prevents retrieval of resolutions." into ub-camera-haleakala
Sascha Haeberling [Wed, 25 Mar 2015 20:50:52 +0000 (20:50 +0000)]
Merge "Catch HAL error that prevents retrieval of resolutions." into ub-camera-haleakala

9 years agoMerge "Cancel in-progress capture when paused" into ub-camera-haleakala
Sascha Häberling [Wed, 25 Mar 2015 20:50:20 +0000 (20:50 +0000)]
Merge "Cancel in-progress capture when paused" into ub-camera-haleakala

9 years agoCatch HAL error that prevents retrieval of resolutions.
Sascha Haeberling [Tue, 24 Mar 2015 22:59:39 +0000 (15:59 -0700)]
Catch HAL error that prevents retrieval of resolutions.

  Bug: 19899007

Change-Id: I822510c03ecc1d48f607bf8f765831f1a39e3074

9 years agoCancel in-progress capture when paused
Puneet Lall [Wed, 25 Mar 2015 20:19:36 +0000 (13:19 -0700)]
Cancel in-progress capture when paused

Change exception-handling behavior to cancel an in-progress capture (via
CaptureSession#cancel()) if the app is paused before any image is
acquired from the device.  Previous behavior launched an error dialog to the
user.

Bug: 19913612
Change-Id: If40dceabc4adbd901fbdac1a0d97f805389c778d

9 years agoSuppress HDR 16:9 on N4
Alan Newberger [Wed, 25 Mar 2015 00:33:18 +0000 (17:33 -0700)]
Suppress HDR 16:9 on N4

Add logic to CaptureModule HardwareSpec to avoid
support for HDR if in 16:9. This takes care of UI,
also wire HardwareSpec into OneCameraCaptureSetting
to ensure we only use the stored setting when HDR
is supported.

Bug: 19697027
Change-Id: Idcd02ea9910974d8afda5f81c45eb928b9df89af

9 years agoMerge "Show error dialog when camera is unavailable." into ub-camera-haleakala
zafir [Wed, 25 Mar 2015 17:57:58 +0000 (17:57 +0000)]
Merge "Show error dialog when camera is unavailable." into ub-camera-haleakala

9 years agoShow error dialog when camera is unavailable.
zafir [Tue, 24 Mar 2015 23:22:06 +0000 (16:22 -0700)]
Show error dialog when camera is unavailable.

Bug: 19888394
Change-Id: I6d52d1be7ecac6ece85845bc3f06b1c7e0963d6f

9 years agoReduce startup preview jank by preventing Glide pre-allocation.
Paul Rohde [Wed, 25 Mar 2015 17:14:21 +0000 (10:14 -0700)]
Reduce startup preview jank by preventing Glide pre-allocation.

Several systraces and app runs seem to show that removing the
Glide bitmap pre-allocation for full size images slightly reduces
the startup preview jank on the N6. There did not appear to be
any significant regressions in the filmstrip jank.

Bug: 19076469

Change-Id: Ia01d7d09eedfc6ac78611c0f433cdcad8c15c559

9 years agoMerge "[CaptureIntent] Log CaptureDone event to Clearcut." into ub-camera-haleakala
Senpo Hu [Wed, 25 Mar 2015 05:28:55 +0000 (05:28 +0000)]
Merge "[CaptureIntent] Log CaptureDone event to Clearcut." into ub-camera-haleakala

9 years ago[CaptureIntent] Log CaptureDone event to Clearcut.
Senpo Hu [Wed, 25 Mar 2015 00:56:15 +0000 (17:56 -0700)]
[CaptureIntent] Log CaptureDone event to Clearcut.

Bug: 19035503
Change-Id: I786f834beb45d519047aaa06a7838720c0188459

9 years agoDO NOT MERGE Disable ZSL for N5.
Sascha Haeberling [Tue, 24 Mar 2015 23:00:01 +0000 (16:00 -0700)]
DO NOT MERGE Disable ZSL for N5.

 Bug: 19565931

Data showed the preview freeze is happening and WAR is not working.

Change-Id: I9e49bfe7cdf447ef5fe57a1a393ba8d96d1b051b

9 years agoSend AF_TRIGGER_CANCEL before every AF_TRIGGER_START
Puneet Lall [Tue, 24 Mar 2015 18:00:24 +0000 (11:00 -0700)]
Send AF_TRIGGER_CANCEL before every AF_TRIGGER_START

Implements a workaround for bug on N6 in which the camera driver may get
stuck if two adjacent AF_TRIGGER_START are sent in a sequence.

Bug: 19892741
Change-Id: I729d7a5ca865cd5b3ba8ddd5862e422470c16671

9 years agoMerge "Fix the camera2 build and import the correct Android metadata." into ub-camera...
Paul Rohde [Tue, 24 Mar 2015 17:24:27 +0000 (17:24 +0000)]
Merge "Fix the camera2 build and import the correct Android metadata." into ub-camera-haleakala