History log of /packages/apps/Camera2/src/com/android/camera/CaptureModule.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef22af43f7769ce6975f674351d29d5fa0df5e07 25-Jun-2015 Alan Newberger <alann@google.com> Ensure CaptureModule/API2 works without front camera

Add a check in both first run dialogs, and the generated HardwareSpec,
so that front cameras are only used if detected.

BUG=21781461

Change-Id: I6844655b2fd3df90b649f5dfd6a006ef68dbf1da
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
e6b00bf3c0319cba17ce23161402568c8e3c3547 28-May-2015 Gabriel Nava <gnava@google.com> Fix for unusable camera after quick pause/resume and HDR+ switch (camera-Haleakala)

- Removing the hack for b/18854352
- Running the camera reopen camera operations and onReadyForCapture callback in a non-UI thread to avoid dead-locks

Bug: 21025113
Change-Id: I5545148769d92e5a87ffa9b693397fd7737edee6
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
14d92c346e1890cf3eeb0fb9c846d834e2c59179 28-May-2015 Paul Rohde <codelogic@google.com> Merge "Log capture session canceled events." into ub-camera-haleakala
646e84f85a3f463ce094ad5a9caca261277f0d0e 28-May-2015 Paul Rohde <codelogic@google.com> Log capture session canceled events.

This will handle the edgecase where capture sessions may be
canceled inbetween the time the button is pressed and the capture
actually starts so that it is possible to subtract these cases
out of the unsaved image data.

Bug: 21169512
Change-Id: Ie226d81bb10acd90dc1297230d4b024b7cd2d4d6
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d927492ade2e253ccc620effd5602582eaa6dd2d 27-May-2015 Gabriel Nava <gnava@google.com> Handling the GcamService timeout due to application in paused state (camera-Haleakala)

- When GcamService times out due to a pause state, all resources are released.
- Releasing the gcam resources without showing the error dialog allows next resume operation to open the camera

Bug: 21025113
Change-Id: I95a89fbf6ce2498c1323cd4d06383141cc7cb913
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
231b1c0679892e431bac9fe4461d5fb235e362b1 16-May-2015 Paul Rohde <codelogic@google.com> Log capture started and bytes on disk

Change-Id: I3a62aed33f55b396b4940a7bc9e5da5131616890
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
ca434e5414ae721e577da44c279a7fad9f43ca2a 04-May-2015 Gabriel Nava <gnava@google.com> Preventing camera button to get into wrong state when pressed in succession (camera-haleakala)

- Adding methods to ButtonManager to enable/disable camera button explicitly
- Camera button cannot be enabled during initialization if it was explicitly disabled
- PhotoModule, VideoModule and CaptureModule enable/disable camera button on camera switch
- Capture button is disabled before requesting the camera switch
- Capture button is re-enabled once the camera open confirmation is received

Bug: 20693214
Change-Id: I6383c705eee0a82397b975332cf37bbcd5913128
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
2914f845c1d53f4a3b9aac68998b521290a7192c 30-Apr-2015 Paul Rohde <codelogic@google.com> Check for a potentially destroyed activity before startPreview.

There is a small chance that the activity can be destroyed
between the time the camera is created and the preview is started.
This can lead to unchecked NPE's across the app because most code
assumes that there will never be a case where activity objects
are accessed after onDestroy.

Bug: 20097425
Change-Id: I2904ffba451ded2417a806c83fd12e4f62611150
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d9ca269f8f54ea9b316d383ec85e05708b0fefcb 30-Apr-2015 Sascha Haeberling <haeberling@google.com> Make sure we cancel countdown before mPaused is set.

Bug: 20696312

Change-Id: I3785a46881e2bb027d0cd06d1c2eba1b38ca2b4a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
b55bc734e5d9284cd739bc384a190dbe155d540d 29-Apr-2015 Paul Rohde <codelogic@google.com> Correctly read AF and AE capabilities for front-camera.

Bug: 20088402
Change-Id: I034bc7db3a52a9ab950da0f41515ceec8f170d03
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
cdc63303895d39e6f8b8dc60ba72e73d101ab401 28-Mar-2015 zafir <zafir@google.com> Enable exposure compensation in capture intent.

Bug: 19964499
Change-Id: I2f7d43aa421dba0fa873eaf47c46d955136662e5
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
86eb60744b65f90d1f710585007b300c11181fa3 27-Mar-2015 Andy Huibers <andyhuibers@google.com> Include HDR on/off correctly in event.

Bug: 19900458
Change-Id: Ifd9a585a61801cd1abe16bdbe47a56d96399b84e
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
458cb4c551fe9114a11befe0a02450aa4414c7ed 26-Mar-2015 Paul Rohde <codelogic@google.com> Prevent countdown cancelation from starting the camera on pause.

Bug: 19937825
Change-Id: I13e774afe2da9342b9defcc0f1d304032d931b12
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
6dced729a2b3416a3399a744ea188d5e5d4331d3 25-Mar-2015 Sascha Haeberling <haeberling@google.com> Merge "Catch HAL error that prevents retrieval of resolutions." into ub-camera-haleakala
3ad9c9035f8be50f6b2ef8cac9943045f7cf8a74 24-Mar-2015 Sascha Haeberling <haeberling@google.com> Catch HAL error that prevents retrieval of resolutions.

Bug: 19899007

Change-Id: I822510c03ecc1d48f607bf8f765831f1a39e3074
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d6780314422f6cfa6e905f52e2744d7e45bd3b66 25-Mar-2015 Alan Newberger <alann@google.com> 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
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
8d84a7c1bb9df49aa21396f98b371875c816ed42 25-Mar-2015 zafir <zafir@google.com> Show error dialog when camera is unavailable.

Bug: 19888394
Change-Id: I6d52d1be7ecac6ece85845bc3f06b1c7e0963d6f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
28a98f5cbadee3589e3698f3653301351e46d200 24-Mar-2015 zafir <zafir@google.com> Merge "Hiding manual exposure button in N6. The button was previously disabled." into ub-camera-haleakala
57c889d4b88517dd0996547dbae4f314c2a3fcdf 24-Mar-2015 zafir <zafir@google.com> Hiding manual exposure button in N6. The button was previously disabled.

Bug: 18523154
Change-Id: Id08cef46fc4a67e50ce4b1acd185c5ae6efa94ad
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
6bb2326e658562bbffb8ca5b8d33e84062e519d9 24-Mar-2015 I-Jong Lin <ijonglin@google.com> Merge "Add Faces and Lens Dist. info to photoCaptureDone" into ub-camera-haleakala
90db65676b53f591ca4333c35768cd7e2c8d49ed 24-Mar-2015 Senpo Hu <senpo@google.com> Merge "OneCameraOpener should inform ActiveCameraDeviceTracker about camera open." into ub-camera-haleakala
00562dd0a8451eda80815b3d8fdcb8075e4b9db6 23-Mar-2015 Senpo Hu <senpo@google.com> OneCameraOpener should inform ActiveCameraDeviceTracker about camera open.

Therefore, people use OneCameraOpener to open a camera don't need to worry
about ActiveCameraDeviceTracker.

To make people don't need to depend on CameraActivity/AppController, move
setting scope generation into two utility methods:
* SettingsManager.getCameraSettingScope()
* SettingsManager.getModuleSettingScope()

Bug: 19892712
Change-Id: I04caae24ea72a41d7d8e0786a99912098c2cf1ef
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
ad529c3073ce16c1cc2861f33658132b87bfea95 18-Mar-2015 I-Jong Lin <ijonglin@google.com> Add Faces and Lens Dist. info to photoCaptureDone

Added the plumbing for getting values off of the
TotalCaptureResult and putting them into the
photoCaptureDoneEvent.

Bug: 19805467
Change-Id: Id0d16623ffe7eef78b23fd15a4edfeeca5a66eaa
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
46aac2cd824dceb30afebf1c8da955e4fa55ac5c 20-Mar-2015 Senpo Hu <senpo@google.com> Clean up HDR+ button state logic.

