The problem is both face unlock and camera application try to open
the hardware camera at the same time. A new camera open API is
added to let face unlock take the camera away from the existing
client. The release message is used to notify the existing client,
so it has time to release the hardware camera and clean up.
If existing client tries to use the camera after it is released,
the method will return error. It is still possible that the
camera has been taken and the existing client has not got the
notification. When any method returns error, the existing client
can use ping command to check whether the camera has been released.
If yes, the client can silently finish the app itself or show a
toast if it wants.
bug:5584464
Change-Id: I87f9f7db2f7b2b70ab2405f9b3da0d8946d6a01b
This patch moves camera- and graphics-related definitions out of the hardware
HAL layer and into system/core. These definitions are used both by the HAL and
by higher-level code as well. More functionality (e.g., audio definitions)
will be moved here as well.
Change-Id: I225f12374ce54fa393640dce53738267d0d703e9
Signed-off-by: Iliyan Malchev <malchev@google.com>