History log of /frameworks/av/services/camera/libcameraservice/CameraService.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5fc9d902510ccd04db80e0bc6aa679a4317a51b2 20-Nov-2014 Ruben Brunk <rubenbrunk@google.com> Camera2: Fix CameraParameters parse segfault.

Bug: 18331142
Change-Id: I41feec93f753f97b3e6bf963deb4a42b73406421
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
a858ea0495c887621a2fd9c0afc13780deccb597 19-Aug-2014 Igor Murashkin <iam@google.com> camera: Allow shutter sounds to be disabled from camera2 api

When using the connectLegacy binder interface (available only
through an @hide java api), then consider the camera to be in the
camera2 api legacy mode.

In legacy mode, allow disabling the shutter sound unconditionally.

Bug: 17109582
Change-Id: Ieb3fc61ff111d792cc657c018e278349c25472cf
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
f67e23ef637d0b53a0d4bebb68c654234df3da94 24-Jul-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Clean up availability listeners and HAL error codes

- Refactor where availability listeners are called to centralize behavior,
ensuring that all client creation/destruction invokes the listeners
- Clean up some of the client hierarchy
- Filter error codes from key HAL calls to ensure proper reporting

Bug: 16514157
Bug: 16483222
Change-Id: I59875a865b6a508b47423946c78862da8df34cd1
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
cd8fce8fbe0f515e53a0ea0f50b739cf42ee57a4 18-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: get stream configs by device verison

Starting from device version 3.2, the following tags:
ANDROID_SCALER_AVAILABLE_FORMATS
ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_JPEG_SIZES
ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES
ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_RAW_SIZES

are deprecated and replaced by:
ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS

Change-Id: Iadc34af0ea985a16a25759d7a9a3eb4845c486fd
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
3d07d1ad0e60fd2b9a25563a0c24faf7f1fb1afc 20-Jun-2014 Igor Murashkin <iam@google.com> camera: Let #connectLegacy calls through with unspecified HAL version

This enables the camera2 shim to open a camera1 device without
turning the error codes into a RuntimeException.

Change-Id: I08d9d1e30e72025c41bd54b702d7ae95b32257be
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
b10cdadf0fb945e23ca77008d4af76584bd0e39a 17-Jun-2014 Zhijun He <zhijunhe@google.com> cameraservice: Implement HAL1 and higher HAL API coexistence

A higher hal version device like HAL3.2 can be opened as HAL1.0 device
if HAL supports it. This only applies to camera API1.

Change-Id: I4ae9f59f4317158cc1bd7ed7726e4032cdd1fa07
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
07b56676694b01825df2375e4c2ead4e55fe2d98 18-Jun-2014 Igor Murashkin <iam@google.com> Merge "camera: Add #getLegacyParameters, #supportsCameraApi to ICameraService"
65d14b9825311f9d1847cf282bd0419e71bac666 17-Jun-2014 Igor Murashkin <iam@google.com> camera: Add #getLegacyParameters, #supportsCameraApi to ICameraService

Change-Id: Ic86c8df3d703e7cf89caa856387e2c0a1b977401
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
63d877fe4138a95c27f1020b34e81bfa0430d2b8 17-Jun-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Fix permissions check issues

Bug: 15677063
Change-Id: I012c111fff90fefd9eb0fef7c9d6034f00c9c6df
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
152dbcf2e0d8a46691e22b102972540640f054ec 13-Jun-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Add jpeg sizes to legacy mode static characteristics.

Bug: 15116722

- Adds jpeg size mapping to available output formats.

Change-Id: I73e46dd4309767ba41156d9ba03c4724bf234758
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
b2119af7f4ced0ecfefd4c7388f86b4e3a3ea7d8 10-May-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Update CameraService for HAL1 shim.

Updates the camera service to handle shim connections.

Changes include:
- Adds begin/end configure binder calls.
- Adds cache for shim client static camera metadata.
- Implements basic getCameraCharacteristic functionality for shim clients.

Bug: 15116722
Bug: 15117269

Change-Id: I510c5888ca15f8e7d3b8ed1680ff1c7f8f514744
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
f2776a5692bb4228decbe4ea3c8cc6df1d9c684c 05-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera3: Update CameraMetadata vendor tag handling."
e1b55da41878255570f18809c5fee72544740344 01-May-2014 Natalie Silvanovich <natashenka@google.com> NULL check in ConnectPro

Prevents service crash

Bug: 13744720
Change-Id: I7a5cdba830b4f96660f890ede6b94c38fc3108dd
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
f81648ec38ff63f1f35516fa27c1c24d846e9ba5 18-Apr-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update CameraMetadata vendor tag handling.

Bug: 12134423
Change-Id: I97dc955ee9dd78ace93a7946296d6d9b0e407d43
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
6770260f83f5576b041b7b3a2536d082a631f9b0 03-May-2014 Ruben Brunk <rubenbrunk@google.com> Revert "camera3: Update CameraMetadata vendor tag handling."

