History log of /frameworks/av/services/camera/libcameraservice/CameraService.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4afbdecf8c6dc5ad04f6fa6c8712ce2c56a00c47 05-May-2016 Zhijun He <zhijunhe@google.com> Camera: update service to support HAL3.4

We need support HAL3.4 device in cameraservice.

Bug:28599474
Change-Id: Ibad0249349335d78557820429439e71eceba259e
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
c3c06c4fe329d07bd7d442206bc9eb63e92bf5bd 26-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: override external facing for API1 client" into nyc-dev
9b5a6e9a667f85adeddea787a9f609d9cde84ef4 22-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: override external facing for API1 client

Bug: 28322515
Change-Id: I6ecb4f27c98b2c5d509756e27259fa8afdd27631
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d89821ec5481e0640d84bfe3e29a1254a52ca683 20-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Add dumpsys --unreachable support

Use libmemunreachable to instrument camera service to detect
native memory leaks.

Will detect any memory allocated through jemalloc; does not track
gralloc or other special allocations.

It can be triggered with
dumpsys media.camera --unreachable

Bug: 28295283
Change-Id: Ib4e73e9d1a168b3cee4c56a9bf1aeb438591c799
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
18df60e094edbaa08cbecd25b0398643b8a0f29a 19-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera: Use original client PID for eviction

Use the original client PID to evaluate priorities for eviction. The
original client PID may be different from the calling PID when the
application uses MediaRecorder to open camera.

Bug: 26493273
Change-Id: I8f56194f1ca2151701efb8cb380ff4abf6c8d6c4
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
1e74e241f5a4e0e763e27c888561405d013c9ca0 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Don't crash when the device has no vendor tags.

Turns out copying from null pointers crashes things.

Bug: 27466842
Change-Id: I294f03614eec8c488c016469549464065821a7e7
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d56db1d2bee182d1851097a9c712712fc094d117 18-Dec-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Switch camera2 to auto-gen C++ binder interfaces

- Move camera service AIDL files to frameworks/av
- Build C++ interface stubs with AIDL tools
- Add necessary native-side parcelables and update existing ones
- Remove manually-written stubs, rearrange remaining manual stubs
- Adjust implementations to work with auto-generated stubs
- Adjust method signatures for auto-gen differences
- Add rich error messages using binder::Status

Bug: 25091611
Change-Id: I6f69f34b9d1a3f8d1fb7db87357363f8fa8483ff
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
feb76cc0340f3eb4c9ae91cbfab4dcea449422f5 28-Jan-2016 Chien-Yu Chen <cychen@google.com> Merge changes from topic 'camera-hardening'

* changes:
camera: Add support to pass native handles across binders
Camera: Fix client permission check
Add cameraserver process
98a668f6ea51e4d894d2ebb61a0e18287fb14008 18-Dec-2015 Chien-Yu Chen <cychen@google.com> Camera: Fix client permission check

Modify StageFright's CameraSource to forward calling PID as
client PID when connecting to CameraService so CameraService
can check if the client PID has permission to use camera.

Change CameraService to check calling UID is trusted before
using the passed in client PID and client UID to verify permission.

Bug: 24511454
Change-Id: I4906ab73510e2c75714690bed675e3c13aca3ccf
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
0dea57fd9fc4b2ccaab97d9477359fbd5a626f5c 10-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera NDK library: first draft

Bug: 23012001

Change-Id: I06d834421289d4dead1c87301a6ee94487ccf023
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
c73e0410c6b931fe598061b2f348834da0a21707 15-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525 am: 795243686f am: fb5043a703 am: 3a0d1df37d am: f0b0a7c7bb
am: 715e5cdec7

* commit '715e5cdec771abb372d46813a8b0ab57d47afd99':
Camera: Disallow dumping clients directly
fb5043a703f596b7393c1e24ca4b321b0f697293 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525
am: 795243686f