CameraAppUI#applyModuleSpecs should honor whatever HardwareSpec and
BottomBarUISpec provided by modules. UI should not change behavior by
poking setting by itself. This can cause huge pain when debugging.

Bug: 19657871
Change-Id: Ief153f6c92a12ab1a72732a7a0908059fd91167e
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
1d84d7107686aa428ee2eeb1a8caf0ea3e43b1df 12-Mar-2015 Paul Rohde <codelogic@google.com> Re-arrange camera initialization.

This change re-arranges several things to make it possible to know
the CameraId you are about to open before you actually open the
camera device. It also adds an explicit CameraId class for handling
both legacy and camera2 id comparisons, an active camera tracker,
and moves the camera id query mechanism into a hardware manager
class in prep for the subsequent camera release.

Bug: 19679820

Change-Id: I4c09b9a12a1ea5badcac3a6a073a56764f9a7eba
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
14b9f1fc0b273bbfb79fde19d699e5db8fcf95f6 16-Mar-2015 I-Jong Lin <ijonglin@google.com> Merge "Add PhotoCaptureEvent to Capture Module" into ub-camera-haleakala
e7c53cc907f5bb40c8d112830d12ac494e4c68c5 12-Mar-2015 I-Jong Lin <ijonglin@google.com> Add PhotoCaptureEvent to Capture Module

Adds a CaptureSession collector class so that
we can combine stats information from both the
CaptureModule and ImageBackend to create a
complete PhotoCaptureDone event.

Bug: 19035503
Change-Id: Ide5f708c5f3efb710fa704f3f30c52ac7a8c3fe4
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
46a5b5e7a933e510e0ab634e3f222aeff7de7a76 13-Mar-2015 Sascha Haeberling <haeberling@google.com> Don't take picture if camera is closed.

Bug: 19712310

Change-Id: Iaaae7a1c784e4149ca837e9bda496f734be56890
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
7abd8f51ff9c6764966e3ae879f3ecc4039987fd 12-Mar-2015 zafir <zafir@google.com> Merge "Disable manual exposure button in HDR+ mode." into ub-camera-haleakala
0409c8594fd1629ee07df827cf0d7a0f336b9326 11-Mar-2015 zafir <zafir@google.com> Disable manual exposure button in HDR+ mode.

Bug: 19641530
Change-Id: I70d47a678eb0c5b77040ff071af14dd35c1e73a8
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
9f0a07d216d4eb6e2523d567f34580467d8ce83b 06-Mar-2015 Shashi Shekhar <shashishekhar@google.com> Enable shutter button as soon as burst finishes.

Instead of keeping the Capture button disabled, do not wait for burst
results to enable the capture button. Instead enable it as soon as burst
is done.

Change-Id: I19f873d8e461b0c5385bdd2f9fb93f0a9fb7a05b
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
aa92d134dd63b71396e0c734007d24a3b37662bd 09-Mar-2015 Shashi Shekhar <shashishekhar@google.com> Fix a typo in Camera capture session.

Fix a typo that leads to recursive call.

Change-Id: Iad9fe9335169f1d7b211d6d6f5355229a08f797b
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
698e271d2b263778bfa73d1e67d6e2cd2783c89e 04-Mar-2015 zafir <zafir@google.com> Added more error handling for camera access and picture storage issues.

Implemented onFailure() method in the OpenCallback interface and
onPictureTakingFailed() in the PictureCallback interface.
OnFailure() routes through showErrorAndFinish() in the AppController.

Bug: 19452391

Change-Id: I3c19a274cc7664f7d1834899a486c57d0585dc9a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
3a92e37230714aafc7fe8924e7f2d1413306da17 06-Mar-2015 Paul Rohde <codelogic@google.com> Fix flash mode by changing the setting scope to be correct.

Bug: 19630464

Change-Id: Id1257c23fef1152792a9fb81572768a4d91e22e5
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
a6794192885c0e5e942de43b7dbff9e6c4282e70 05-Mar-2015 Puneet Lall <puneetl@google.com> Merge "Add error handling for repeating preview workaround" into ub-camera-haleakala
66b942a3d20aac65454961ef2bc219ca560b9fba 03-Mar-2015 Puneet Lall <puneetl@google.com> Add error handling for repeating preview workaround

Adds error handling to show a dialog if the workaround for the repeating
preview (bug: 19061883) fails.

Bug: 19565931
Change-Id: Iabc3b4fdbc6977b0e1828243e80138385a3ef522
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
76132c239e0d7732610ba30f3d945c42ca12eeb7 05-Mar-2015 I-Jong Lin <ijonglin@google.com> Merge "N4 16:9 Preview Workaround" into ub-camera-haleakala
55e498578b46ef9e7b3aa70f30a68ea9bd788d63 04-Mar-2015 I-Jong Lin <ijonglin@google.com> N4 16:9 Preview Workaround

The N4-specific fix is to trick the layout UI logic to accept a
16:9 preview coming from a 4:3 surface. When we render the 4:3
surface, we fill in the size of the preview area. So, if
the surface dimensions are 4:3 AND the surface actually
contains 16:9 content AND the preview view is also 16:9, then
preview will actually look correct. To maintain this inconsistency
between the surface and the content aspect ratio, we use the
legacy layout path, and trick the UI layout into laying out
a 16:9 preview, but using a matrix transform that converts 4:3
surface into a 16:9 view. In new and improved matrix transformation
codepath, we correctly assume that the matrix and the preview
size should be consistent.

Currently, the 0.9MP camera setting on the N4 on the front and back
camera produces a squeezed preview, but also produces a squeezed
JPEG artifact and is probably another independent N4 HAL related issue.
But it's WYSIWYG, so I guess it's correct.

Bug: 19271661
Change-Id: I213a423f891a7c216568970c7f520a6134f9ad13
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
e48cd5405840c530d4beefca84674c4919a77edb 04-Mar-2015 Sascha Haeberling <haeberling@google.com> Make sure we don't start sessions on long-press if no burst is taken.

Bug: 19602850

Change-Id: Ia49e508811ca145e93d1f7e2df83100ba3fa1816
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
a166b882d74c9c8d638479b79517c99448865e99 04-Mar-2015 Senpo Hu <senpo@google.com> Decouple OneCameraManager and CameraActivity.

1. To allow other activity (such as SettingsActivity) to
create OneCameraManager.

2. Also simplify OneCameraManager.open() and OneCameraCreator.create()
interface by introducing OneCameraCaptureSetting. From time to time,
we always need to change these interfaces if we want to pass in more
things to OneCamera. This solves the headache and also removes the
dependency between OneCameraCreator and SettingsManager.

Bug: 18523154
Change-Id: Ifb9077bb046740c600dab3b3b369a0f422dbbbeb
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
8d1f04d7babc04d73ac5bd0d9e1dd46bc559ff3d 03-Mar-2015 I-Jong Lin <ijonglin@google.com> Merge "Legacy Autotransform Support to CaptureModule" into ub-camera-haleakala
e61fbc4cba45ec740703d9a9e2a651e2d3e3a3c2 03-Mar-2015 zafir <zafir@google.com> Merge "Adding ability to zoom in accessibility mode using TalkBack" into ub-camera-haleakala
971ad50c0f220a396ffce50245617ff59ed0a09e 21-Feb-2015 zafir <zafir@google.com> Adding ability to zoom in accessibility mode using TalkBack

Bug: 18986078
Bug: 19546523
Change-Id: Ie68234a9a3a0b8b9be870cc674658194c72c84ef
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
1d0dd50db5d3d02d1209b4c0a3e6d4a71d2c8acf 03-Mar-2015 I-Jong Lin <ijonglin@google.com> Legacy Autotransform Support to CaptureModule

Added the legacy support for Capture Module to use
the combination of transformations, dynamic layout, and
transform helpers that PhotoModule uses. It seems
to replicate that same functionality as the CaptureModuleUI,
but it's good to have that option for comparison, and to be
able to turn it on and off with one line configuration.

