Camera: update eviction logic for same owner case
Update the eviction logic when the same owner is trying
to open a new camera. The new expected behavior:
1. If the same camera is opened twice, the second
open will succeed and the first one would be
evicted.
2. If the owner is trying to open a camera that is
conflicting with any camera that's opened by
the same owner, the open call will fail.
Before this change, the behavior of #2 above
could vary (either old or new camera being evicted) on
different devices depending on how conflicting device
is listed by camera HAL, which is not exposed to
application developers.
Also added new unit test to verify the eviction logic.
Bug: 153699385
Test: B1 camera CTS test
Change-Id: Id935e30f441d172ba774fc99a2714ade974668a8
3 files changed