This reverts commit 4764324d2704f1b08bb7407014bf203924ff2363.

Change-Id: I86d7fcc11423502b73fab2a82af6aa89804f0b76
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
4764324d2704f1b08bb7407014bf203924ff2363 18-Apr-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update CameraMetadata vendor tag handling.

Bug: 12134423
Change-Id: I1d1be6792b6a4c9f08e042a8b2c89146bde5665e
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
cb0652e5a850b2fcd919e977247e87239efaf70e 13-Mar-2014 Jianing Wei <jianingwei@google.com> CameraService: trigger appropriate callbacks for burst capture.

* Instead of tracking CameraMetadata only, now we track both
CameraMetadata and CaptureResultExtras, which is not part of
the HAL metadata. This will enable the correct callback of
onCaptureStarted and onResultReceived given burst requests.

* Get last frame number in reply when submitting requests,
canceling requests, and flushing device. For repeating requests,
this frame number is the last frame number of the previous
request. For non-repeating requests, this frame number is the
expected last frame number of the current request. The goal
is provide frame number to Java side in order to trigger
onCaptureSequenceCompleted correctly.

* Fix notifyError so that onDeviceError can be called correctly.

Bug: 10749500
Change-Id: I2f3dda6c530090055d4a2ff9f0f087bbbe8d9257
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
95dd5ba5bf83716f2eed5fe72366c4212464d710 27-Mar-2014 Zhijun He <zhijunhe@google.com> Camera3: fix HAL3.x version check issue

Camera service should support HAL3.x instead of only HAL3.0.

Bug: 13609405
Change-Id: If7e86f9abe019547fc0be2e11337551cd7c57870
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
29cdd9bb46437ab580deabf33b2242106e0090b6 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am a1aaaf86: am 4f53fe74: Merge "CameraService: deadlock fix"

* commit 'a1aaaf86cd04eabaf961a30d7b0a9fa857089862':
CameraService: deadlock fix
a1aaaf86cd04eabaf961a30d7b0a9fa857089862 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am 4f53fe74: Merge "CameraService: deadlock fix"

* commit '4f53fe74051026e6635ba5bdbed4f1898cb66028':
CameraService: deadlock fix
6ec3a15257ca2b56b675a610aef43cc4ec6aaf00 30-Apr-2013 Kalle Lampila <kallex.lampila@intel.com> CameraService: deadlock fix

Release lock before return from CameraService::dump()

Change-Id: Ia20b0921fc675a284f3b7f8d26e0e3596b5a8774
Signed-off-by: Kalle Lampila <kallex.lampila@intel.com>
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
32ce52b01dab863f2b4749e1c69f619cf820486f 24-Mar-2014 Colin Cross <ccross@android.com> am 5c679d41: resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aosp

* commit '5c679d41714e42f153f6aeb492df54510a195bc1':
libcameraservice: build 64-bit
libcameraservice: fix 64-bit print format warnings
5c679d41714e42f153f6aeb492df54510a195bc1 22-Mar-2014 Colin Cross <ccross@android.com> resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aosp

Change-Id: Ia6d87d56174d1388c1148fb55b6e4bc57d8666db
e5729fac81c8a984e984fefc90afc64135817d4f 21-Mar-2014 Colin Cross <ccross@android.com> libcameraservice: fix 64-bit print format warnings

Use PRId64 from inttypes.h to print nsecs_t (int64_t)
Use %zu to print size_t

Change-Id: I135620e0388db33587a8a7da393b48a45cb7275a
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
9ff25ced1404c896df9e6ed3a6ad289305559361 18-Mar-2014 Igor Murashkin <iam@google.com> am 557847ee: am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit '557847ee511dd5e75d584ff04449322f0f098241':
camera2: Fix segfault when using null availability listener
557847ee511dd5e75d584ff04449322f0f098241 18-Mar-2014 Igor Murashkin <iam@google.com> am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit 'a6ca0acf0d009acf45b05561273aaad44ab22533':
camera2: Fix segfault when using null availability listener
e1445da74730473a66a3ae8414e940aebfe6585d 17-Mar-2014 Igor Murashkin <iam@google.com> camera2: Don't log vendor tag errors when camera HAL too old

Change-Id: Iac3d23284230c95c85ee404abbf9b22df1ae721c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
bd3e2e03f3ab686c52982a9e50cae853128172cf 17-Mar-2014 Igor Murashkin <iam@google.com> camera2: Fix segfault when using null availability listener

ICameraService::addListener / removeListener will now return BAD_VALUE
if a null listener is used.

Bug: 12891434
Change-Id: I9764110094d8fd42e22fcc8df3ef0e73c1b070e7
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d1176ef16677b6c94fb893edb6a864cdccc0b190 21-Feb-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Pass vendor tags through binder.

Bug: 12134423

- Adds a class for parceling vendor tag definitions.
- Passes vendor tag definitions to clients of the camera service.
- Switches over to new vendor tag mechanism when reading from HAL.