Bug: 19271661
Change-Id: I4ad4fa6fe3547373d6fbf77a53a1a18cd26df8ec
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d1f25e8507bc27a85853bb718c365d79a838dc33 27-Feb-2015 Paul Rohde <codelogic@google.com> Fix focus ring radius responses.

This fixes a scaling problem that was causing the focus controller
to ignore the radius changes on devices that supported providing
lens position. It also removes redundant focus indicator clearing
that was causing intermitent and jumpy animations.

Bug: 19527399

Change-Id: I0b2a734aa9dc4030430f1420cc26d75784dcbdf6
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
f2399a5148ec6f101e9e0b3f137d33b443b79b8c 24-Feb-2015 Alan Newberger <alann@google.com> Make module scope prefix a static agent value

This removes the multiple "PhotoModule" strings across
the codebase and allows for retrieval of a module's string
scope prefix as part of its static ModuleAgent properties
rather than as a property of the module itself.

Bug: 19482146
Change-Id: I2c36878dd070106149909f19f98bcae221b94012
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
e121849f9a77b3a1e385b2aee382e0d66411fe40 23-Feb-2015 I-Jong Lin <ijonglin@google.com> Refactor PreviewTransform into CaptureModule

Propogate the refactoring of the Preview Transformation into
CaptureModule so that we can have consistent cross-module
implementation. Stepping stone CL on the way to fix the aspect
ratio.

Bug: 19271661

Change-Id: Ib3e09ed0c4c5cef9e94bcd0f89228c1b2990f489
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
8f51086c8177056345de996963515c4bd3415254 19-Feb-2015 Sascha Haeberling <haeberling@google.com> Centralize logic for Camera API feature determination.

Bug: 19179276

This captures camera capabilities in a centralized class and allows
them to be overridden by GServices in the field or using adb.

Since this is not it's own class it would be trivial to create another
instance for testing and pass that into CameraActivity or even to change
these values using a UI before the actual Activity is started.

Change-Id: I74262c8467f631c7b5e42b02d269d5f401d4e9e7
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
0db8a2fd5cc02753d42f34a1c858b980c6c277bb 20-Feb-2015 Paul Rohde <codelogic@google.com> HDR Scene mode support for CaptureModule.

Bug: 18622877 N4 HDR Scene support.
Bug: 19269257 HDR+ flash setting persistance.

Change-Id: Ibac3d6513a1e14d8a2ffaf6208509133d31a8fb8
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
83b241e447a2b1a6da8fc2f4f40ac2ae3bcf4152 19-Feb-2015 Paul Rohde <codelogic@google.com> Fix accidental import.

Change-Id: Ia6bb08c1d1c690510faf1b8fd45b128685908821
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d34df829eba68c977ef4c77e3f6830fbbc8d01bf 21-Jan-2015 Paul Rohde <codelogic@google.com> Create log and guard profilers.

Change-Id: I824e0f65be05e3681189802610656955ba14d5bf
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
6dabcd78a044233c1f308611e6209aa8371e3295 18-Feb-2015 Sascha Haeberling <haeberling@google.com> Merge "Make sure shutter button is inactive before the preview was started." into ub-camera-haleakala
b6c4a314d0a0a185e6d987298ef9b7f4db8a6a2f 11-Feb-2015 Senpo Hu <senpo@google.com> Enable exposure compensation in CaptureModule.

* Expose camera exposure compensation capabilities in OneCameraCharacteristics.
* Turn off exposure compensation on Nexus 6 (API level 21).

Bug: 18523154
Change-Id: I551f19945f5a64a09a76b3a0777664d16a9b2ba2
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
718c88615444f2b9e68f27dd51b46eb740d1aaff 13-Feb-2015 Sascha Haeberling <haeberling@google.com> Merge "Route all thumbnail updates through CaptureSession" into ub-camera-haleakala
75c8abdce334f195fb6a1423495fe9d20e5139bd 12-Feb-2015 Shashi Shekhar <shashishekhar@google.com> Fix setting surface texture.

Related to removal of FrameDistributor in http://ag/616209

BUG: 19368123
Change-Id: Ie49c5303db72d457493d7967ec2ee5e8638e1956
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
6dd5840e86bffecba8a7f52327b9c1085caeb7d2 10-Feb-2015 Sascha Haeberling <haeberling@google.com> Route all thumbnail updates through CaptureSession

Bug: 19326495
Bug: 19310525

This removes the thumbnail ready callback that was hooked directly into
the ImageBackend from the CaptureModule before since it's now
unnecessary.

Client of CaptureSession can no optionally specify whether the updated
thumbnail is to be used to update the capture indicator. Default is
'yes' so that Lens Blur, Photo Sphere and HDR+ don't need to change.

Change-Id: I94adb50f875ccee214492f03f00ed2a67d400da1
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
b4b27f2c7738cd5e3f31a281d66a33f4698810b3 16-Jan-2015 Shashi Shekhar <shashishekhar@google.com> Port burst to use FrameServer.

Port burst to frameserver
- simplifies burst interfaces
- removes burst methods from OneCamera.
- locks orientation when burst is running.
- Deletes most old code for burst integration.
- Removes frame distributor preview forwarding, instead frames are
streamed using a surface texture the Surface for which is passed
as a output target to the create capture session.
- Deletes FrameDistributor, now the low-res frames are streamed to a new
surface specifically setup for burst.

Change-Id: I50f2955bb48610a7e284f9609cd70b8e4e1f1059
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
4c7278d85c3398c97f941efb245df6e3ccde22c4 31-Jan-2015 Paul Rohde <codelogic@google.com> Fix several focus indicator edge cases.

Bug: 19213609
Bug: 18949556
Bug: 19214672
Bug: 19213602

Change-Id: I0d5c5ce8b4a62f98b44f6ae02ef1ac81d1d7f178
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
07a37cae38cb971c0bccb2d76db82467242c6456 11-Feb-2015 Andy Huibers <andyhuibers@google.com> Merge "Don't assume OneCamera implementation is ready to take a shot after startup." into ub-camera-haleakala
f68a39a0ad362ff0543e11e3f0ce11741a7de48c 05-Feb-2015 I-Jong Lin <ijonglin@google.com> Add JPEG Orientation into N4 CaptureRequests

Wired up the SimpleOneCameraFactory to dynamically decorate
the JPEG capture request with the proper orientation so that
the framework does the proper orientation.

Paired with ag/629241.

Bug: 19122922
Change-Id: If206b0d18979ddc4ed9ab6df7ce4d22ba01534a8
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
0079bc118851fd3d7d9cf73b46f7a3057cef1aec 10-Feb-2015 Andy Huibers <andyhuibers@google.com> Don't assume OneCamera implementation is ready to take a shot after startup.

Bug: 18114636
Change-Id: I1b4366dcef4a7f02a3240768508b39296db9b0b9
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
1966f422391c2478abffb2dad2006a9c7f7c2042 07-Feb-2015 Sascha Haeberling <haeberling@google.com> Make sure shutter button is inactive before the preview was started.

Bug: 19285609

Change-Id: I7ef4cd5a80bdc151d743ece99aa1528ffe09ed20
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
ce53fbf4adc50a7feb9e0937b0d5906bdbd6f200 05-Feb-2015 Senpo Hu <senpo@google.com> Merge "Use MainThread in CaptureModule and FocusController." into ub-camera-haleakala
0f404c49c140212e1a0ab15a8508d63ee07efc48 05-Feb-2015 Senpo Hu <senpo@google.com> Use MainThread in CaptureModule and FocusController.

Change-Id: I9de2aa619edc3cc1d686b297776cdf8ab2a65ce7
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
82a5c17b22c8b29ee1b601d362a3742de75fece7 05-Feb-2015 Sascha Haeberling <haeberling@google.com> Make sure to null SurfaceTexture when destroyed.

Bug: 19149830

This will prevent unnecessary camera open events. We assume that when a
SurfaceTexture is present at the time we resume, that it is usable and
we can initialize the camera. Not nulling it causes the camera to be
initialized on a potentially invalid Surface. Once the Surface becomes
available, we'd close and re-open the camera, which slows down our
resume times.

