History log of /frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
733ca8dfa76ac34d1f9caff8798d01a4a8f44002 14-Oct-2014 Senpo Hu <senpo@google.com> Return more detailed debugging info for logging purposes.

Change-Id: If71afbf8029e9e4d5560eb6a655ece990cf19a19
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
318eeb225f4567a8c2a6fe14baa06e8923ebe622 11-Oct-2014 Senpo Hu <senpo@google.com> Cleanup: handle API 1 error callback in CameraExceptionHandler.

Portability API used to expose setErrorCallback call which is API 1
only. The new CameraExceptionHandler should be the centralized place
to handle different camera errors.

Bug: 17931297
Change-Id: I0212f96a98e0caca64aca0f947b991b895d8d56b
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
2d01b8e2b5ad30ce3c442799cad4c3d26607fc6f 06-Oct-2014 Senpo Hu <senpo@google.com> Overhaul error handling in AndroidCameraAgentImpl.

DispatchThread could throw RTE when timeout (2500 ms). This CL extends
it to 3500 ms and also re-route the exception to the proper exception
callback instead of surfacing that up to the app. Since a lot of try-catch
block is added, CameraExceptionHandler class is added to keep
CameraAgent.java clean.

The portability layer should ensure the proper use of Camera API 1. With
this assumption, any run time exception thrown by the framework should be
considered fatal. Once it happened, CameraAgent/CameraProxy should be
invalidated. Any subsequent camera commands should be gated as no-ops to
prevent HAL hanging symptom. Users should be guided to exit the app and
recover from the camera error.

Design Doc:
https://docs.google.com/a/google.com/document/d/1t0sEPwGgc387XcoCVC7kT9Y_RSZPxcayla03M4bdn0U/edit

Corresponding CL for the app layer: ag/562383

Bug: 16189216
Change-Id: I33e69aeff0c8e4211e82e0e83133915700c4eb8f
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
06b23bb5cbddfed587a6f0d75636734862b49a1e 10-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Update for camera2 API changes" into lmp-dev
9f57c438ea0c7f02d0e86ade6a5e36c8993dd9fc 09-Sep-2014 Rachad Alao <rachad@google.com> Merge "portability: Fix a bug where long AF callbacks caused ISE timeouts" into lmp-dev
25ee73acd2dbd6f60deef5306994fbf3a7997936 09-Sep-2014 Senpo Hu <senpo@google.com> Let CameraProxy support setJpegOrientation.

When device is locked in portrait, JPEG orientation and preview
orientation might be different.

Bug: 17360176
Change-Id: I16ee937c4d930e5f02a3e703dffd3bdd63e0e367
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
6a9babad6eb8ac3e79a5e036d878ed7408e79f26 09-Sep-2014 Igor Murashkin <iam@google.com> portability: Fix a bug where long AF callbacks caused ISE timeouts

Bug: 17403384
Change-Id: I2f452f79ffb4c0c3327ea5bf7db3f9d26e98ff51
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
171362f843c1e7623f29db1781176f85b1f74815 09-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera2: Update for camera2 API changes

Add frame number to CaptureCallback#onCaptureStarted

Bug: 17421092
Change-Id: I8ffc0c7c22a5f3a25e923aaf1ecf166c7a264508
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
bb013aa3e197e881756be5ad13e6ad30bfb4aeff 04-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera2: Renames for API consistency

- Listener -> Callback
- add/remove callbacks -> register/unregister

Bug: 17389922
Change-Id: I6e162ae18447b5a4fcabc17d17b1341f341fc47d
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
58774cf3543e06c4b51a54bccd603a2cbcd7a816 30-Aug-2014 Igor Murashkin <iam@google.com> Merge "camera2-portability: Touch-to-focus accounting for effective crop" into lmp-dev
2569329d6cff25bfe9941df539df14a0aeb4c4f4 29-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Touch-to-focus accounting for effective crop

This fixes the calculation of API 2 focus and metering rectangles to account for
the effective crop region (after the framework has performed automatic cropping
to match the requested output aspect ratio). It also guards against and prints
warnings when changing the resolution after having configured the session and
surfaces; before, this was merely a silent no-op.

Bug: 17187095
Change-Id: I3243bea24d6936d1bba5d556b3846d172ad0defe
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
415cf3ee18640ad0799e5c9a738afd1d19c14883 28-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Allow disabling the shutter sound on API 2

Because the camera2 API doesn't play shutter sounds at all, the portability
layer does it directly. Consequently, it is trivial to skip that step.

Bug: 17303595
Change-Id: I303696906902c2d8af58baedf27f6e20f34772f1
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
47a01cf05c1e22e76bdf3182461dcfeb71b960bb 27-Aug-2014 Sol Boucher <solb@google.com> Merge "camera2-portability: Fix and document obscure state machine bug" into lmp-dev
7d71703202c2fba36653293eba2772745db46c00 27-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Fix camera2 takePicture AE regression

This fixes a regression introduced by 984a086412a94ebea1bd9af8cd8bbf4afab38034
that resulted in captures sometimes hanging until the AE state changed. It
includes explanatory comments to guard against this sort of error in the future.

Bug: 17302778
Change-Id: I668f5a5470a0ae7712f62c7574d18360d47e410b
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
772fcce3e51a9c7d33df6a9c278a908ac6902880 27-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Fix and document obscure state machine bug