* commit '795243686fe2e1c352732b47bcdb6ea9e9e7e39e':
Camera: Disallow dumping clients directly
795243686fe2e1c352732b47bcdb6ea9e9e7e39e 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly
am: c400396525

* commit 'c4003965258404a19b99280ac0f475e2f290bf27':
Camera: Disallow dumping clients directly
c4003965258404a19b99280ac0f475e2f290bf27 13-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly

Camera service dumps should only be initiated through
ICameraService::dump.

Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
6dd6c546513aa18dc1d7fba0f72d670edce34f77 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly

Need to set the number correctly when a camera HAL is not present.

Bug: 25951590
Change-Id: I666acf7a2a523c51f2c2ae88ff690ca9dccda08c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
49c9705a7987b94bd53fddd4834f5f534cf946f7 12-Jan-2016 Eino-Ville Talvala <etalvala@google.com> CameraService: Further fixes to default camera counts

At least one section of code still doesn't clear the camera
counts correctly on error, so ensure that they always start at 0.

Also include normal camera count in dumpsys, and remove unnecessary
initializers in the constructor.

Change-Id: Ib891bd37ab5f74b43d5d31b24ac23fa0b11434b3
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
654b4bf34361b0166a564d178c11ce98cf561cfa 08-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix HAL1.0 support

Bug: 26050582
Change-Id: Ic64fb005d7c804dc2b8b9c22fdbe44408646b406
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
a6b3ed1b8ee37fe244dfbcbe3dbeda66b55c846d 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: set mNumberOfNormalCameras correctly"
169e8ebba23f461cdb57f10985e044e235457b0a 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly

Need to set the number correctly when a camera HAL is not present.

Bug: 25951590
Change-Id: I666acf7a2a523c51f2c2ae88ff690ca9dccda08c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d309fb9c8a2c4564d88fffba19c4e3688e4b862b 25-Nov-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Remove device HALv2 support, other cleanup

HALv2 only ever shipped with Nexus 10, and has been fully superceded by
HALv3. Remove it to allow for various code simplifications and cleanup.

- Remove Camera2Device
- Remove various special-case codepaths for supporting Camera2Device
- Remove CameraDeviceFactory, since it only creates Camera3Devices now
- Remove BurstCapture and associated CaptureSequence/Parameters code
- Remove old ZslProcessor and simplify ZslProcessor hierarchy to be
just ZslProcessor3, which is renamed to just ZslProcessor
- Add service-init-time check for unsupported device versions
- Fix assorted compiler warnings, some old, some new
- Remove references to HALv2 when possible

Bug: 25866588
Change-Id: Ia1063264d315f9b742ec5cdd0483539310894f5e
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e9ccb98fc7259cbd876f02381b0eec4d5a5ff4ff 29-Oct-2015 Makoto Onuki <omakoto@google.com> Remove "sys.secpolicy.camera.off_" system property check

With I421690f14ee57fa818d2b233fe48a90a0a575a9e, now the device policy camera
restrictions will be propagated with a user restriction via appops, so the
system property check is no longer needed.

Bug 24538855

Change-Id: I7b034c0d49b834e570c758315df6a0163f64af4e
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
5adc76c49a525993f3362cf648864fb21f4547f0 08-Oct-2015 Tom Keel <thomas.keel@intel.com> DO NOT MERGE: libcameraservice: Fix nullptr crash when no client.

This change prevents a crash in the camera service when the camera
HAL notifies the service about the absence of a removable camera and
there happens to be no client connected to the service. It checks
that the pointer returned from clientToDisconnect.get() is non-null
before trying to dereference it (as is done in existing code
immediately below this change).

Bug: 25165323
Change-Id: I8055654bac980542e63ea7f52bf897eaafbc09bc
Signed-off-by: Tom Keel <thomas.keel@intel.com>
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
3e600894685b994849d59307721c6862ae0c45b7 09-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> Camera: frameworks: Add NULL check for callback

--Added NULL check for mRemoteCallback

Ack by: Susmitha Gummalla