By nulling the SurfaceTexture when it gets destroyed we make sure to not
initialize the camera in resume an instead wait for the proper callback.

This might get rid of the HDR+ resume issue we've been seeing as well.

Change-Id: I71837aeda79c2f7516e64bdb10c12d39f728c0ca
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
63a8c9467824ef8aa2039b7e27831b0533d8e5d9 29-Jan-2015 Sascha Haeberling <haeberling@google.com> Only create temp session file when necessary.

Bug: 19148484

This also removes the IOException that could happen when a new session
is created and moves it to where a module actually needs the temporary
output file.

Change-Id: Ifc1f1ba2735557580c1302f8658a07bb13cc3c3e
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
9e287572634591b2c81a09ad6c50ed293a40715d 28-Jan-2015 I-Jong Lin <ijonglin@google.com> Merge "Fix for Ripple on Fast Thumbnail Indicator" into ub-camera-haleakala
04f6bcb60fde3cfd12097509a1fb0b57a4248660 27-Jan-2015 I-Jong Lin <ijonglin@google.com> Fix for Ripple on Fast Thumbnail Indicator

There was a cute optimization was to start the ripple animation, and
then fill in the bitmap in 30ms after the bitmap was computed.
However, when the system is overloaded, the bitmap is not necessarily
computed in 30ms, and an empty ripple can result. Put in a more
conservative fix, when the ripple only starts when the bitmap has
already been computed.

Bug: 19132963
Change-Id: Id39257a1d75342c78385bac8682462e8875d97f7
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
18f47b3f23123037a9d49cf220c90a6bfd372228 24-Jan-2015 Spike Sprague <spikuru@google.com> Make CaptureModule obey camera characteristics when reporting flash support

bug: 19018131
Change-Id: If891bc410a99452dfe0fadc6545e41c3853f5639
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
410e8a8ea9df5826a943af156cb62992bc5342cb 23-Jan-2015 Spike Sprague <spikuru@google.com> Merge "add isFlashSUpported() to OneCameraCharacteristics, make it work with API 1 and API 2" into ub-camera-haleakala
88559ffac9fe0d3b00614475b45417e74c7d0678 23-Jan-2015 Spike Sprague <spikuru@google.com> add isFlashSUpported() to OneCameraCharacteristics,
make it work with API 1 and API 2

bug: 19018131

Change-Id: I0d4157688e6219f9d6f5827c19938e90d3831bdf
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
abf1e994d236a65180eecfcb6997003ab12795df 21-Jan-2015 Sascha Haeberling <haeberling@google.com> CaptureSession can now be started with an empty placeholder.

Bug: 19014774
Bug: 18853119
Bug: 18979823

Being able to start with an empty placeholder and then updating that
placeholder allows us to add a visual entry to the filmstrip early on.

This avoid jarring effects where after taking many apid fire shots and
going to filmstrip, the entries are appearing one after the other.
This was caused by sessions only getting started when the thumbnail was
produced, which can take a while when multiple shots are in the
encoding pipeline.

Also contains changes that make CaptureSession testable.

Change-Id: I3d44704099be81524f8e165f3f09de6eebfc147b
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
5c1db74d807c64e7917d927b532cd109c697ce35 20-Jan-2015 Paul Rohde <codelogic@google.com> Make most app services lazy.

Change-Id: I476914b1ed399f8ad727ac33782229cdf39d378f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
4dc301a073dab22b9bc12e0b846530d3a80bf8f7 15-Jan-2015 I-Jong Lin <ijonglin@google.com> Image Backend Integration w/ Simple Camera

Wiring for cameras that only deliver compressed JPEG artifacts.
This CL was tested by enabling it on the Nexus 5.
Currently, the code in this CL is NOT exposed in any known
Nexus Camera model. The two unexposed bugs are as follows: an camera
initialization bug on Nexus 4, and a cross-device functional issue
with the SimpleCameraOneFactory object in that it doesn't request
a JPEG compression artifact from the HAL with zero orientation.

Bug: 18908116
Change-Id: If7080c4e8e52a329fb9a6fed52f7c31541758afb
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
8be316c7a8caf962cf3fcf5e49d332fb2718319f 20-Jan-2015 Paul Rohde <codelogic@google.com> Make it possible for singletons that rely on application context to be
initalized lazily.

* Add AndroidContext
* Add AndroidServices
* Make LogHelper ues thread safe lazy initialization
* Convert several unused fields into local variables in CameraApp.

Change-Id: I9c73e9b91efb49a01d848a8cca1e8e65f059b5d0
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
ad38daf0897acce9f6b4a5a69e6032faf0e70aff 16-Jan-2015 I-Jong Lin <ijonglin@google.com> Merge "Route ImageBackend JPEG Thumbnail To Wear" into ub-camera-haleakala
9eab2cdc9f38f06586f342ef5cf5418ebc317db8 13-Jan-2015 I-Jong Lin <ijonglin@google.com> Route ImageBackend JPEG Thumbnail To Wear

Sends the results of JPEG compression task to a wear device if
available. Need to do a little plumbing on the
OneCamera.PictureSaverCallback.

Bug: 18841900
Change-Id: Iec86a82d9b99e8ff9fecd208d27bfbc563af73f6
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
891a9e536a44f83ffd227e14823da4fd8700c48b 16-Jan-2015 Puneet Lall <puneetl@google.com> Merge "Apply flash setting changes to the AE mode" into ub-camera-haleakala
386c5b885b99f67f9c0a7380f4be153f28333089 09-Jan-2015 Puneet Lall <puneetl@google.com> Apply flash setting changes to the AE mode

Bug: 17216526

Change-Id: If6c03102f04ad2ba54e1a045a3ab7445aaa5b595
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d7aab1856f58f13905b7e2705108795f6c2567a4 16-Jan-2015 Andy Huibers <andyhuibers@google.com> Move stats to new package.

Change-Id: Idfab1a24c91ff4c96515f3520283c7a0512d0514
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
fb0496133a0b4b526dc70f6447bd4b97d95de95f 12-Jan-2015 Senpo Hu <senpo@google.com> Move FirstRunDialog to app layer.

The first run logic should live in CameraActivity. This refactoring
could clean up CaptureModule and PhotoModule.

* Introduce ResolutionSetting class.
* Introduce OneCameraManagerImpl for camera API 1.

Tested and verified this works on K / L devices.

Change-Id: I11a968a9346b520dee23fc4591a73bb483c43246
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
8a09cc29b273e35128a03794e82dd4f329d35cc9 08-Jan-2015 Puneet Lall <puneetl@google.com> Change ImageSaver interface to support processing bursts and thumbnails

Bug: 18908116

Change-Id: I14863011de5c3a575bfb54758824ccfaa04cf200
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
8b2a3ef10a7eea3e703397a3d94766029b0c5581 10-Jan-2015 Senpo Hu <senpo@google.com> Add HeadingSensor.

A small step to clean up PhotoModule and CaptureModule...

Bug: 17985028
Change-Id: Ic79dd5e2582479d8ed9705e8150c4438e39116c8
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
bc735745e301191389d95c3e46e4cc2f78b424d0 09-Jan-2015 Senpo Hu <senpo@google.com> Add OneCamera.PictureSaverCallback.

Remove the undesirable dependency between ImageBackend and CameraAppUI.

Create a new interface rather than using PictureCallback since
at some points we might consider retiring it.

Change-Id: I6e02564c9ca9990aa847902d86806f8bbd9cd652
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
5aa7eb2930b813c97f3754d93fe7fa978651887b 08-Jan-2015 Senpo Hu <senpo@google.com> Instantiate a ImageSaver.Builder in CaptureModule.

We will need different image savers for capture intent.
Since we plan to create a separate module for capture intent,
this change allows modules to be able to choose a different builder.

Bug: 18726217
Change-Id: I5871263123b06958d902cc8e3a4d911f14c83e66
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
8e8d3088e057df3a866e67b6d20ec950f9d4e4f6 23-Dec-2014 Senpo Hu <senpo@google.com> Break the dependency from CaptureModuleUI to CaptureModule.