Change-Id: Icef3fe9e67160767bdb8244ac49c85b68b497123
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
1d6fa7af1288b550faabe4ec2cf98684236723db 11-Feb-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 566be7c3 to master

Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
377b2ec9a2885f9b6405b07ba900a9e3f4349c38 03-Feb-2014 Kévin PETIT <kevin.petit@arm.com> Make frameworks/av 64-bit compatible

Contains the necessary changes to make frameworks/av build and work
on a 64-bit machine.

Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
1b86fe063badb5f28c467ade39be0f4008688947 29-Jan-2014 Andreas Huber <andih@google.com> FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code

Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
ff3e31d2b100d8efd969b358b18e4405c49dd10d 24-Oct-2013 Igor Murashkin <iam@google.com> camera: Collect stack traces when bad things happen, print with dumpsys

Bug: 11324229
Change-Id: Ic920e170a8f5a389fc139bbf5416c0e3186c7fb6
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
f05e50eb06d3f70e50fa7f44c1fd32128033b49d 01-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: only return static metadata for HAL3 device

This effectively disables the camera2 APIs for HAL2.x or lower HAL device.

Bug: 10360518
Change-Id: I0f374ac533468c6181f5672c75088b7144b9c53d
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
2b59be89dc245b6e2475d9e8b0c5f2392370e71e 25-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Implement getCameraCharacteristics

Bug: 10904541
Bug: 10360518
Change-Id: Ie9ca6b3b0b5f2fe529e6b0decc193096e770a017
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
17963d16d66526288ed66c91a6744daf3acfd731 20-Aug-2013 Ruben Brunk <rubenbrunk@google.com> Fix CameraService error flag when running HAL1 with API2.

Bug: 10620944

Change-Id: I44c0d09a3d313ae8f724fbe61fa5f36cf5b38b6d
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
0f61d8f14aa368c9cd7076528e8096e10ed100a0 08-Aug-2013 Ruben Brunk <rubenbrunk@google.com> Refactor CameraService to handle errors properly.

Bug: 10361136

-Connect calls now return status_t error flags.

Change-Id: Idca453b111e5df31327f6c99ebe853bb2e332b95
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
7b82efe7a376c882f8f938e1c41b8311a8cdda4a 26-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Rename new API to camera2, rearrange camera service

- Support API rename from photography to camera2
- Reorganize camera service files
- API support files to api1/, api2/, api_pro/
- HAL device support files into device{1,2,3}/
- Common files into common/
- Camera service remains at top-level

Change-Id: Ie474c12536f543832fba0a2dc936ac4fd39fe6a9
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
47110057829ba7d5c7b41fd2aa381b5f5ed811ca 23-Jul-2013 Zhijun He <zhijunhe@google.com> Camera: ProCamera connect need support HAL3 device

Change-Id: Iae7e5f9e6387f61f1c4bbb91f75803fc1fdf2668
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
98e24724fb77445d4d015a5fec4ecbd5b49abc9b 20-Jun-2013 Igor Murashkin <iam@google.com> Make android.hardware.photography.Camera work on HAL3+ devices

Bug: 9213377
Change-Id: I5b2eeab28985f53dfcb7b8e3029930f5adcd74f5
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e7ee7637747371635a85fedd24d2190bb1f38651 12-Jun-2013 Igor Murashkin <iam@google.com> Initial implementation of android.hardware.photography.CameraDevice (service)

* Verified preview streaming requests
* Other things *should* work but unverified / unimplemented in client side

Missing:
* CameraService needs to return static camera info metadata

Bug: 9213377
Change-Id: I71568560fcf18d0e2b408ed1c4d0066647314868
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
93747b9c7724f690b3068300514c05629e0b0a3e 02-May-2013 Igor Murashkin <iam@google.com> Camera: Hotplug - conditionally transition to PRESENT when clients disconnect

Fixes an issue where a client could unconditionally transition to PRESENT
after a client disconnects, even though the underlying HAL status was actually
NOT_PRESENT or ENUMERATING.

Bug: 8780114
Change-Id: I68adb5fc819eec3b046ddcb2507b84bedc999a0f
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d09801b99503b57c35e321ad9afa7e861e012813 24-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix deadlock on shutdown due to client getting killed.

When the binder connection dies and is the only holder of a strong
pointer to the Camera2Client, disconnect is called from the
destructor. At this point, all weak pointers to Camera2Client are no
longer promotable, and lots of cleanup code paths are broken as a
result.

Rework all such code paths to not need the client pointer, and to
discard image buffers that arrive during shutdown.