The numeric state codes defined by the camera2 implementation were incompatible
with the StateHolder class's wait interface; thus, blocking operations didn't
always behave as expected.

Bug: 17300466
Change-Id: I54f462d5de876c9dcf99b2a4c7ae79879cc0eca2
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
7c8d6957b96c75ce11f7373f4ab2451ee4666360 27-Aug-2014 Sol Boucher <solb@google.com> Merge "camera2-portability: Fix zoom occasionally not working" into lmp-dev
80cda8dae801f09c2ce928d0f3feb8a569939fc2 27-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Fix zoom occasionally not working

Cache the last valid CameraSettings object

The camera2 implementation of CameraProxy#getSettings() now returns the most
recent valid CameraSettings object that was provided to it (or the template if
no valid cached instance is available). This more closely mimics the camera1
implementation's behavior, and resolves issues where the app relies on finding
recent settings there in corner cases.

Bug: 17016658
Change-Id: I057feec3f857428dd210300a05f22cafa9f5ba34
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
984a086412a94ebea1bd9af8cd8bbf4afab38034 25-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Optimize out some camera2 AE precaptures

If it's already converged and the flash isn't being forced on, there's no need
to force the precapture routine, which would delay our capture significantly.
Also use onCaptureProgressed() instead of onCaptureCompleted() when possible.

Change-Id: I0bb7956498b0070382cd5b39b7ccdc0cc0765913
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
aa907a3b6637b4f95dbf572d0cf790a70ba3aeb0 22-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Play shutter sound for camera2 captures

Bug: 17109582
Change-Id: I73321cdbb2972b2d1e9bc2de93192fbb506347e7
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
182acbc3f78ea6c6edd6bd5d67c62188b4079243 16-Aug-2014 Sol Boucher <solb@google.com> Merge "camera2-portability: Provide preview transformation matrix" into lmp-dev
f9feab9a826e5b33d811e757bdfdbfa0738fcfa5 12-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Provide preview transformation matrix

Applying this transform to the Surface on which the stream is displayed results
in a correctly rotated image. For API 1, the rotation is actually performed by
the Camera class and the returned matrix is an identity matrix; however, for API
2, the transformation is responsible for proper orientation.

Bug: 16875535
Change-Id: I044ffbd1095bd1a9792c899b792129cc94c7c916
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
b2df32dd892ae8076714b7ebd33c715378c4c730 16-Aug-2014 Sol Boucher <solb@google.com> Merge "camera2-portability: Make factory offer choice of backing API" into lmp-dev
50f5b019ba3f333a09a1beb9667fd7290082dc31 05-Aug-2014 Sol Boucher <solb@google.com> camera2-portability: Make factory offer choice of backing API

This allows apps using the library to decide whether to jump to the new API.
Users of the library may choose to use the Camera class, the camera2 API, or
have the choice made automatically based on the device's API level. The choice
may also be globally overridden by means of a system property.

Bug: 16875535
Change-Id: I92e4be96fbd04057be61ceb8a0c58935770022f6
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
de48004068f8c16f9a56c60b0ed2485a67687b4b 23-Jul-2014 Sol Boucher <solb@google.com> camera2-portability: Support photo capture using camera2 API

This implements JPEG capture, including an autoexposure precapture sequence.
There are many changes to AndroidCamera2Capabilities and AndroidCamera2Settings
to support the representation of modes (e.g. flash modes) whose flags do not
map trivially between the API implementations. Part of this work is the
conversion of AndroidCamera2AgentImpl to use and store a
Camera2RequestSettingsSet instead of a bare API 2 CaptureRequest.Builder.

Change-Id: I03f9f98c954a7b0c140ac8d80161878c92ef65d2
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
a97b7d1192e246a5f738991adca37cce282e1382 09-Jul-2014 Sol Boucher <solb@google.com> camera2-portability: Add focus locks and touch-to-focus for API 2

This implements focus locks very simply using only camera2 API requests: the
lens is locked on autoFocus() and unlocked on cancelAutoFocus(), as with the
existing legacy API--backed implementation. Both passive and active focus modes
ares supported, with and without positional focusing.

Change-Id: I26b1866539807fd3d64189923871443056a166af
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
7e0d39bf7b6e0f0df606e3f6c15f673f70fed3f7 16-Jul-2014 Sol Boucher <solb@google.com> DO NOT MERGE: Fix oversight while refactoring CameraStateHolder

The base class still (redundantly) defined states, and AndroidCameraStateMachine
was overriding methods with a verbatim copy of their implementations.

Change-Id: I0e6361417edb159f91b89409058ee9a73b1101d9
(cherry-picked from commit dbc457417c581c21b5d49539325b1b152dc1baba)
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java
a0842b40441db5332a5290f941021636b1182761 09-Jun-2014 Sol Boucher <solb@google.com> camera2-portability: Add support for previews using the camera2 API

At the moment, only SurfaceTextures (and not SurfaceViews/SurfaceHolders) are
supported. The tests still only cover Stringifier and IntegralStringifier.

Change-Id: Ie643c58f8383cd3b9f59c16e0b79239df0ca068d
/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/AndroidCamera2AgentImpl.java