This doesn't change any logic. Mainly just moving things around.

Change-Id: Ia130f3d0e5821095605219e50cc16008bc7ac143
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
3c82bd08314c7599a1c261ee2f2afee3be2ec9eb 30-Dec-2014 Puneet Lall <puneetl@google.com> Merge "Remove unused parameter to OneCamera.close" into ub-camera-haleakala
2830a7261d786b9d024081b3c47fc38303709470 30-Dec-2014 Sascha Haeberling <haeberling@google.com> 'Fix' ANR in holiday build happening frequently from lockscreen.

Bug: 18854352

Note: This is more of a hack around the already pretty hacky camera
open-close lock. Proper fix is to refactor the code to not require this
lock anymore. But to get the holiday droidfood going further, this is
a quick for now.

Change-Id: Ib69821d4e6cb3b82f438aeee28c807cc7c33dd25
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
11c72fc1a0645db28c04edc89429c8b82777520a 29-Dec-2014 Sascha Häberling <haeberling@google.com> Revert "'Fix' ANR in holiday build happening frequently from lockscreen."

This doesn't work well and introduces an issue with HDR+.

This reverts commit 7b81135c88f01cb2ac7a958dcb66c0d2d2bde7c4.

Change-Id: Ib7e412221c216d0cf6116817599d28a4d4afa3ef
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
c7251753978f80dc40131e7676f69f7e86208fd1 29-Dec-2014 Puneet Lall <puneetl@google.com> Remove unused parameter to OneCamera.close

Change-Id: Iea5dcb41eb5c387a7f19db280ea9c681e2aabc7e
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
7b81135c88f01cb2ac7a958dcb66c0d2d2bde7c4 29-Dec-2014 Sascha Haeberling <haeberling@google.com> 'Fix' ANR in holiday build happening frequently from lockscreen.

Bug: 18854352

Note: This is more of a hack around the already pretty hacky camera
open-close lock. Proper fix is to refactor the code to not require this
lock anymore. But to get the holiday droidfood going further, this is
a quick for now.

Change-Id: Iad974e91aae6ede3897ce3bb7d69f8764d9fd08a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
e083a34da38a89f580c562e696da9180c373a009 23-Dec-2014 Sascha Haeberling <haeberling@google.com> Fix bug in FirstRunDialog detection and re-enable CaptureModule on N9.

Bug: 18840830

Change-Id: I22abae32c5e55f779b5c645324f1f3a8421e4bde
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
b9aac76c3d6de7ec6b17c3f4d9d899e1d52b3418 23-Dec-2014 Puneet Lall <puneetl@google.com> Added shutter sound to CaptureModule for non-HDR cameras

Change-Id: I11beb99633e116b8e0328f0021e09100e6d031e6
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
3830d419691ef865f01b362fee9618bac2aa8888 20-Dec-2014 Sascha Haeberling <haeberling@google.com> Store ZSL images in correct orientation and show progress in filmstrip.

Added an ImageRotationCalculator which calcuates the image rotation
based on camera characteristics and the device orientation at the time
of the shot.

Also moves the image backend code into its own sub-package.

Change-Id: I4b6b83e3e3cebece83215c19d0aff826ff853352
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
c51a121f0b4139e73ee7df23581ef551ff44e276 20-Dec-2014 Sascha Haeberling <haeberling@google.com> Changes to support complete disabling of Burst.

Have the stub burst controller retain a reference to the preview surface
texture.

Change-Id: Iaf86f8cd30ac862b1f29f9edeca65fd20e825b52
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
e0fe29b2477c8fd2c44be2547bcc5183ed2f7235 20-Dec-2014 Sascha Häberling <haeberling@google.com> Merge "Revert "Changes to support complete disabling of Burst."" into ub-camera-haleakala
0de97e1c2b9fadb27c3c08f5dde2d9f353714bec 20-Dec-2014 Sascha Häberling <haeberling@google.com> Revert "Changes to support complete disabling of Burst."

This reverts commit 8565f7695f41f0150ba096a75591ad7b2fe5de81.

This crashes pre-MR1 devices. Will fix and re-submit.

Change-Id: Ie645a63270e73b451d0a484928c98cf5104e320a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
1fcb7a9b2b8b4fcac5547d63de08ba1703fd7897 20-Dec-2014 Sascha Haeberling <haeberling@google.com> Merge "Changes to support complete disabling of Burst." into ub-camera-haleakala
8565f7695f41f0150ba096a75591ad7b2fe5de81 20-Dec-2014 Sascha Haeberling <haeberling@google.com> Changes to support complete disabling of Burst.

Have the stub burst controller retain a reference to the preview surface
texture.

Change-Id: I9a966a87aac2c21cd6050f511ea4e648b6267744
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
2fa1cc1b0d9a4f614dd84b34f41d9212d7fd7e41 19-Dec-2014 Alan Newberger <alann@google.com> Merge "Restore activity lifecycle when OneCameraManager fails to initialize" into ub-camera-haleakala
4540b9fd5af80bd9508cb56f526560a38780b186 19-Dec-2014 Alan Newberger <alann@google.com> Restore activity lifecycle when OneCameraManager fails to initialize

The return in onCreateTasks when OneCameraManager catches an exception, cause
camera crashes instead of showing the failure dialog as intended. The exception
is an NPE in PanoramaViewHelper but is due to assumptions of things init'ed
in onCreate not holding due to the return when onStart is executed. While we
could proof out every object to assume lifecycle events exit, I prefer to
maintain lifecycle and remove the return, and make anything that relies on
OneCameraManager know that it could be null. This also moves the handling of the
error dialog down to CaptureModule, in the unlikely case an API1 module would
still work this enables it while preserving the same intended behavior for
CaptureModule.

Bug: 18048591
Change-Id: Ib81f8b42eaa26daae2d3354bae1ef5127a9cbcf1
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
0f989bab3bda93546d3eafd0a065e1162f83d8f0 19-Dec-2014 Sascha Haeberling <haeberling@google.com> Refactor the interface of CaptureModule to Burst to allow disabling.

Change-Id: I87164c0cd8961ad929a63ff34248a12690f7d4d1
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
2272f8a6bfc8adca8ada7a215bef038d45256085 16-Dec-2014 Senpo Hu <senpo@google.com> CaptureModule first run dialog.

* Introduce FirstRunDialog.
* Add OneCameraCharacteristics so we can query camera properties without
opening the camera.
* Refactor AspectRatioDialogLayout and LocationDialogLayout to clean up.
* Refactor to move away from portability/Size class in Camera2.

Bug: 18623223
Change-Id: I05f4eefe3ee2feeaa47b6296f8926f6be8e83051
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
987ee64612e2510004fdf08536746c87234d01c1 05-Dec-2014 Paul Rohde <codelogic@google.com> Drop new focus indicator into Camera2.

* Create a new custom focus view that interacts with physical lens diopter changes.
* Replace all occurances of the old focus indicator with the new one.

Change-Id: Ia02646ce4d1eb059ecb8a1dfccc15dfc9c167e1b
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
24069e7a9cc9b4f908f18a71301285ccf5e164f6 09-Dec-2014 Sascha Haeberling <haeberling@google.com> Adding stack support and hooking SmartBurst up to the new API.

Change-Id: Icc023aed65e1e31f0b808de648067b3628fff838
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
427a915be4bcc84fa1c32d9e9e1b7473c522f732 20-Nov-2014 Senpo Hu <senpo@google.com> New capture indicator design for Haleakala.

* Introduce RoundedThumbnailView and retire PeekView.
* Rename BottomBarModeOptionsWrapper to StickyBottomCaptureLayout.
* Verified on K and L devices.

Thumbnail cropping:
* 100% width and vertically centered for portrait.
* 100% height and horizontally centered for landscape.

General behavior spec:
* Hide the capture indicatorby fading out using fast_out_linear_in (150ms):
1) User open filmstrip.
2) User switch module.
3) User switch front/back camera.
4) User close app.