Bug: 8696047
Change-Id: Ic0672ecde7c1baaf65079f925a45bd5be45f1fb3
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
cba2c163555cd329f49d40658ea3ee902e94dda3 20-Mar-2013 Igor Murashkin <iam@google.com> Camera: Add hotplug support (for fixed # of cameras)

* Minor: also change addListener to fire the current status upon subscription
* Minor: STATUS_AVAILABLE is now an alias for STATUS_PRESENT and deprecated

Change-Id: I254608a7332095e3ef201ffea64cff156cfc1b3e
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
acd695c42749f8821b0a0cc27739ddf096c6d4e8 14-Mar-2013 Igor Murashkin <iam@google.com> ProCamera: Fix rare deadlock when client destructs inside the connect call

Bug: 8337737
Change-Id: Ia6fca4365fa20fdbfd6a1ec8d047639a002f2aba
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e6800cea0678dbc0bf697b44c3e4548b0253085c 05-Mar-2013 Igor Murashkin <iam@google.com> Camera: Make ProCamera connect take the same paths as Camera connect

* ProCamera uses the app ops manager
* Refactored connect calls to be as common as possible
* Removed some useless not implemented function calls in ProClient

Change-Id: I5dab30d20f0c202a494a07b2cfe4c1fa04a2a076
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
44cfcf00b9008c1c04f4c8277c6c06af039fd976 02-Mar-2013 Igor Murashkin <iam@google.com> CameraService: Refactor Camera2Client to share a base with ProCameraClient

Change-Id: I249e2a0fc47ae84f29c9d9c4a223fba13da3ee66
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
bfc9915f482520eb9676c6d2dbf7f1ac078d937d 27-Feb-2013 Igor Murashkin <iam@google.com> Camera: Drop ProCamera connections when a Camera connection happens

* Also adds an ICameraServiceListener with available/not available statuses

Bug: 8291653
Change-Id: I24680f1a2dc109510caf451cf7c7bd180b670d84
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
b99c5b8eebb35133a08c46b015624bd4c4a6c477 07-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Start of support for version 3.0 of camera device HAL

- Refactor common CameraDevice interface out of Camera2Device
- Initial skeleton only for Camera3Device

Change-Id: I097cc76e2ad102a51712ac114235163245f5482c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
c073ba525404f3416c2824c435d3d926a9892f1b 26-Feb-2013 Igor Murashkin <iam@google.com> camera_client: refactor Camera/ProCamera commonalities into BasicCamera

Change-Id: Ie10a4094522d49683657665fe94ab0b7ccd280e9
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
ceb388d6c03c38b96dc41c0ea4804b749aa077c4 19-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CameraService and Stagefright: Support AppOps

Camera:
- Signal to AppOpsService when camera usage starts and stops
- Listen to permissions revocations and act on them
- Currently just kill camera connection when permissions lost

Stagefright:
- Pass on client name, UID to camera as needed

Bug: 8181262
Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
985fd30a10f6fec4293f071fd258c4726cff5a3d 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client - add createStream (service is stubbed) and unit test

Change-Id: I1ae7ba9b24f5883c214c19a7ed0eaf0c802d69c1
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
634a51509ee50475f3e9f8ccf897e90fc72ded31 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add ProCamera private binder interface for an API2-light functionality

Change-Id: I2af7a807c99df75ea659e6e6acc9c4fca6a56274
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
1d88023e1de6b9f370eb4be944dd9c4480d01f11 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add unit test infrastructure for libcameraclient

Change-Id: I957538663ae8332d26f3640c63a75efc79f4ac5c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
c0dd54f1a77fb94ae69cc3ac5944d718bb6caa28 20-Feb-2013 Alex Ray <aray@google.com> CameraService: Log camera module name

Explicitly logs camera module loaded. This is useful on systems with
multiple camera modules installed. Also this make the camera service
match audioflinger, which logs hardware module names as well.

Change-Id: I280bf12df2d517f936916b8ba3cb662e671d0216
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
036bc3e2cfc5a11c3f7ace41088c8936dae2e946 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Always disconnect in the client destructor

If Camera2Client failed to initialize, it would skip disconnect step,
and thus the camera would be forever marked as busy. By always calling
disconnect it will always call free.

It also adds a new guarantee that Client::disconnect is idempotent

Bug: 7298182
Change-Id: Ic9876f1665b7d9b3c0da692880f63f165e3f4fa5
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
294d0eca9eabfaa3ef0ee8bee7ccf3eaaa925e41 05-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't promote weak IBinder ptrs to strong ones

The Binder driver does not support promoting weak pointers into strong
pointers. Occassionally the system would lock up when trying to do this
(when closing the camera app).

Bug: 7289040
Change-Id: I8bc0b5c48616bf0b7f4eed1878ad4994ee635871
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
ecf17e82505fdb60d59e00b6dd59036df93de655 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Handle client processes dying by closing camera resources

CameraService now subscribes to binder death notifications
for each client, and disconnects the client if the death happened
without cleanly shutting down the client first.

Bug: 7258314
Change-Id: I7803836b589fd8f0dfe00f6c28a707b82012e751
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
428b77a2b94b74665a47375b3fdb893b98d71269 30-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve formatting of debugging dump

Bug: 6243944
Change-Id: Id8730357f3adcd96923132f9f702e296e0dfd357
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
f5926136ad328e95a79336b051d6f853443eaab9 17-Jul-2012 Eino-Ville Talvala <etalvala@google.com> CameraService: Add more information to service dump.

Add dumpsys information even when there's no active client. Including:
- Camera module version / name / author
- Number of camera devices
- Static information for each device

Change-Id: Ib97e325f6be5f989b342d24f1ae17aa9e796f8ed
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
611f61998863d3a3ffae4e5f2b723b7319c59ddf 31-May-2012 Eino-Ville Talvala <etalvala@google.com> Add basic Camera2Client dump, minor fixes to CameraService dump.

Bug: 6243944
Change-Id: I52caaa6146050c38976768e99b0eeea1d13a3f51
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
f69c70ded4316ea3ee504ac779bd024433ed4ef7 21-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Initialization for camera2 clients and devices

- Refactor initialization code to hide device type from CameraService
- Add metadata queue class to Camera2Device
- Initialization of Camera2Device, Camera2Client
- Conversion from HAL2 device static metadata to camera API
parameters.

Bug: 6243944
Change-Id: I524145b45438e906d8493dae202704ce8f090aeb
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
61ab9f93315ea817cd1ac110e2a95da4dab6b4d1 17-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Add skeleton support for camera2 devices.

- Add Camera2Client, which maps the current android.hardware.Camera
API to the new camera2 semantics
- Add Camera2Device, a C++ wrapper for the HAL camera 2 device

No functionality besides create/destroy; all client methods return
error or null.

Bug: 6243944
Change-Id: I6bd5136fa1efd8279b8cd2d9847d9b0bb2862294
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
5e08d60617fc63c2e41f9069ff89f5c00db2617d 16-May-2012 Eino-Ville Talvala <etalvala@google.com> Break out CameraClient from CameraService.

To allow for different low-level implementations of the current camera
API, the Client class inside CameraService has to be inheritable. This
change breaks it up into the common section accessed by the camera
service, and the full implementation for camera device HAL version 1.

The full implementation is moved out to CameraClient.h/.cpp.

There are no functionality changes, just code reorganization.

Bug: 6243944
Change-Id: I8a79b31a3ae3617198dc6bb5576a9f2e2d9c95de
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
08ad5efcef90e24db2863c0f85972ed05fe848a2 18-Apr-2012 Wu-cheng Li <wuchengli@google.com> Remove new camera connect API.

Applications are not resumed under the lock screen now.
This API is not needed anymore.

bug:5584464
Change-Id: I115daf6b647348617ec0fc05b626878c945b9b29
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d8973a71a3d1dd670e5dcdf6e94ec0cd45444eec 28-Mar-2012 Keun young Park <keunyoung@google.com> Fix deadlock in camera destruction after client app's crash

* why deadlock happened: when an app (CTS camera test) crashes while using
camera, its binder is closed and reference counter is decreased. If camera
is inside callback, sp<Client> inside callback will hold the Client instance,
and Client instance is destroyed when the callback ends as sp<Client> to hold
it no longer exists. The destructor of Client instance tries to clean up
camera H/W which tries to stop threads created by camera HAL including the
thread context where the callback is running. This causes deadlock where the
callback thread itself is waiting for itself to terminate.
Note that the deadlock will not happen if camera callback is not active. In
that case, closing of binder will force the destruction of Client instance,
and the destruction happens in binder thread.

* Fix: Forces Client descruction in binder thread
- remove sp<Client> from callbacks to prevent destruction in callback context
- add client lock to allow callback to use raw pointer safely. This prevents
the destructor from deleting the instance while callback is using it.
- add status change inside destructor with client lock to safely destroy Client

Bug: 6214383
Change-Id: Ic6d6396d4d95ce9e72a16ec2480ae65c100fe806
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
2fd2440d0175ca3e196b01b7541a9e0d4ed9a694 24-Feb-2012 Wu-cheng Li <wuchengli@google.com> Add a new camera open API that allows taking the ownership.

The purpose is to let face unlock always get the camera
successfully. What happened was the camera applications may
have opened the camera in onResume under the lock screen.
This API lets face unlock take the camera from the camera
application. A new permission will be added, so other
applicatoins won't be able to take the camera from the face
unlock.

bug:5584464

Change-Id: Ib3d9dcbc2161815b68db42327dc01148453704c6
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
df712ea86e6350f7005a02ab0e1c60c28a343ed0 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
0e5ace70ca8067fc2c3259fe041352d1dab7e1e2 07-Jan-2012 Eino-Ville Talvala <etalvala@google.com> am 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1

* commit '4bc873e6ff73200af866f8c9efca66ad8ed23682':
Switch camera sounds to always use the system enforced audio stream.
60a78ac9535878984b0777788760b9ee7465c5e6 06-Jan-2012 Eino-Ville Talvala <etalvala@google.com> Switch camera sounds to always use the system enforced audio stream.

Instead of picking between the music stream and the enforced audio
stream, change the camera service to always play sounds through
enforced system stream. Also update the currently-hidden CameraSound
API to match.

Bug: 5778365
Change-Id: I3cc64b1d1ff567dbac8020a665d5b19846197ff3
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
5ff1dd576bb93c45b44088a51544a18fc43ebf58 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
df64d15042bbd5e0e4933ac49bf3c177dd94752c 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
b8a805261bf0282e992d3608035e47d05a898710 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d620506220a15177942a8168d09c517740e908d0 14-Nov-2011 Wu-cheng Li <wuchengli@google.com> Add camera focus move callback.

bug:5534973
Change-Id: Iaadcb2738ad040f94849be30ee531326f6199431
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
8888a75f01d904541e409e858d23e4150ace34b6 20-Oct-2011 Chih-Chung Chang <chihchung@google.com> Fix 5487571: Make sure shutter sound is played when it's enforced

Change-Id: I0c7adf452217b8308243836b40b1fba8f2029240
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
ff4f55c8d77e276dbcceedb4e560ca1d91ba38ba 17-Oct-2011 Chih-Chung Chang <chihchung@google.com> Fix 5468644: Use the proper audio stream type to play sound.

Change-Id: I80dd37da277b1810959a2dbdd852078b26f70cf5
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
5861a9a98c641261c4807c976c750e4611b3a57d 06-Oct-2011 Tyler Luu <tluu@ti.com> Add initialize method to CameraHardwareInterface

Add intialize() method to CameraHardwareInterface so we can
return a proper error value to CameraService if open of camera
hardware module fails.

b/5405235

Change-Id: I09c627034ddd22a5753c5163392c4fcff301e0b9
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
6c904e26d4cd7a79f589e613fa7b2866a9fccb15 07-Oct-2011 Chih-Chung Chang <chihchung@google.com> Merge "Allow shutter/recording sound to be adjusted unless it's forced."
b9f588677910cac6ffc0346092bfcfe1c6620b90 07-Oct-2011 Wu-cheng Li <wuchengli@google.com> Allow Camera.setDisplayOrientation to be called when preview is active.

bug:5422679

Change-Id: I4c936ab00428fc158b5947fe8f10b1028869bbdb
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
90f4bc2a3d361252df898fa31a99f4120aeefb27 07-Oct-2011 Chih-Chung Chang <chihchung@google.com> Allow shutter/recording sound to be adjusted unless it's forced.

Change-Id: I7080d5f50a87f92c8e9395d4cf8f927a6760fa70
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
a8e409f8f9b40737d0b03355894b5e141d0aff6b 30-Aug-2011 Wu-cheng Li <wuchengli@google.com> Add video snapshot camera parameter.

The API is still hidden.

bug:5187868

Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
57c86189bc07d9ccb0fd044e66df736d0bf19639 29-Jul-2011 Wu-cheng Li <wuchengli@google.com> Pass camera frame metadata from camera service to Java.

bug:4460717
Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
c3da3434cb57f47284ea06bb9065eaa2fe033efb 30-Jul-2011 Mathias Agopian <mathias@google.com> connect/disconnect is now called from our EGL wrapper

the original connect/disconnect hooks are deprecated
and replace by api_connect/api_disconnect. the original
hooks are no no-ops.
api_connect/api_disconnect is now only called from the
android framework.

Bug: 5057915
Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
ff09ef8f18eed29bce50c7817df2fd52d2b50cf6 27-Jul-2011 Wu-cheng Li <wuchengli@google.com> Add frame metadata parameter to camera data_callback.

bug:4460717
Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
2cd60e3069e93c11676019c8405d3941cd2ac5b7 19-Jul-2011 Wu-cheng Li <wuchengli@google.com> Merge "Disconnect the native window in CameraService::Client::disconnect."
7574da5a501fc9289fee49fdaf1fdb9d47dae2b6 19-Jul-2011 Wu-cheng Li <wuchengli@google.com> Disconnect the native window in CameraService::Client::disconnect.

bug:5048372
Change-Id: I6886907a672ddf5580b988ca5bc13e3dc26d4385
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
9bc7af17974f448291a44912566ec7472a0d798b 19-Jul-2011 Mathias Agopian <mathias@google.com> use SurfaceTexture new scaling mode in SF

SF now obeys SurfaceTexture's scaling mode instead
of inferring it from the buffer's size

Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
0ed3ec00d0242c9dc77532fe0cf0082645b6662c 14-Jul-2011 Jamie Gennis <jgennis@google.com> CameraService: (dis)connect from preview windows

This change makes CameraService connect and disconnect from preview
windows (Surfaces and SurfaceTextures) that get set.

Change-Id: I726971688367d5ce0d9aa90c44168037bce33deb
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
4ca2c7c913f8bd4ada13aca56d36045d42d1e00f 01-Jun-2011 Wu-cheng Li <wuchengli@google.com> Add framework support for camcorder zoom.

The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.

Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.

ICameraRecordingProxy
startRecording()
stopRecording()
releaseRecordingFrame()

ICameraRecordingProxyListener
dataCallbackTimestamp()

The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.

The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
(1) The app: MediaRecorder.start().
(2) The recorder: ICamera.unlock() and ICamera.disconnect().
(3) The recorder: ICameraRecordingProxy.startRecording().
(4) The app: ICamera.reconnect().
(5) The app: ICamera.startRecording().
4. During recording
(1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
(2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
(1) The app: MediaRecorder.stop()
(2) The recorder: ICameraRecordingProxy.stopRecording().
(3) The app: ICamera.stopRecording().

bug:2644213

Change-Id: I15269397defc25cbbcae16abc071c8349c123122
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
a3355430a36bbfa7b2c0d90eb30834f1c5dac337 20-May-2011 Wu-cheng Li <wuchengli@google.com> Allow camera to be disabled via Device Policy Manager

bug:4185309

Change-Id: I8be89d892b8f540fd05913c93f97b92346a0a282
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
8951a97b1f8462c37e740ea5082eea0445d2c501 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: switch CameraService to a HAL module

This patch changes CameraService to load a camera HAL module, instead of
linking directly against a library that implements the CameraHardwareInterface
class.

CameraHardwareInterface no longer defines the API to the camera HAL. Instead,
this is now in HAL header hardware/camera.h. We keep CamerHardwareInterface as
a class local to CameraService, which wraps around the new HAL calls. In the
future, we may remove this class entirely and have CameraService call the HAL
methods directly.

Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
9e626526453f91999bdf3de4c2ec8e55c5d90511 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: include system/core header camera.h in Camera.h

We define struct CameraInfo in this camera/Camera.h, even though an identical
struct camera_info is defined in hardware/camera.h (but not in
hardware/camera_defs.h). We may not export struct definitions from the HAL
into headers which may find their way into the NDK.

This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx.

Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
fce7a473248381cc83a01855f92581077d3c9ee2 20-Apr-2011 Dima Zavin <dima@android.com> audio/media: convert to using the audio HAL and new audio defs

Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
8b1027d3f873fc15c70f8645f1856936b69241a4 06-Apr-2011 Mathias Agopian <mathias@google.com> remove more unused references to ISurface

Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
108dddf924d714c811dd565b8f4c7a0178cca2f2 29-Mar-2011 Iliyan Malchev <malchev@google.com> frameworks/base: some camera-interface cleanup

Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct
image_rect_struct are no longer used (instead, the necessary information is
passed through ANativeWindow.)

Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb
Signed-off-by: Iliyan Malchev <malchev@google.com>
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e468ac57f6e8afc6078c76d4eb1ac327112a3de0 18-Feb-2011 James Dong <jdong@google.com> Application-managed callback buffer support for raw image

bug - 3292153

Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
bfa33aae4f54c0020a0568b16a3acb7b30b6ca3d 20-Dec-2010 Jamie Gennis <jgennis@google.com> Add camera service support for SurfaceTexture.

This change enables the use of a SurfaceTexture in place of a Surface as
the destination of camera preview frames.

Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
986ef2ad4c96952711d87af481f3afb40aa10775 09-Dec-2010 James Dong <jdong@google.com> We requires camera hal's implementation should not track the ref count of any outstanding video frames and ignore
releaseRecordingFrame() call after it receives disableMsgType(CAMERA_MSG_VIDEO_FRAME).

Change-Id: I2ecb9b3b11dab6bf868ccf8effda1b8df5bcde3c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
03dfce9672b36c1a334959a602f909b8410bec50 08-Dec-2010 Mathias Agopian <mathias@google.com> remove support for PUSH_BUFFER surfaces and overlays

the same functionality is now supported through
the h/w composer HAL, and YUV support in the GPU.

Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
6baa5de62a91b151af7a19036706b3d45143a32e 07-Dec-2010 James Dong <jdong@google.com> Don't drop video frames but to release them.

bug - 3259009

Change-Id: Ib7634f10a7fe7b7ce7014b79b07957d194bae1a7
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e4db265e478bdac2381d85cf3dd41bbda14271b4 23-Nov-2010 Eric Laurent <elaurent@google.com> Revert "Temporary workaround for issue 3187563"

This reverts commit 065299b58d1c00cd24e442fa192561decf7b1fec.

The work around for issue 3187563 is not needed any more since the new kernel
DMA driver implementation (commit 7953250be7c9a1c3417e21b20032b571d495d218)
fixes the root cause.

Change-Id: Ibaac2826b63c8e5825ae2e5cab2fb2f0e51ab7b4
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e3aac34f9e0d825aaad597f70e2b3dcb615ef313 12-Nov-2010 Eric Laurent <elaurent@google.com> Temporary workaround for issue 3187563

The audio HAL does not always handle properly simultaneous input and output stream
state changes. This happens in particular when starting video record because output
stream starts and stops while input is active.

Temporary disable the video record jingle the time the audio HAL issues are solved.

Change-Id: I3b923d81af543a335deae9e22d7f396bb5791d91
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e09591eff55fdff1868b32c3e046c62f800330fc 14-Oct-2010 Wu-cheng Li <wuchengli@google.com> Mirror the camera preview if the camera is front-facing.

bug:3095272
Change-Id: Ib1c1d1edc06a33e9d4d2dcb42bc1dd2c25b1310c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e2ad6734eccc4b9ea7857c747ff9469a9c11ba09 19-Oct-2010 James Dong <jdong@google.com> Camera framework change required for 0-memcpy recording

bug - 3042125

Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
012716a857641a977afd16ff6be4bf66fc403884 08-Oct-2010 Wu-cheng Li <wuchengli@google.com> Fix camera display orientation.

bug:3036262
Change-Id: I6fc3dc381fcfaceba09fd5bd14afb85045b3d676
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
b36f2df1daf7e733be7c51f93792f8fc4252544c 28-Sep-2010 Wu-cheng Li <wuchengli@google.com> resolved conflicts for merge of 191a25e1 to master

Change-Id: I6f4940e337a992bf84e50bc1d22432593937499c
4a73f3da3501db6e95473a4a653d6319c6d618e2 24-Sep-2010 Wu-cheng Li <wuchengli@google.com> The old overlay should be destroyed if orientation changes.

Previously the orientation was wrong after suspend and resume.
When the camera app is resumed behide the lock screen, it
orinteation is portrait. When users slide to unlock the screen,
surfaceChanged is called and the orientation is landscape.
The camera app stops the preview, sets the display orientation,
and starts the preview. Overlay should be destroyed if the
orientation has changed.

bug:3031640
Change-Id: I38b527f9ea78c91b538463292152c023383b4695
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
3b7b358d1a45844ca427626554ff81f472fd1583 15-Sep-2010 Nipun Kwatra <nkwatra@google.com> Added command type to play recording sound.

Added CAMERA_CMD_PLAY_RECORDING_SOUND command type to play recording
sound through sendCommand. This is currently needed by time lapse
recording using still mode capture, which disables the shutter sound
but needs to play the recording sound.

Change-Id: I376aa40f45b6064fd862abc065456b06fc338020
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
b5ca4618a722a21f084fe8bfc1c2992749ccd3f0 12-Sep-2010 Nipun Kwatra <nkwatra@google.com> Adding enable/disable option for sendCommand()

- Added enum CAMERA_CMD_ENABLE_SHUTTER_SOUND which corresponds to
command type for enabling/disabling shutter sound.
- The implementation checks if it is legal to disable shutter sound.
If it is, then any process can disable the sound. If not, then only
the mediaserver process is allowed to do this. Currently time lapse
capture needs this functionality to disable shutter sound when still
mode is used to capture time lapse video.

Change-Id: Id147a3bcc6a345c2c6a6d52bf98fd8292386bb19
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
0667de7038238c31af77865eb6d83c5ae9ca1b1e 04-Sep-2010 Wu-cheng Li <wuchengli@google.com> Only enable CAMERA_MSG_PREVIEW_FRAME when necessary.

Now camera driver uses ANativeWindow for display.
CameraService should not request preview callback from
camera hardware if applications have not requested it.

bug:2951018
Change-Id: I85f74ea4a61104feca018867bc9d6dfe3a9479f5
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
3abe8d29864d3e8a9f40be43e5faa10e57a4fac5 01-Sep-2010 Wu-cheng Li <wuchengli@google.com> Remove setPreviewDisplay in CameraService::Client::~Client().

mSurface is released in destructor and setPreviewWindow(0) is
called in Client::disconnect(). setPreviewDisplay is not needed
in destructor.

bug:2964479
Change-Id: I329901659a2af407816c34e02f37143b28183a89
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
4b79168835965cf0fc41ebe2a367e22b4cb20d08 11-Aug-2010 Jamie Gennis <jgennis@google.com> Change the framework to use the new camera preview path.

This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated. The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface. The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.

Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
b7a67942823e8339eb298238f117aaa6d7b63111 18-Aug-2010 Wu-cheng Li <wuchengli@google.com> Handle the camera open failure better.

Check if camera hardware is NULL to avoid mediaserver crash.

Change-Id: Ibde0251f30bdb6b36a5d5380222d7be25ec9449c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
9da2070b6d6d20550de7da61478c325f0928d020 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 27eecb70 to gingerbread

Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
5462fc9a38fa8c9dff434cd53fa5fb1782ae3042 15-Jul-2010 Mathias Agopian <mathias@google.com> added BinderService<> template to help creating native binder services

Change-Id: Id980899d2647b56479f8a27c89eaa949f9209dfe
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
65ab47156e1c7dfcd8cc4266253a5ff30219e7f0 15-Jul-2010 Mathias Agopian <mathias@google.com> move native services under services/

moved surfaceflinger, audioflinger, cameraservice

all native services should now reside in this location.

Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
/frameworks/av/services/camera/libcameraservice/CameraService.cpp