summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.h
Commit message (Collapse)AuthorAgeFilesLines
* CameraService: Fix cameraId type of onDeviceStatusChangedBin Chen2016-03-221-1/+1
| | | | | | | The cameraId should be of type int, instead of camera_device_status_t. Change-Id: I26d587bb74f7100028f09928984c2e8dad6eebef Signed-off-by: Bin Chen <chen_bin@projectara.com>
* Merge tag 'android-6.0.1_r17' into HEADJessica Wagantall2016-03-071-1/+7
|\ | | | | | | | | Android 6.0.1 release 17 Ticket: CYNGNOS-1854
| * Camera: Disallow dumping clients directlyEino-Ville Talvala2016-01-221-1/+7
| | | | | | | | | | | | | | | | Camera service dumps should only be initiated through ICameraService::dump. Bug: 26265403 Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
* | Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-071-1/+2
|\ \ | |/ | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/av into cm-13.0 Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
| * Camera: Add video recording stop soundChien-Yu Chen2015-10-141-1/+2
| | | | | | | | | | | | | | Add video recording stop sound to match MediaActionSound. Bug: 24745252 Change-Id: I84b69757c7e0a98abfaafcce5f41dd45fd41cf74
* | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-051-6/+13
|\ \ | |/ | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * CameraService: Link to client binder death at end of connectEino-Ville Talvala2015-09-041-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, within a binder Looper thread, a Binder object death notifier is registered, and then a nested Binder transaction is begun, that transaction may process a death notification callback for the just-registered object, if it was dead at the time of registration. This can lead to an unexpected nested call into the service, and cause deadlock. To avoid this, move the death notifier registration to the end of handling the connect transaction. Also remove one extra bit of disconnect logging. Bug: 23525545 Change-Id: If01cbaf42704f55134118afefc9a8f7bdb014e09
| * CameraService: Treat TOP_SLEEPING same as TOP for priority.Eino-Ville Talvala2015-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When arbitrating between camera clients, treat processes in the TOP_SLEEPING state with the same high priority as processes in the TOP state. This resolves race conditions during lock screen handoffs between clients such as face unlock (a bound foreground process) and a secure camera app (the topmost activity, but transitioning from TOP_SLEEPING to TOP asynchronously from the activity lifecycle callbacks). Bug: 23731720 Change-Id: I92c3f8f561c7725627826c0ba3dc926e99af746c
| * am fe751bea: Camera: Fix flashlight deadlockChien-Yu Chen2015-09-021-1/+3
| |\ | | | | | | | | | | | | * commit 'fe751bea0d3eedd6e817aebf4e457425b82e7117': Camera: Fix flashlight deadlock
| | * Camera: Fix flashlight deadlockChien-Yu Chen2015-09-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Use a dedicated mutex for torch UID map so it won't cause a deadlock after flashlight app gets killed while the torch is on. Bug: 23722318 Change-Id: I228377aa0412052d56b6b948361d9abaecbbc686
| * | CameraService: Notify camera service proxy of device statusEino-Ville Talvala2015-08-211-0/+10
| |/ | | | | | | | | | | | | | | Send the camera proxy service in system server updates to camera device state: opened/closed/active/idle. Bug: 23393557 Change-Id: Id7c70f134821efa34af8f6e7b4caa4c2ab128ebc
* | camera: add ability for a device to specify MAX_CAMERASDan Pasanen2015-10-301-0/+4
| | | | | | | | Change-Id: I3db99ea4eff63aab3448efe7b2eb51366c658c03
* | camera: Allow hardware/camera.h header to be overriddenEthan Chen2015-10-301-1/+1
| | | | | | | | Change-Id: I715ba261de0b01e61cbfe7cacd567a9f511fb8cb
* | Camera: Fix flashlight deadlockChien-Yu Chen2015-09-021-1/+3
|/ | | | | | | | Use a dedicated mutex for torch UID map so it won't cause a deadlock after flashlight app gets killed while the torch is on. Bug: 23722318 Change-Id: I228377aa0412052d56b6b948361d9abaecbbc686
* Camera: Add camera type to ICameraService.getNumberOfCameras.Eino-Ville Talvala2015-08-141-0/+8
| | | | | | | | | Also determine the number of 'normal' cameras present on camera service startup, and ensure that all normal cameras have IDs lower than the 'strange' cameras. Bug: 23194168 Change-Id: I1f7b14825cb52707de698a955f85da1eaa932663
* Merge "Track camera and flashlight usage in battery stats." into mnc-devRuben Brunk2015-06-021-4/+22
|\
| * Track camera and flashlight usage in battery stats.Ruben Brunk2015-06-011-4/+22
| | | | | | | | | | | | Bug: 15986092 Change-Id: I9dc6828332e4091fd93bf2d82839e8e3862a2fc2
* | camera: Add AIDL interface for CameraServiceProxy.Ruben Brunk2015-05-201-0/+2
|/ | | | | | | | | | | | | - Adds an AIDL interface to allow the proxy camera service running in system server to accept RPCs from the camera service running in mediaserver. - Request an update to the valid user set from the proxy camera service when mediaserver restarts to initialize properly + avoid DOS after a crash. Bug: 21267484 Change-Id: Ib821582794ddd1e3574b5dc6c79f7cb197b57f10
* camera2: Fix work-profile eviction handling.Ruben Brunk2015-05-141-20/+14
| | | | | Bug: 20124384 Change-Id: I6fb82dbfd5f98746ed4befed81a583e3709bfee8
* Merge "camera2: Fix arbitration priority calculation." into mnc-devRuben Brunk2015-05-131-15/+1
|\
| * camera2: Fix arbitration priority calculation.Ruben Brunk2015-05-121-15/+1
| | | | | | | | | | | | | | | | | | - Simplify priority calculation + handle constants added for device sleep: FOREGROUND_SERVICE and TOP_SLEEPING. Bug: 19186859 Change-Id: Ia2a5517cd3150deaccb58a0aa1eaa583cb769add
* | Merge "mediaresourcemanager: change resource manager service log to use ring ↵Ronghua Wu2015-05-121-1/+1
|\ \ | | | | | | | | | buffer." into mnc-dev
| * | mediaresourcemanager: change resource manager service log to use ring buffer.Ronghua Wu2015-05-111-1/+1
| |/ | | | | | | | | | | | | | | | | move the ring buffer implementation from libcameraservice to media include. also add line prefix support to the service log. Bug: 20637674 Change-Id: Ib6b32f31abe92c42644ef7012f1e3d46220ccfbd
* | Revert "Add camera app op - camera"Svetoslav Ganov2015-05-121-12/+10
|/ | | | | | | | This is not needed duplication of work This reverts commit 32fa6d0e65dbf956e253a1006e9419dce2fe75c9. Change-Id: I2c81b0dacb2ed99c408c79c1f9e22a4baa564494
* Add camera app op - cameraSvet Ganov2015-05-021-10/+12
| | | | Change-Id: I26570cc0a23fdea740b416a26838d40cac296c85
* camera2: Fix fuzztesting segfault in connect.Ruben Brunk2015-05-011-0/+9
| | | | | Bug: 20721655 Change-Id: I0d974cad19683a8c86a76dac7f61ac0010bd977a
* CameraService: Add support for module init, some logging updatesEino-Ville Talvala2015-04-151-0/+10
| | | | | | | | | - Add support for camera HAL module init() method on v2.4 - Add logging for service errors such as failure to init - Minor cleanup to dumping of event log Bug: 20016050 Change-Id: I94e18b52c186f16fb096457015f7ae761e867fd8
* camera: Fix client eviction/disconnect race.Ruben Brunk2015-04-131-0/+3
| | | | | | | | | | | - Add blocking wait in camera service connect call to prevent race when client has called disconnect while eviction of that client is taking place, resulting in early call of device initialization before all HAL resources are available. Bug: 20038135 Change-Id: I7afc5bfa23612ba7f83293fa542ff983a5991230
* camera: Update camera service logging and validation.Ruben Brunk2015-04-091-8/+49
| | | | | | | | | - Expand the logging included by the camera service. - Update user validation checks in connect calls so that these can be correctly called from the camera service. Bug: 20063426 Change-Id: I0a8cbe1ea2c0a652298e6b70c89705da174a50e1
* camera2: Enforce client eviction on user switch.Ruben Brunk2015-03-311-6/+24
| | | | | Bug: 19186859 Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668
* camera2: Remove ProCamera.Ruben Brunk2015-03-201-53/+1
| | | | | Bug: 19186859 Change-Id: I4aaadb53db65b479f92cbb3c05329d1e40317900
* camera2: Add camera client eviction enforcement.Ruben Brunk2015-03-181-94/+449
| | | | | | | | | - This updates the CameraService to implement client eviction behavior based on process priority. Bug: 19186859 Change-Id: I646939b1cdf1a2237c4e5044164d55a2542cf36e
* camera: implement flashlight for HAL v1 devicesChien-Yu Chen2015-03-031-1/+0
| | | | | | | | | Implement flashlight for HAL v1 devices and remove CameraHardwareInterface's dependency on CameraService to avoid circular dependency. Bug: 2682206 Change-Id: Id5bbccef085b607a6189763fd7fbe2e3f26868c8
* camera: fix flashlight implementation for HAL v2Chien-Yu Chen2015-03-031-8/+13
| | | | | | | | | | | | | | | | | | Update torch availability when the camera device availability changes. For device HAL v2 and v3 implementation, notify torch unavailable for all camera devices with a flash unit when a camera device is opened. Notify torch available for all camera devices with flash unit when all camera devices are closed. Don't invoke torch status callback in camera service. Invoke torch status callback in HAL or FlashControlBase implementations to avoid race condition. Clean up previous CL. Bug: 2682206 Change-Id: I24f5478f467b2c680565fe98f112eef33e2547a1
* camera: implement flashlight controlChien-Yu Chen2015-02-121-0/+34
| | | | | | | | Implement flashlight API for module v2.4 by calling module APIs and by for hal v2 and v3 by using CameraDeviceBase. Bug: 2682206 Change-Id: Ib8b77f6fd462489d672f27e14fe37801d35b7544
* CameraService: intercept Camera moduleYin-Chia Yeh2015-02-031-2/+4
| | | | | | | | Wrap camera module returned from HAL so get_camera_info returns static_camera_characteristics processed by framework, which generates keys added after HAL3.2 is released. Change-Id: Ief423a1571cf06c7ef80b98b403a33969baf95f6
* Update calls to IInterface::asBinder()Marco Nelissen2014-11-141-1/+1
| | | | | | to use the new static version. Change-Id: I89a5988a0ac694ffc04d88cf939e8455bf925d4c
* camera: Allow shutter sounds to be disabled from camera2 apiIgor Murashkin2014-08-191-8/+11
| | | | | | | | | | | 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
* CameraService: Clean up availability listeners and HAL error codesEino-Ville Talvala2014-07-281-5/+8
| | | | | | | | | | | - 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
* cameraservice: Implement HAL1 and higher HAL API coexistenceZhijun He2014-06-191-1/+7
| | | | | | | 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
* camera: Add #getLegacyParameters, #supportsCameraApi to ICameraServiceIgor Murashkin2014-06-171-0/+17
| | | | Change-Id: Ic86c8df3d703e7cf89caa856387e2c0a1b977401
* camera2: Update CameraService for HAL1 shim.Ruben Brunk2014-05-211-0/+39
| | | | | | | | | | | | | | 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
* CameraService: trigger appropriate callbacks for burst capture.Jianing Wei2014-04-101-3/+8
| | | | | | | | | | | | | | | | | | | | * 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
* camera3: Pass vendor tags through binder.Ruben Brunk2014-03-131-15/+18
| | | | | | | | | | 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
* Camera: Implement getCameraCharacteristicsZhijun He2013-09-251-0/+2
| | | | | | Bug: 10904541 Bug: 10360518 Change-Id: Ie9ca6b3b0b5f2fe529e6b0decc193096e770a017
* Camera1: Set preview to be asynchronous, and remove dead codeEino-Ville Talvala2013-08-211-2/+1
| | | | | | | | | | | | | - Use the controlledByApp flag to make sure application-bound preview buffer queue is asynchronous as before - Remove setPreviewDisplay in service, since it is no longer in the binder interface - Rename setPreviewTexture to setPreviewTarget, to make it clear it's the only game in town now. Rename only on the binder level and service for now. Bug: 10312644 Change-Id: Icd33a462022f9729a63dc65c69b755cb7969857e
* Refactor CameraService to handle errors properly.Ruben Brunk2013-08-161-8/+16
| | | | | | | | Bug: 10361136 -Connect calls now return status_t error flags. Change-Id: Idca453b111e5df31327f6c99ebe853bb2e332b95
* Camera: Rename new API to camera2, rearrange camera serviceEino-Ville Talvala2013-07-301-2/+2
| | | | | | | | | | | - 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
* Make android.hardware.photography.Camera work on HAL3+ devicesIgor Murashkin2013-06-201-1/+4
| | | | | Bug: 9213377 Change-Id: I5b2eeab28985f53dfcb7b8e3029930f5adcd74f5
* Initial implementation of android.hardware.photography.CameraDevice (service)Igor Murashkin2013-06-201-7/+25
| | | | | | | | | | | * 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