Behavior spec for non-photo modules:
* Photosphere is stripped of UI so there is no need to show capture
indicator. When a photo sphere is taken (and user is in another mode),
the preview frame used in filmstrip is used in the capture indicator.
* Video: show in viewfinder prior or after capture. Hide during capture.
When a video is taken, the preview frame used in filmstrip is used in
the capture indicator.
* Panorama: Show in viewfinder prior or after capture. Hide during
capture. When a panorama is taken, the preview frame used in filmstrip
is used in the capture indicator.
* Lens blue: Show in viewfinder prior or after capture. Hide during
capture. When a lens blur is taken, the preview frame used in filmstrip
is used in the capture indicator.

Visual spec:
A 12dp spacing between mode option overlay and thumbnail.
1. A circular mask that excludes the corners of the preview image.
2. A solid white layer that sits on top of the preview and is also masked
by (1).
3. The preview image.
4. A 'ripple' which is just a white circular stroke.

Animation spec:
(1) only the scale animates, from 50%(24dp) to 114%(54dp) in 200ms then
falls back to 100%(48dp) in 200ms. Both steps use the same easing:
fast_out_slow_in.
(2) opacity, from 50% to 0% over 150ms, easing is exponential.
(3) doesn't animate.
(4) starts animating after 100ms, when (1) is at its peak radius and all
animations take 200ms, using linear_out_slow in. Opacity goes from 40%
to 0%, radius goes from 40dp to 70dp, stroke width goes from 5dp to 1dp.

Bug: 18317565
Change-Id: Ib8d4f065b98fc3b9b0b627633232ce8cee96eb61
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
dd7c15c4b89a7410545f9efe62e2dea18cd1aaa8 26-Nov-2014 Sascha Haeberling <haeberling@google.com> Make sure we only show the toast when burst was actually stopped.

Change-Id: I057bd7217d09f4754584f77c3911749d2ac0fa5f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
06c2b7f396e3d575b43e9e938fee04ff3ff87ba5 26-Nov-2014 Sascha Haeberling <haeberling@google.com> Add a temporary toast message decorator so users know when a burst is on.

Change-Id: If6164f636f60de6f7303a5d54f432648a25e012a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
9ceed0d5535e8453f8b5f77959134760dac01ec5 25-Nov-2014 Puneet Lall <puneetl@google.com> Refactor OneCamera

* Removed CaptureParameter "sanityCheck"
* Removed unused OneCamera interface methods

Change-Id: I2464cedf4ad9122e6ca72055e1cc8c0ba633a164
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
82d592f64966766ac4e4181e08b0d2989d4ed9c3 12-Nov-2014 Shashi Shekhar <shashishekhar@google.com> Hook burst controller to the shutter button long press.

Hooks up the shutter button long press to start the burst.
Introduces a BurstManager to interact with burst.
Provides an implementation of BurstManager that listens to burst and
saves results when burst is complete.

The burst eviction handler is now installed on the ring buffer
on shutter button press and uninstalled on shutter button release.
The ring buffer is cleared before starting and after completion of the
burst.

Also provides a stub implementation of the BurstController that has a
static method which controls if burst is enabled or not.

Bug: 18332704

Change-Id: I1098937bf348af7acbf55da1a5eeb423c30fb901
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
0bdc4b54a18c18d7094b2e4cea1e238005c5c4a2 18-Nov-2014 Senpo Hu <senpo@google.com> Unify orientation calculation logic.

Camera API takes clockwise degrees for JPEG rotation and
OrientationEventListener reports clockwise device orientation.
The easiest formula of calculating output image rotation degree is:
"camera sensor orientation" + "device orientation"

Since front cameras face in opposite direction. The result needs to be mirrored
for front camera.

Detailed changes:
* Refactor OrientationManager to remove unnecessary complexity.
* Add OrientationManager.DeviceOrientation enum and
OrientationManager.getDeviceOrientation
* Remove CameraUtil.roundOrientation.
* Fix the weird calculation which is hard to understand in
CameraUtil.getJpegRotation and add CameraUtil.getImageRotation
* Clean up image rotation logic in all modules:
* Always look up the current device orientation via OrientationManager.getDeviceOrientation
* Fix the doc for copyImagePlaneToBitmap() which actually rotates image
counterclockwise.
* Clean up CameraActivity:
* Remove CameraActivity.onOrientationChanged and
ModuleController.onOrientationChanged. Any individual module which
wants to listen orientation change should register itself to
OrientationManager. Now only VideoModule needs to do that.

Bug: 17443789
Change-Id: I6d54cac5bde950acae0c3226448c27a816266df0
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
0180fd43f41d5ec4771579d5249f295ee8c683a5 18-Nov-2014 Shashi Shekhar <shashishekhar@google.com> Wrap FrameDistributor in a thread safe accessor.

Wrap FrameDistributo in a thread safe accessor and make the instance to
accessor a final field in CaptureModule. This should help in avoiding
null checks and NPEs.

BUG: 18414956

Change-Id: I8d25c5a2923a7382f98c523e88f7547f16217a6f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
57c233a21fbe50611c1ea8162e9a2ad0b84493b3 07-Nov-2014 Shashi Shekhar <shashishekhar@google.com> Initial version of new module to distribute camera frames to consumers.

Add FrameDistributor class, that allows passing frames from a
SurfaceTexture to multiple consumers in an efficient manner.
In the CaptureModule, this distributor is used to handle frames
coming from the Camera. It then hooks up a single FrameConsumer
to render frames into a SurfaceTexture.
Note, that this particular FrameConsumer is atypical in the sense
that it reuses the FrameDistributors GL context for efficiency.
Other consumers will typically use their own GL contexts and threads
for processing.

Bug: 18142762

Change-Id: Iee258d108004c23b7d9777204b58c013a9999215
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
90b300e86f90a51f1c5227333ed21aa649dc4f06 28-Oct-2014 Sascha Haeberling <haeberling@google.com> am c7beaf11: Fix wear interaction of CaptureModule

* commit 'c7beaf110667df54d7ef97cc73e0fe28e31149de':
Fix wear interaction of CaptureModule
c7beaf110667df54d7ef97cc73e0fe28e31149de 28-Oct-2014 Sascha Haeberling <haeberling@google.com> Fix wear interaction of CaptureModule

Bug: 18121865

- Make sure we announce that the module is exiting.
- Send postview image to wear device.
- Make sure we can take a picture when timer is on.

Change-Id: I1cbc2e9a1725fdd6d8724ce93f547c87eab8b4aa
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
04142851d4e31456fc3cf5e486025ad255ec9287 23-Oct-2014 Sascha Haeberling <haeberling@google.com> am ea77c6b2: Don\'t release resources until camera is closed.

* commit 'ea77c6b2f9a602712c19ed0f441c6439b2f168de':
Don't release resources until camera is closed.
ea77c6b2f9a602712c19ed0f441c6439b2f168de 17-Oct-2014 Sascha Haeberling <haeberling@google.com> Don't release resources until camera is closed.

Bug: 17788328

Change-Id: Id7112b698c8d49f9816e5e1bf6a133272fa2f65a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
edc92b0a0e2554574210adaff0f20bb1a0b6a9ce 17-Oct-2014 Puneet Lall <puneetl@google.com> Merge "Fix orientation for front-facing cameras using CaptureModule" into ub-camera-haleakala
2b06c90bbd9a72414aa55a354a82958a8b7cb26b 17-Oct-2014 Puneet Lall <puneetl@google.com> Fix orientation for front-facing cameras using CaptureModule

Change-Id: Ibf4a9c7601fbc3e42ec03d18c54a23b604d42249
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
81471c40e896fbe5cc4d2619cae83364f1a5b87e 17-Oct-2014 Puneet Lall <puneetl@google.com> Enable shutter button when preview is started

Change-Id: I93d378976c1c34dc05ce40cfb93310572f2ada98
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
7dabda684367122fa2dc2097e198ac6241279bcd 16-Oct-2014 Alan Newberger <alann@google.com> Show capturing UI before review UI in intent countdown timer