Bug: 25023187
Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
ceb10ea795d92d889201cd40f5ac6290edf4ded7 15-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: setup vendor tags before get_camera_info" into mnc-dr-dev
82104ebbb2cc04277ab07b355f38f73045a11770 14-Oct-2015 Chien-Yu Chen <cychen@google.com> Camera: Add video recording stop sound

Add video recording stop sound to match MediaActionSound.

Bug: 24745252
Change-Id: I84b69757c7e0a98abfaafcce5f41dd45fd41cf74
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d4a653a15767d4de37dbfdee22c2170951c93299 14-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: setup vendor tags before get_camera_info

So HAL can use vendor tags on first get_camera_info call.

Bug: 24913201
Change-Id: I73f17de87e3712a27f9cee366995df27a740f5cb
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
fefa614f92346e929921bfd47e3643861850bc2a 09-Sep-2015 dcashman <dcashman@google.com> Reduce DUMP permission denial output to one line.

Bug: 23940813
Change-Id: I0060dbaff5cd0c3d028ac5cd7aba7da3f0371150
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
a84bbe6b59721b1b963d65d270aa98d6513bbb78 09-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add more systracing, fix module init order

Improve debugging of performance of concurrent calls to the service.

- Add ATRACE calls to camera service entry points
- Add ATRACE calls for camera HAL module calls
- Ensure that camera module init method is called before all others

Bug: 23718257
Bug: 23933447
Change-Id: I2a025866ab39eda3962877120cab13a063c7727e
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
24901c86e10a0923fe10f5e9bce5e6dba061a289 04-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Link to client binder death at end of connect

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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
52aad85627f5216e7a3d9db425d2cc409f998a01 03-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Treat TOP_SLEEPING same as TOP for priority.

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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
ef7826692df89514701d12dfbfc31bec3814cf95 02-Sep-2015 Chien-Yu Chen <cychen@google.com> am fe751bea: Camera: Fix flashlight deadlock

* commit 'fe751bea0d3eedd6e817aebf4e457425b82e7117':
Camera: Fix flashlight deadlock
fe751bea0d3eedd6e817aebf4e457425b82e7117 01-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera: Fix flashlight deadlock

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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
412fe56cd7cf7d73bc5d2bcc3f635bc650d18de9 21-Aug-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Notify camera service proxy of device status

Send the camera proxy service in system server updates to
camera device state: opened/closed/active/idle.

Bug: 23393557
Change-Id: Id7c70f134821efa34af8f6e7b4caa4c2ab128ebc
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
bad4358c83c7daaf9eeb8542c15eea4f473c884c 14-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Add camera type to ICameraService.getNumberOfCameras.

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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
3450ba7879be6522ea46a56c5e66e5382f5dd5ba 16-Jun-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix native binder interface and add tests.

- Add CameraBinderTests for limited coverage of native
camera2 binder interfaces for the camera service.
- Fix several bugs in the native binder interfaces.

Bug: 18468810
Change-Id: Iab2d81a5cacd20daf7454aeeed033cc13d88452c
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e3afb2cc438b76ae433c8c40ceabf0457ad7a678 04-Jun-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Change error for app ops reject, propagate binder errors

INVALID_OPERATION surfaces as an non-specific device-level error to
applications in the onError callback. This is not a condition apps
targeting camera2 in L will generally have to deal with.

Instead, return -EACCESS which maps to throwing
CameraAccessException.CAMERA_DISABLED, same as disabling camera access
with DevicePolicyManager.

The old camera API converts any error code to -EACCESS at the JNI layer,
so this doesn't change anything for the older API.

Also update the various native ICameraService binder connect calls to
check for the transact error code, and return it if it is not OK.
Without this, PERMISSION_DENIED transact errors from the camera
service cannot be distinguished from CAMERA_DISABLED errors in
some codepaths.