Going prematurely to the review UI means you can hit the checkbox
before we have JPEG data. With this change, after countdown you
see a grayed out capture button like normal capture animation,
then the checkbox review UI when the picture is ready.

Bug: 18002016
Change-Id: Ieddd71636f962c127aa470ec0f150987d3d287ab
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
0e0c55a11c5bc47b14023054f2c5597ea5197fa8 14-Oct-2014 Puneet Lall <puneetl@google.com> Don't re-open the camera if already open

Bug: 17870967
Change-Id: Ibafc8c563b6188c4c743a60a3b42b93e107523bc
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d25eac4c69ccda0a9e91f6af8032b0624554e7ac 09-Oct-2014 Spike Sprague <spikuru@google.com> Native 16x9 viewfinder stream for Gcam to reduce switching jank and eliminate black bar overlay hack.

companion CL: ag/562183

bug: 17669070
Change-Id: I4d5402df3848423c236108716f7065a87ce95f6d
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
64cb0bf0e5c3efb62b34cd2871723a56f3cc7787 04-Oct-2014 Puneet Lall <puneetl@google.com> Merge "Use singleTask to improve unsecure lockscreen startup" into ub-camera-glacier
4de9b72f79fe256766f25497bff44cb5533b7508 26-Sep-2014 Puneet Lall <puneetl@google.com> Use singleTask to improve unsecure lockscreen startup

This enables warm-starts from the lockscreen by reusing the same
activity if possible.

Bug: 16035858
Change-Id: I4b1ce0c290e209a5098e3f3e71509e0ca86e1845
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
7a02c1146cd465aa89e4f7249d60bf52ac596dc5 02-Oct-2014 Andy Huibers <andyhuibers@google.com> Add zoom value and timer duration to capture parameters, for logging.

Bug: 17204955
Change-Id: I13e087a8e87c9722b83b83d90af491966ff30c9e
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
022ce61e1c4f338a79585e8656ab57990ecd32c1 26-Sep-2014 Puneet Lall <puneetl@google.com> Synchronize CaptureModule camera open/close operations

This fixes a race condition in which CaptureModule gets a pause()
immediately after it is asked to open the camera. pause() MUST
wait/block to close the camera to ensure that we can later open it (a
fast open()->pause() sequence is reproducible via the lockscreen under
certain cases when we get a rapid onResume()->onPause()->onResume),
so this adds the necessary threading logic to wait, if necessary,
for the camera to finish opening so that it can be closed.

Bug: 17642065
Change-Id: Ic88bd32fc5acc2b333de367019085a8cd539c5a5
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
eeeed4fa00ed842050bc7e0edd3b37c262802a5b 27-Aug-2014 Spike Sprague <spikuru@google.com> new sounds for timer ticker and pano / photosphere intermediate captures

companions CL: ag/534823

bug: 17281234

Change-Id: I9d98d8e869dcefdbd0f7e0b53dea6b8e024a8e3b
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
e6ebf3d73bb3f337413bdde437fbb8fde6cee436 11-Sep-2014 Andy Huibers <andyhuibers@google.com> If we are using CaptureModule for Gcam only, turn off flash.

Bug: 17460394

Change-Id: I4743e9c31f516d12537b2ceedc9e1fe35fbd8381
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
5675b8af3fddca8d73d0ce0c8aa2f2a38592f556 10-Sep-2014 Senpo Hu <senpo@google.com> Fix the upside-down orienation bug in CaptureModule.

Bug: 17369697
Change-Id: I5beb0ec45f2dbf372dda88ffd8a92b1632b3ab90
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
5e3bf4cc84a186c5e89dfa692f3af95007751877 10-Sep-2014 Andy Huibers <andyhuibers@google.com> Remove toast.
This reverts commit 779414e8bfe23d66de310570ff2314654e45ec9f.

Change-Id: Idf04e0bbb69822792327fd17634a4f95f7eb2092
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
ca3c564536f154b83e380e37382bc7b9f6049302 07-Sep-2014 Andy Huibers <andyhuibers@google.com> In debug_ui mode, show CAF result state, length of AF scan, fps, for camera2 API.

Bug: 17397777
Bug: 17028594
Bug: 17391241
Change-Id: Id5a7fe748f988755cb2d786a2103e375eb97b08f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
13d07d0ecb3bc808fb6f5b65508b1948ab3149d8 06-Sep-2014 Sascha Häberling <haeberling@google.com> DO NOT MERGE Pipe context through to camera

Bug: 17203825

Not merging since a CL depending on this one cannot be merged cleanly into lmp-dev right now: http://ag/541468

Will also apply this one to haleakala.

Change-Id: I7a386b92cf6168185bd28bd02a78d87c5826639a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
bcc384ea15fc9d25ee3efd934c2ac7ec7a059a52 06-Sep-2014 Sascha Häberling <haeberling@google.com> Revert "Pipe context through to camera"

Second half of the CL didn't make it through to lmp-dev due to Camera API change craziness. Reverting this one to unbreak the build and will submit again to G and H Camera branches only.

This reverts commit f6bf65e9442f2fb7042e37ec21bf1c6c4fbd9bb6.

Change-Id: I5e11c5c1b29586110ed504fbb1be2dfe76accab0
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
f6bf65e9442f2fb7042e37ec21bf1c6c4fbd9bb6 06-Sep-2014 Sascha Haeberling <haeberling@google.com> Pipe context through to camera

Bug: 17203825

Also don't just activate the shutter after a picture has been taken
since some cameras might not be ready for another picture yet.
This decision should be up to the camera.

Change-Id: I5991da1d8fc942b48fe085b18ec93b07bfafe889
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
dc0369f37b07adb4355113540af3c1f7c82a404e 05-Sep-2014 Sascha Haeberling <haeberling@google.com> Merge "Load Gcam OneCamera in CaptureModule when it's also doing normal shots." into ub-camera-glacier
961805e8fafa3ef21d1984eeb1429b40df6ffcde 04-Sep-2014 Sascha Haeberling <haeberling@google.com> Load Gcam OneCamera in CaptureModule when it's also doing normal shots.

Bug: 16654225

Change-Id: I939e4793125cc996e26bbd5a13579f2f4ebab663
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
17d9084e38e64f06a9d411d64fe3c2739d299cda 29-Aug-2014 Andy Huibers <andyhuibers@google.com> Add short flash animation and shutter sound to ZSL camera.

Bug: 17217567
Change-Id: I9a75fdd15e03f47029ef4a631287899718794c5c
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
4d7f3be87a92c7efac7cf92bbd4ce7dd61f46e0d 03-Sep-2014 Andy Huibers <andyhuibers@google.com> CaptureModule countdown timer fixes: ability to cancel, and remove premature SoundPlayer release.

Bug: 17204673
Change-Id: I438c3d4e7a9aad3f8fc709d255a249399bb05b57
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
a31162ce3ab4f9c68e46658b16b2c49f4dc0d145 02-Sep-2014 Andy Huibers <andyhuibers@google.com> Add countdown timer to CaptureModule.

Bug: 16654225
Bug: 17204673

Change-Id: I914094b204743ddbe786ef1a7621564e864ed834
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
b868274c9dc8d9c772ec89fb5955215cc7911087 28-Aug-2014 Andy Huibers <andyhuibers@google.com> Simplify AF in CaptureModule and OneCameraImpl and share code in AutoFocusHelper.

Bug: 17202848
Change-Id: I08e92c9701d5b92938612137c87ca37c4305411f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
3724805a043ac149b7bc103bb94787133c7e06a5 29-Aug-2014 Puneet Lall <puneetl@google.com> Merge "Zsl flash, auto focus, and other minor fixes" into ub-camera-glacier
580f451fc85cc752e71eb730006b90d09aaafb55 28-Aug-2014 Puneet Lall <puneetl@google.com> Zsl flash, auto focus, and other minor fixes

Bug: 17216526
Bug: 17221258
Change-Id: I5129c57674874d3a29789e0c9029eadeaa138788
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
2d4be2576b265a4abfbabbda20862fcea19c1395 28-Aug-2014 Sascha Haeberling <haeberling@google.com> Add simple sound player to be used in Camera implementations.

Bug: 17205355

Change-Id: I04c4bf1a692c7a4555eafea794737e41a8fc342c
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
307c334002d4972b4a4a1d2b1303c1bdf9ed4e2d 27-Aug-2014 Sascha Haeberling <haeberling@google.com> Make sure CaptureModule (and therefore Gcam) always resumes right.

Bug: 17258531

Change-Id: I8a72fcd8f34eb95676ca939c2aff87fcac105e75
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
95817308fddad554c73cbe4539cb868dd4722ff9 27-Aug-2014 Sascha Haeberling <haeberling@google.com> Enable location and heading to be stored in picture EXIF.

Bug: 17202845

Change-Id: Ic789c9a2d6078b35a09308d1b631166529f3f1bd
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
779414e8bfe23d66de310570ff2314654e45ec9f 27-Aug-2014 Sascha Haeberling <haeberling@google.com> Show a message to indicate that Gcam is not yet ready for quality feedback on Shamu.

Bug: 17204023

Change-Id: I03ac9df0e4df8f09f5a4527616add6fb12ff0fd8
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
d225ea6074a58021013c8c063abb51eb80b1feb7 27-Aug-2014 Sascha Haeberling <haeberling@google.com> Add volume key capture suppor to CaptureModule

Bug: 17289383

Change-Id: If548c4ebe5f702aca6fc9a983ac4775812ad551f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
9d3ec0396b71d7b9068f83b2e820eee988df8215 27-Aug-2014 Andy Huibers <andyhuibers@google.com> Add timeout to touch to focus.

Bug: 17289205
Change-Id: Ide39b4b9c86691de36149fdd15d1db41f9fed342
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
afb4c581786bb539e8753488e29a3d13fa8b43fd 26-Aug-2014 Sascha Haeberling <haeberling@google.com> Merge "Enable mode options when capture is done." into ub-camera-glacier
cceaf1d5c7f9c26a9b38367412af066cd19c7e33 26-Aug-2014 Sascha Haeberling <haeberling@google.com> Enable mode options when capture is done.

Bug: 17260403

Change-Id: I9e5c6c8516d5cdbb3fd303715af2a109b171c5f7
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
62b4c3c0da3abd397b3790820359927784c50bc2 26-Aug-2014 Andy Huibers <andyhuibers@google.com> Enable Face rectangles for debugging.

Bug: 17028594

Change-Id: I57521aed991f93da1f5abdace6a72be0f1057dbe
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
4c1bffecc94cedf56d188eca40bd65a854746413 21-Aug-2014 Sascha Haeberling <haeberling@google.com> Enable switching within CaptureModule to HDR+ and back.

Bug: 16945820

Change-Id: If92371129c5bf2a78b7623d745a8b86d218d32e1
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
cbe861edcd0d094ee79d3eeaac48bb928017b600 21-Aug-2014 Sascha Haeberling <haeberling@google.com> Pick the preview size based on the selected picture size.

Bug: 16654225

Also make this a function of the Camera device, since othe camera might
have to override the picture size.

Change-Id: Ieb6d1ffac0c3d7893416f9eae3232afde6d27240
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
90f158340db39bca9ee5da4cf1d246adbcb03453 21-Aug-2014 Sascha Haeberling <haeberling@google.com> Enable progress reporting for modules like HDR+.

Bug: 16945820

Change-Id: If6aba8ff5d2b973f4ea8112110695a84f897d881
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
26b3334755ffccc039249005435d5cc598d0689e 20-Aug-2014 Andy Huibers <andyhuibers@google.com> Add zoom to CaptureModule and OneCamera.

Change-Id: Ia679d79a42e20e9033409939d0ca137ffcfbc75a
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
fa7b92c1ee99bc6734c06bb50445cffae94e8197 15-Aug-2014 Sascha Haeberling <haeberling@google.com> Merge "Add ability to add a ready-state changed listener to the camera." into ub-camera-glacier
e3ad4352a23ddb21350d356e0947905d1e635911 15-Aug-2014 Sascha Haeberling <haeberling@google.com> Add ability to add a ready-state changed listener to the camera.

Bug: 16945820
Bug: 16948752

This enables us to hook up memory intense cameras and make sure we don't
activate the shutter button if the camera is not ready.

Change-Id: I70a31c76e063d775c844404ee9e20e583fa233e3
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
064f851a063c80be4e6cc3f1716ff19b605e4865 15-Aug-2014 Andy Huibers <andyhuibers@google.com> Hold touch to focus target in 3A UI debug mode.

Bug: 17028594
Change-Id: I6d60f2a891cc8ab33c2165438295950bf46095b3
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
99a37d89f92cb0ad60cd57169c4845560ad0ffac 15-Aug-2014 Andy Huibers <andyhuibers@google.com> Consolidate properties for debugging.

Change-Id: I052492375bf176622b38382579b2189d22a05349
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
59c784bf588b9e0994e9769001f624200e9b1027 05-Aug-2014 Sascha Haeberling <haeberling@google.com> [OC] Gcam OneCamera implementation.

Bug: 16948752

Change-Id: I0160de117c4ff7024e0d546f594b5777847d1833
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
30ffce08f511fbed4cf18daa743778b541583351 01-Aug-2014 Andy Huibers <andyhuibers@google.com> [OC] Add autofocus (tap-to-focus, UI and pre-shot focus) to OneCamera.

Change-Id: Ic88359ad27b8e9ee0e74c8d1bd6ecb71fe3c24f0
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
7f112487e7c19983fe36164494486a0a289a4831 08-Aug-2014 Sol Boucher <solb@google.com> Merge "Move display orientation calculations out of app code" into ub-camera-glacier
0024b57e54c674d86ff15011867a0f44029e0c48 06-Aug-2014 Sascha Haeberling <haeberling@google.com> Merge "[OC] Enable flash support." into ub-camera-glacier
e3dfd5a433e39d76578b379fe1539864cf924cee 06-Aug-2014 Sascha Haeberling <haeberling@google.com> [OC] Migrate away from android.util.Size sinc we cannot use it in K.

Bug: 16654225

Change-Id: I2c0ea6b387b8ad38d6e49c84dca8bf2bde34e249
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
0cf4a02c13a7710dc9b26ac39bea15a95ac48baf 31-Jul-2014 Sascha Haeberling <haeberling@google.com> [OC] Enable flash support.

Bug: 16654225

Also show an error and exit the app if camera could not be opened.

Change-Id: Iddccaff35b081ba98efe2aaae51d9ee10bb7726f
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
57bcd92f39d85427102f30be2c749c4a7bd4be96 01-Aug-2014 Sascha Haeberling <haeberling@google.com> [OC] Refactoring the session API before intgrating GCam into OneCamera

Bug: 16654225

Change-Id: I3fe6f46847ed6424310a81722c93c63be8b807a3
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
73ec9851f8e92968ac50193916526afd8f1343fc 25-Jul-2014 Sol Boucher <solb@google.com> Move display orientation calculations out of app code

Because they're needed by every app, these are being relocated into the
portability layer. As such, the CameraUtil#getDisplayOrientation() and
CameraUtil#getJpegRotation() methods are being replaced by the API-agnostic
CameraDeviceInfo.Characteristics#getPreviewOrientation() and
CameraDeviceInfo.Characteristics#getJpegOrientation() calls, respectively.

Change-Id: I5048e6f1a5ff655e4ea260b109e7c104bbe790b0
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java
08b3c94a7d7aff30b5da8e99649346e37b67a5c5 31-Jul-2014 Sascha Haeberling <haeberling@google.com> [OC] Adds the new CaptureModule and UI.

Bug: 16654225

This is essentially a version of the GCamModule without GCam, plus a few
things we need from PhotoModule.

Some code is commented out to be added back in later as a reminder.

CLs to hook the module up will be following up.

Change-Id: I70108529f81a8b0b744dc846287ea2ac121c85da
/packages/apps/Camera2/src/com/android/camera/CaptureModule.java