Bug: 21604925
Change-Id: Ifccc8989b8c20653429e2d3e51dba7abb2be9c35
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
cb18ec05b7097a63262b81afe1e866105d400f4a 02-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Track camera and flashlight usage in battery stats." into mnc-dev
99e69716215cd0665379bc90d708f2ea8689831d 27-May-2015 Ruben Brunk <rubenbrunk@google.com> Track camera and flashlight usage in battery stats.

Bug: 15986092

Change-Id: I9dc6828332e4091fd93bf2d82839e8e3862a2fc2
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
2232aee25e4df7d04446912e8ad9e9dc44d8ec16 20-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Add AIDL interface for CameraServiceProxy." into mnc-dev
2823ce0ce6f9d508a07de20912c93cce9165027f 20-May-2015 Ruben Brunk <rubenbrunk@google.com> camera: Add AIDL interface for CameraServiceProxy.

- 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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
022f0cb0c6f135edde4ebe84859c685933ee895e 20-May-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Logcat conflicting devices on rejected open

Already in dumpsys log, but also put into logcat for feedback reports

Also fix a minor warning about an uninitialized variable.

Bug: 21063372
Change-Id: I04b45932e4500ac72aaa1cb724abc8a82a0e70e8
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
6267b539d0d1ee7118aafd976d75cb8db397bc24 01-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix work-profile eviction handling.

Bug: 20124384
Change-Id: I6fb82dbfd5f98746ed4befed81a583e3709bfee8
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
2882bb9a94bba6477552e7f696984e8e1ce052ff 13-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix arbitration priority calculation." into mnc-dev
be0b6b4a3770a9dd2ff357fe3e88a6ba11a976ff 13-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix arbitration priority calculation.

- Simplify priority calculation + handle constants
added for device sleep: FOREGROUND_SERVICE and
TOP_SLEEPING.

Bug: 19186859
Change-Id: Ia2a5517cd3150deaccb58a0aa1eaa583cb769add
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
28e8ef72dab287af59663b89b12507e43f760701 12-May-2015 Svetoslav <svetoslavganov@google.com> Fail gracefully when camera app op is not enabled.

Change-Id: I0c7c1dca1c0966efaf30bcfe12636953683712ab
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
280405a138a0068694f3c39b4290f510173133d9 12-May-2015 Svetoslav Ganov <svetoslavganov@google.com> Revert "Add camera app op - camera"

This is not needed duplication of work

This reverts commit 32fa6d0e65dbf956e253a1006e9419dce2fe75c9.

Change-Id: I2c81b0dacb2ed99c408c79c1f9e22a4baa564494
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
32fa6d0e65dbf956e253a1006e9419dce2fe75c9 02-May-2015 Svet Ganov <svetoslavganov@google.com> Add camera app op - camera

Change-Id: I26570cc0a23fdea740b416a26838d40cac296c85
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
0bbf8b213ad96051357e3ad6d6d2808bfa31a59a 30-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix fuzztesting segfault in connect.

Bug: 20721655
Change-Id: I0d974cad19683a8c86a76dac7f61ac0010bd977a
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
f2326ac96366ec4d05f470cc4a0b407e7805bab7 16-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Add support for module init, some logging updates"
f6463fc62a09b8aad8e811a9abbe9f4d9f2688f9 08-Apr-2015 Chien-Yu Chen <cychen@google.com> camera2: remove unnecessary flashlight error messages

Bug: 20069129
Change-Id: I0e721bfad1f0218744d3554397e3ec9b8bc07a19
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
1527f07eb2b2b40f6b8f53a4644e6a400bddb460 08-Apr-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add support for module init, some logging updates

- 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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
4f9576bf48c5909782c12490e8a9faa974ae68d6 11-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Fix client eviction/disconnect race.

- 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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
a8ca9157d21510fbd474bd31748f4fe0d4635dd7 07-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Update camera service logging and validation.

- 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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
36597b241c59eba7e55d5150092947a748c5e9cb 21-Mar-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Enforce client eviction on user switch.

Bug: 19186859
Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
40272963eb8f8d8d7a1f39e6a25ae73bc755e553 24-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "camera: update CameraModule"
676b21b30edbd74d7b9aae247961a1ffde1b8993 24-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: update CameraModule

1. Add more accessor methods to CameraModule to prevent exposing
raw module pointer
2. Use KeyedVector to replace array

Bug: 19897963

Change-Id: I111cc093f09f5fb3c4b13693d5d0687e1f441058
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
9efdf956cc2eef63fef609375901d6c8df6351b6 19-Mar-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Remove ProCamera.

Bug: 19186859
Change-Id: I4aaadb53db65b479f92cbb3c05329d1e40317900
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
54b4246bb2025a5dcfdf1611c199998448d28424 19-Mar-2015 Chih-Hung Hsieh <chh@google.com> Fix link error of PROCESS_STATE_NONEXISTENT.

* A reference to PROCESS_STATE_NONEXISTENT will cause link error with
clang or standard C++ compiler because there is no out-of-class definition,
although g++ is allowing it.
Use +PROCESS_STATE_NONEXISTENT to get the value instead of reference.

Change-Id: I62049584b94e6847b64b572f6ef6c3e9dcc573eb
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
cc776718c0be7c31fe5ab4fc1446d377be60369f 18-Feb-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Add camera client eviction enforcement.

- This updates the CameraService to implement client
eviction behavior based on process priority.

Bug: 19186859

Change-Id: I646939b1cdf1a2237c4e5044164d55a2542cf36e
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
d231fd61ca94441183abda9766ce6906a5b4c3cf 26-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: implement flashlight for HAL v1 devices

Implement flashlight for HAL v1 devices and remove
CameraHardwareInterface's dependency on CameraService to avoid
circular dependency.

Bug: 2682206
Change-Id: Id5bbccef085b607a6189763fd7fbe2e3f26868c8
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
88da526d97442c80731e01bfc94c6b47c4b0c3c7 17-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: fix flashlight implementation for HAL v2

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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
a9284a8d9e6cb27e6d428be3f70a854d978dc282 19-Feb-2015 Chien-Yu Chen <cychen@google.com> Merge "camera: implement flashlight control"
228711d4d25ab434c273c92fc01662c0a6b3adbf 13-Feb-2015 Amith Yamasani <yamasani@google.com> Look up user-specific device policy for disabling camera

Camera can be disabled on a per-user basis by device admins.
Changed the system property format to be per-user so that
the policy can be applied based on calling user.

TODO: Ideally this policy information should be pulled from the
DevicePolicyManager rather than relying on system properties.
Property changes will not be applied immediately either, if
there's no listener.

Bug: 19345698
Change-Id: Ia00034726260bc9ff28ac592f20a27b5c9a77d58
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
3068d73c6c7e1f44523b1466b903a9c82408b258 09-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: implement flashlight control

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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e074a93046ebe5cea0b55c3a479e082a426e1e07 30-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> CameraService: intercept Camera module

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
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
6b6d8a79ef821541a7687ed924959369f73fc977 21-Nov-2014 Ruben Brunk <rubenbrunk@google.com> am ffa3e71e: am bc0f452b: Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev

* commit 'ffa3e71e47215b68fe4ae0b7a3f976db648d63d3':
Camera2: Fix CameraParameters parse segfault.
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
f888020c6e2735624f2b2a30e72aca24e17b8b4d 14-Nov-2014 Marco Nelissen <marcone@google.com> Update calls to IInterface::asBinder()

to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a

Conflicts:
media/libmedia/IAudioFlinger.cpp
media/libmedia/IMediaPlayer.cpp
media/libstagefright/CameraSource.cpp
/frameworks/av/services/camera/libcameraservice/CameraService.cpp
e992e75053e98e3699af6e344c11b787e30411ad 08-Nov-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Guard against asBinder() calls on NULL interfaces

Bug: 18207548
Change-Id: I9879c9b4c0282a6b96b77398f62beedc47f7f0a0
/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